MeVisLab Toolbox Reference
|
Tool class with many tool functions for the conversion of DICOM information and tag values to comparable ML information objects. More...
#include "MLDicomToMLToolsSystem.h"
#include "mlDICOMCachedIOFileHandle.h"
#include "mlDicomFrameSelectionTools.h"
#include "mlDicomFrameSetMinMaxCalculation.h"
#include "mlDicomOverlayTools.h"
#include "mlDicomToMLSubImageTools.h"
#include "mlDICOMTagSpectTools.h"
#include <mlModuleIncludes.h>
#include <DCMTree_Lib.h>
Go to the source code of this file.
Namespaces | |
namespace | ml |
Main documentation file for ML users and developers. | |
namespace | ml::DICOMTagTools |
A namespace collecting tools related to DICOM tags and tree tools. | |
namespace | ml::DicomToMLTools |
Tool functions for the extraction and handling of information of specific DICOM frames. | |
Functions | |
MLDICOM_TO_ML_TOOLS_EXPORT void | ml::DicomToMLTools::convertToImageProperties (DCMTree::StructuredMFPtr &baseSMFPtr, const std::string &firstFileName, PagedImage &resultImgProps, FillPageMethods *fillPageMethod, const ZTUFileNameSet *setOfFileHandles, double defaultFillValue, CalculateMinMaxFromDicomModes minMaxCalcMode, const std::string &versionString, bool anonymize, bool removePrivateMultiFrameSQTag, bool forceOrthogonalWorldMatrix, bool copyPrivateTopLevelSrcTags, DicomMessageCollector &dcmMsgCollector) |
Determines as much PagedImage information from baseSMFPtr as possible and. | |
MLDICOM_TO_ML_TOOLS_EXPORT size_t | ml::DicomToMLTools::getVoxelSize (DCMTree::Const_TreePtr treePtr, double &voxSizeX, double &voxSizeY, double &voxSizeZ, bool replaceOnlyIfFound, bool *isPrecise, std::vector< DCMTree::RawTagId > *usedTags, DicomMessageCollector &dcmMsgCollector) |
Determine the voxel size from the DICOM tags and returns the number of found extents. | |
MLDICOM_TO_ML_TOOLS_EXPORT bool | ml::DicomToMLTools::applyPaletteInfosToPagedImage (const DICOMTagTools::DicomPaletteInfo &paletteInfos, PagedImage &pagedImage, const bool adjustToLUTType=false) |
If possible then this function modifies pagedImage according to the settings paletteInfos. | |
MLDICOM_TO_ML_TOOLS_EXPORT bool | ml::DicomToMLTools::applySubImageColorLookUp (const SubImage &inSubImg, const DICOMTagTools::DicomPaletteInfo &paletteInfo, SubImage &outSubImg) |
Applies an intensity to color look up from valid region of inSubImg and paletteInfo to outSubImg. | |
MLDICOM_TO_ML_TOOLS_EXPORT bool | ml::DicomToMLTools::applyPhotometricInterpretationChangesToPagedImage (const DCMTree::Const_TreePtr &dcmTree, PagedImage &pagedImage) |
If possible then this function modifies pagedImage according to the photometric interpretation such that pixel values can be translated correctly. | |
MLDICOM_TO_ML_TOOLS_EXPORT bool | ml::DicomToMLTools::applyPhotometricInterpretationToSubImg (DCMTree::Const_TreePtr dcmTree, const SubImage &inSubImg, const double minVoxelValue, const double maxVoxelValue, SubImage &outSubImg) |
Applies a color format conversion from input subimage to output subimage according to the photometric interpretation tag in dcmTree. | |
MLDICOM_TO_ML_TOOLS_EXPORT void | ml::DicomToMLTools::getSpectDICOMImageProperties (DCMTree::Const_TreePtr treePtr, const std::string &fileNameUTF8, PagedImage &outInfos, Vector4 &rotAxisAndRadians, Vector3 &ipp, Vector3 &relMRSPositionVector, Vector3 &mrsPositionVector, Vector3 &voiVector, Vector3 &fovVector, bool useOldWorldMatrixCalculation, DicomMessageCollector &dcmMsgCollector) |
Extract spectroscopy image properties and some other infos from the passed DICOM tree. | |
MLDICOM_TO_ML_TOOLS_EXPORT bool | ml::DicomToMLTools::copySpectData (SubImage &outSubImg, const ImageVector &outImgExtent, const DICOMTagTools::SpectComplex *mrsData, size_t spectDataSizeInBytes) |
Copies the complex spectroscopy data from mrsData to the output subimage assuming appropriate sizes of mrsData which must have been calculated successfully with getSpectDICOMImageProperties and which must match the PagedImage properties calculated in the same routine. | |
MLDICOM_TO_ML_TOOLS_EXPORT bool | ml::DicomToMLTools::isImageFrameNotOfBits (DCMTree::Const_TreePtr treePtr) |
Returns true if the DICOM tree seems to describe a sensible image with column and row extents > 1 as well as pixels with more than one bit per pixel, otherwise false. | |
MLDICOM_TO_ML_TOOLS_EXPORT void | ml::DicomToMLTools::setWorldMatrixFromDcmTree (DCMTree::Const_TreePtr treePtr, PagedImage &outInfos, DicomMessageCollector &dcmMsgCollector) |
If possible all image properties from the DcmTree needed to set up the world matrix are searched and converted to a world matrix and voxel size and set in outInfos. | |
MLDICOM_TO_ML_TOOLS_EXPORT MLDataType | ml::DicomToMLTools::getMLDataTypeFromDCMTree (DCMTree::Const_TreePtr treePtr, DicomMessageCollector &dcmMsgCollector) |
Determines the ML data type of pixel data in the given DICOM tree treePtr. | |
MLDICOM_TO_ML_TOOLS_EXPORT void | ml::DicomToMLTools::checkAndCorrectImageExtentAccordingToPixelData (DCMTree::Const_TreePtr treePtr, size_t pixelDataSizeInBytes, ImageVector &imgExt, DicomMessageCollector &dcmMsgCollector) |
Check especially whether the extent of the image given in imgExt is larger by a multiple than the pixel data where the multiple is the same as imgExt.z, imgExt.t or imgExt.z*imgExt.t. | |
MLDICOM_TO_ML_TOOLS_EXPORT bool | ml::DicomToMLTools::determineImageExtentsFromDCMTree (DCMTree::Const_TreePtr treePtr, ImageVector &imgExt, std::vector< std::string > *cDimInfos, bool overrideBadTagInfos, DicomMessageCollector &dcmMsgCollector) |
Update imgExt and - if non nullptr - cDimInfos from treePtr if possible, otherwise they are left unchanged. | |
MLDICOM_TO_ML_TOOLS_EXPORT void | ml::DicomToMLTools::getAnyDICOMImageProperties (DCMTree::Const_TreePtr treePtr, PagedImage &outInfos, bool overrideBadTagInfos, DicomMessageCollector &dcmMsgCollector) |
Extract as many PagedImage properties from the passed DICOM treePtr as possible. | |
MLDICOM_TO_ML_TOOLS_EXPORT std::string | ml::DicomToMLTools::determineBasicREGProperties (DCMTree::Const_TreePtr treePtr, size_t extent[3], double voxelSize[3], MLErrorCode &errCode, DicomMessageCollector &dcmMsgCollector) |
Extract basic image properties from a DICOM tree of REG modality and SOP Class UID "1.2.840.10008.5.1.4.1.1.66.3" (Deformable Registration Storage). | |
MLDICOM_TO_ML_TOOLS_EXPORT std::string | ml::DicomToMLTools::determineREGProperties (DCMTree::Const_TreePtr treePtr, ImageVector &extent, Vector3 &voxelSize, SubImage *subImage, MLErrorCode *errCode, DicomMessageCollector &dcmMsgCollector) |
Extract image properties and deformable vector field from a DICOM tree of REG modality and SOP Class UID "1.2.840.10008.5.1.4.1.1.66.3" (Deformable Registration Storage) Spatial registration storage with SOP Class UID "1.2.840.10008.5.1.4.1.1.66.1" will result to empty return string, ML_RESULT_OK (if errCode is provided), (0,...,0) extent, voxel size (1,1,1), subImage with empty box, nullptr data, and MLuint8Type. | |
MLDICOM_TO_ML_TOOLS_EXPORT bool | ml::DicomToMLTools::hasValidNonImageModality (DCMTree::Const_TreePtr treePtr) |
Returns true only if the passed string is a known, non-empty and valid modality string which is a non image modality (RTSTRUCT, RTPLAN, RTRECORD, AU, SR, HD, ECG, FID...) and the DCMTree is not a Secondary Capture IOD. | |
MLDICOM_TO_ML_TOOLS_EXPORT MLDataType | ml::DicomToMLTools::determineOutputVoxelType (DCMTree::StructuredMFPtr &srcVolumeSMFTree, const MLDataType inVoxDataType, const SubImageBox &volumeBox, const double inDataRangeMin, const double inDataRangeMax, const OutputDataTypeSelector voxelTypeSelector, const VoxelDoubleOperations operationMode, const PositionSpecificDoubleVector &posDbls, const VoxelDoubleOperations defaultOperationMode, const double defaultOperationDouble, double &resultRangeMin, double &resultRangeMax) |
Determines a voxel type for an ML output image from some properties of an input image and a set of double values applied to different slices of the input image. | |
MLDICOM_TO_ML_TOOLS_EXPORT void | ml::DicomToMLTools::determineDCMTreeInfo (DCMTree::Const_TreePtr dcmTree, DCMTreeInfo &dcmTreeInfo) |
Stores some statistical information from dcmTree in dcmTreeInfo. | |
MLDICOM_TO_ML_TOOLS_EXPORT DCMTree::Const_StructuredMFPtr | ml::DicomToMLTools::getSMFTreeFromPagedImage (const PagedImage &pImg) |
Tries to get the first DICOM image property extension and returns its DCMTree wrapped as Structured MF Tree if possible; otherwise nullptr is returned. | |
Variables | |
MLDICOM_TO_ML_TOOLS_EXPORT const char *const | ml::DicomToMLTools::OutputDataTypeSelectorsStrings [NumOutputDataTypeSelectors] |
Strings according to OutputDataTypeSelector. | |
Tool class with many tool functions for the conversion of DICOM information and tag values to comparable ML information objects.
Definition in file mlDicomToMLTools.h.