ml::DICOMAccessories Class Reference

Class collecting some DICOM helper functions. More...

#include <mlDICOMAccessories.h>

List of all members.

Static Public Member Functions

static DCMTree::TreePtr getDirectDCMTree (const std::string &fName, std::string *errVal=NULL)
 Tries to open a file directly by reading it with the DCMTree interfaces and returns a Const_TreePtr pointer on success or a NULL Const_TreePtr on failure.
static void deepSearchTags (DCMTree::Const_TreePtr treePtr, const DCMTree::TagId &tagId, const size_t numTagsToFind, std::vector< DCMTree::Const_TagPtr > &tagVector)
 Searches the first at most numTagsToFind tags with id tagId in treePtr and appends them to tagVector.
static bool deepSearchTag (DCMTree::Const_TreePtr treePtr, const DCMTree::TagId &tagId, DCMTree::Const_TagPtr &result)
 Searches a tag also in sequence tags and returns true if found, the tag is returned in result.
static bool deepSearchTag (DCMTree::Const_TreePtr treePtr, const std::string &tagIdStr, DCMTree::Const_TagPtr &result)
 Searches a tag also in sequence tags and returns true if found, the tag is returned in result.
static MLint parseUserTagIdStringVal (const std::string &tagIdStrVal)
 Parses the given string tagIdStrVal and returns it as positive unsigned integer value if the parsed value looks like a valid raw tag id.
static std::string getTagValue (DCMTree::Const_TreePtr treePtr, DCMTree::RawTagId tagId, bool useNumericTagValueSorting)
 Return tag value of first tag with id tagId in the DICOM tree treePtr as string if it exists, otherwise return an empty string.
static size_t getTripleTag (DCMTree::Const_TreePtr treePtr, DCMTree::RawTagId tagId, double &ippX, double &ippY, double &ippZ, double initX, double initY, double initZ)
 Returns the given DICOM tag as three double values; all values which can not be retrieved are returned as values given by the corresponding init* values.
static size_t getHexTag (DCMTree::Const_TreePtr treePtr, DCMTree::RawTagId tagId, double &ippX1, double &ippY1, double &ippZ1, double &ippX2, double &ippY2, double &ippZ2, double initX1, double initY1, double initZ1, double initX2, double initY2, double initZ2)
 Returns the given DICOM tag as two 3 component double vectors; all values which can not be retrieved are returned as values given by the corresponding init* values.
static size_t getVoxelSize (DCMTree::Const_TreePtr treePtr, double &voxSizeX, double &voxSizeY, double &voxSizeZ, bool replaceOnlyIfFound, bool *isPrecise=NULL, std::vector< DCMTree::RawTagId > *usedTags=NULL)
 Determine the voxel size from the DICOM tags and returns the number of found extents.
static size_t getImagePositionPatient (DCMTree::Const_TreePtr treePtr, double &ippX, double &ippY, double &ippZ, bool replaceOnlyIfFound)
 Return the DICOM tag ImagePositionPatient as three double values; all values which can not be retrieved are returned as 0.
static size_t getImageOrientationPatient (DCMTree::Const_TreePtr treePtr, double &iopX1, double &iopY1, double &iopZ1, double &iopX2, double &iopY2, double &iopZ2)
 Return the DICOM tag ImageOrientationPatient as three double values; all values which can not be retrieved are returned as 0.
static bool updateMinMaxFromDICOMTags (DCMTree::Const_TreePtr treePtr, MLdouble &minPixVal, MLdouble &maxPixVal)
 Checks for min/max DICOM tags on top level and - if both are found - updates the passed min/max values.
static bool guessMinMaxRangeFromDICOMTags (DCMTree::Const_TreePtr treePtr, MLdouble &minPixVal, MLdouble &maxPixVal)
 Try to guess a min/max range from dicom tags for the case that they cannot be determined in another way.
static bool hasMrsASCIITag (DCMTree::Const_TreePtr treePtr)
 Returns true if the spectroscopy ASCII tags (0x0029, 0x1120) or (0x0029, 0x1220) are available in treePtr, otherwise false is returned.
static const SpectComplexgetSpectDataPtrFromTree (DCMTree::Const_TreePtr treePtr, size_t *valSizeInBytes=NULL)
 Returns the pointer to the data value in the tag (0x7fe1, 0x1010) or - if that one does not exist - from the tag (0x5600, 0x0020).
static void getComplexSpectDataCopy (DCMTree::Const_TreePtr treePtr, size_t &chunkSize, SpectComplex *&cplxChunk)
 Tries to get a copy of the complex spectroscopy data chunk form the DCMree.
static bool removeSpectDataTag (DCMTree::TreePtr treePtr)
 Removes the first spectroscopy data tag (0x7fe1, 0x1010) or - if that one does not exist - the tag (0x5600, 0x0020).
static void getSpectDICOMImageProperties (DCMTree::Const_TreePtr treePtr, const std::string &fileName, PagedImg &outInfos, vec4 &rotAxisAndRadians, vec3 &ipp, vec3 &relMRSPositionVector, vec3 &mrsPositionVector, vec3 &voiVector, vec3 &fovVector, bool useOldWorldMatrixCalculation)
 Extract spectroscopy image properties and some other infos from the passed DICOM tree.
static void copySpectData (SubImg &outSubImg, const PagedImg &outImg, const SpectComplex *mrsData)
 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 PagedImg properties calculated in the same routine.
static DCMTree::Const_TagPtr getAnyPixelDataTag (DCMTree::Const_TreePtr treePtr)
 Searches and returns the first pixel data pointer found in treePtr, or a nil tag if not found.
static const void * getPixelDataPtrFromTree (DCMTree::Const_TreePtr treePtr, size_t *valSizeInBytes=NULL)
 Returns the pointer to the pixel data tag value.
template<typename DT >
static void calcPixelDataMinMaxValues (const DT *dataPtr, size_t numValues, DT &minVal, DT &maxVal)
 Traverse all pixel values in dataPtr with the data type DT and determine the min/max values from the data and returns them in minVal and maxVal.
static void calcImageDataMinMaxFromTag (DCMTree::Const_TreePtr &treePtr, MLint64 &minValInt64, MLint64 &maxValInt64, MLdouble &minValDbl, MLdouble &maxValDbl)
 Traverse all pixel values in the first found pixel data tag in the tree given by treePtr and returns their minimum and maximum values in minValDbl and maxValDbl as well as in minValInt64 and maxValint64.
static bool hasMFPixelDataTag (DCMTree::Const_TreePtr treePtr, DCMTree::Const_TagPtr &tagPtr)
 Returns true if the tree has a multi frame pixel data tag containing many frames or false otherwise.
static bool removePixelDataTag (DCMTree::TreePtr treePtr)
 Removes the pixel data data tag DCMTree_PixelData from the treePtr if it can be found.
static void setWorldMatrixFromDcmTree (DCMTree::Const_TreePtr treePtr, PagedImg &outInfos)
 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.
static MLDataType getMLDataTypeFromDCMTree (DCMTree::Const_TreePtr treePtr)
 Determines the ML data type of pixel data in the given DICOM tree treePtr.
static void getAnyDICOMImageProperties (DCMTree::Const_TreePtr treePtr, PagedImg &outInfos)
 Extract as many PagedImage properties from the passed DICOM treePtr as possible.
static std::string dumpDCMTreeToReadableString (DCMTree::Const_TreePtr treePtr, const std::string &prefix="", MLint maxNum=50000)
 Creates a string from the DicomTree tags and updates the information field.

Static Protected Member Functions

static bool _skipToImagePosPatient (std::ifstream &fin, std::string *errStr=NULL)
 Tool functions.
static bool _doubleFromIfStream (std::ifstream &fin, double &returnValueRef, std::string *errStr=NULL)
 Converts a up to 32 byte long string containing a double number in its beginning into a double.
static void _scanForPatientPos (std::ifstream &fin, vec3 &patPos, std::string *errStr=NULL)
 Searches the patient position in the input stream.
static mat4 _determineSpectOutMatrix (std::string &retInfoVal, const vec3 &patPosSagCorTra, const std::string &scannerType, const std::string &patientPosition, const vec4 &rotAxisAndRadians, vec3 relTrans, const vec3 &posVec)
 Composes the world matrix from some spectroscopy DICOM tags.
static std::string _readSpectInfosFromDICOM (DCMTree::Const_TreePtr treePtr, std::string &scannerType, std::string &patientPosition, vec3 &patPosSagCorTra)
 Read the raw data from either old or DICOM 2007 files and removes the data tags from the tree.
static std::string _dumpDCMTreeToReadableString (DCMTree::Const_TreePtr treePtr, const std::string &prefix, MLint maxNum, const PrivateDICOMTags::PrivateCreatorIdMap &privateCreatorMap)
 Creates a string from the DicomTree tags and updates the information field.


Detailed Description

Class collecting some DICOM helper functions.

Definition at line 50 of file mlDICOMAccessories.h.


Member Function Documentation

static mat4 ml::DICOMAccessories::_determineSpectOutMatrix ( std::string &  retInfoVal,
const vec3 patPosSagCorTra,
const std::string &  scannerType,
const std::string &  patientPosition,
const vec4 rotAxisAndRadians,
vec3  relTrans,
const vec3 posVec 
) [static, protected]

Composes the world matrix from some spectroscopy DICOM tags.

For that is also corrects the order patPosSagCorTra dependent on the scanner type.

static bool ml::DICOMAccessories::_doubleFromIfStream ( std::ifstream &  fin,
double &  returnValueRef,
std::string *  errStr = NULL 
) [static, protected]

Converts a up to 32 byte long string containing a double number in its beginning into a double.

Returns:
true, if successful; the double is returned in returnValueRef, false otherwise. An error description is appended to errStr if passed as non NULL pointer.

static std::string ml::DICOMAccessories::_dumpDCMTreeToReadableString ( DCMTree::Const_TreePtr  treePtr,
const std::string &  prefix,
MLint  maxNum,
const PrivateDICOMTags::PrivateCreatorIdMap privateCreatorMap 
) [static, protected]

Creates a string from the DicomTree tags and updates the information field.

Parameters:
treePtr The DCMTree to be dumped into the returned string.
prefix The string added before each line of the dumped tree.
maxNum Is the maximum size of the created result string.
privateCreatorMap Map of tag ids to private creators used for looking up private creators found in the tree.
Returns:
The DCMTree treePtr dumped as a readable string.

static std::string ml::DICOMAccessories::_readSpectInfosFromDICOM ( DCMTree::Const_TreePtr  treePtr,
std::string &  scannerType,
std::string &  patientPosition,
vec3 patPosSagCorTra 
) [static, protected]

Read the raw data from either old or DICOM 2007 files and removes the data tags from the tree.

Success is signaled empty return string. Reads also ImagePositionPatient from DICOM tags if possible.

Returns:
"" if both possible; non empty string if ImagePositionPatient failed.
Warning:
No information on success of reading FrameOfReferenceUID is returned.

static void ml::DICOMAccessories::_scanForPatientPos ( std::ifstream &  fin,
vec3 patPos,
std::string *  errStr = NULL 
) [static, protected]

Searches the patient position in the input stream.

An error description is appended to errStr if passed as non NULL pointer.

static bool ml::DICOMAccessories::_skipToImagePosPatient ( std::ifstream &  fin,
std::string *  errStr = NULL 
) [static, protected]

Tool functions.

Reads a stream until the string "ImagePositionPatient" is found.

Returns:
true, if successful; false otherwise. The stream is reset to the beginning on failure to enable further parsing. An error description is appended to errStr if passed as non NULL pointer.

static void ml::DICOMAccessories::calcImageDataMinMaxFromTag ( DCMTree::Const_TreePtr treePtr,
MLint64 minValInt64,
MLint64 maxValInt64,
MLdouble minValDbl,
MLdouble maxValDbl 
) [static]

Traverse all pixel values in the first found pixel data tag in the tree given by treePtr and returns their minimum and maximum values in minValDbl and maxValDbl as well as in minValInt64 and maxValint64.

In case of complex spectroscopy data the data is scanned after decomposing the complex values as twice as many float data. If

  • the tag pointer is NULL or
  • if it is no pixel data, spectroscopy data or multiframe data tag or
  • the data type is MLuint64Type or any other non standard data types than complexf then the maximum values are returned with values smaller the minimum values which can easily be tested with (maxVal < minVal) == true.
    Parameters:
    treePtr The DICOM tree whose min/max values shall be determined.
    minValInt64 Found minimum value cast to MLint64.
    maxValInt64 Found maximum value cast to MLint64.
    minValDbl Found minimum value cast to MLdouble.
    maxValDbl Found maximum value cast to MLdouble.

template<typename DT >
static void ml::DICOMAccessories::calcPixelDataMinMaxValues ( const DT *  dataPtr,
size_t  numValues,
DT &  minVal,
DT &  maxVal 
) [inline, static]

Traverse all pixel values in dataPtr with the data type DT and determine the min/max values from the data and returns them in minVal and maxVal.

If dataPtr is NULL or the number of pixel values are < 1 then minVal is returned as the data type maximum and maxVal as the data type minimum which can easily be tested with (maxVal < minVal) == true.

Definition at line 293 of file mlDICOMAccessories.h.

References DCMTree::DT, and ML_TRACE_IN.

static void ml::DICOMAccessories::copySpectData ( SubImg outSubImg,
const PagedImg outImg,
const SpectComplex mrsData 
) [static]

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 PagedImg properties calculated in the same routine.

The call is ignored if mrsData is NULL.

static bool ml::DICOMAccessories::deepSearchTag ( DCMTree::Const_TreePtr  treePtr,
const std::string &  tagIdStr,
DCMTree::Const_TagPtr result 
) [static]

Searches a tag also in sequence tags and returns true if found, the tag is returned in result.

Parameters:
treePtr The DCMTree in which the tag is searched.
tagIdStr The tag to be searched for as a name string.
Returns:
true if the tag has been found, false otherwise.

static bool ml::DICOMAccessories::deepSearchTag ( DCMTree::Const_TreePtr  treePtr,
const DCMTree::TagId tagId,
DCMTree::Const_TagPtr result 
) [static]

Searches a tag also in sequence tags and returns true if found, the tag is returned in result.

Parameters:
treePtr The DCMTree in which the tag is searched.
tagId The tag to be searched for as a an id.
Returns:
true if the tag has been found, false otherwise.

static void ml::DICOMAccessories::deepSearchTags ( DCMTree::Const_TreePtr  treePtr,
const DCMTree::TagId tagId,
const size_t  numTagsToFind,
std::vector< DCMTree::Const_TagPtr > &  tagVector 
) [static]

Searches the first at most numTagsToFind tags with id tagId in treePtr and appends them to tagVector.

Parameters:
treePtr The DCMTree in which the tags are to be searched.
tagId The id of the tag to be searched.
numTags The number of tags to be searched.
tagVector A vector to which at most numTags pointers to DICOM tags are appended.

static std::string ml::DICOMAccessories::dumpDCMTreeToReadableString ( DCMTree::Const_TreePtr  treePtr,
const std::string &  prefix = "",
MLint  maxNum = 50000 
) [static]

Creates a string from the DicomTree tags and updates the information field.

Parameters:
treePtr The DCMTree to be dumped into the returned string.
prefix The string added before each line of the dumped tree.
maxNum Is the maximum size of the created result string.
Returns:
The DCMTree treePtr dumped as a readable string.

static void ml::DICOMAccessories::getAnyDICOMImageProperties ( DCMTree::Const_TreePtr  treePtr,
PagedImg outInfos 
) [static]

Extract as many PagedImage properties from the passed DICOM treePtr as possible.

Note that this function does not set or handle the DICOM tree or other image property extensions. If no useful properties can be found or the treePtr is invalid then properties are set invalid. Note that this function overwrites only found properties. Therefore image and page extents should be initialized with at least ImageVector(1) before calling this function.

static DCMTree::Const_TagPtr ml::DICOMAccessories::getAnyPixelDataTag ( DCMTree::Const_TreePtr  treePtr  )  [static]

Searches and returns the first pixel data pointer found in treePtr, or a nil tag if not found.

It is checked for (0x7fe0, 0x0010) = DCMTree_PixelData, (0x5600, 0x0020) = DICOM2007 spectroscopy data tag, and (0x7fe1, 0x1010) = old spectroscopy data tag, in this order.

static void ml::DICOMAccessories::getComplexSpectDataCopy ( DCMTree::Const_TreePtr  treePtr,
size_t &  chunkSize,
SpectComplex *&  cplxChunk 
) [static]

Tries to get a copy of the complex spectroscopy data chunk form the DCMree.

The returned data must be deleted by caller with delete[]. On success chunkSize returns the number of read complex values and cplxChunk the pointer to it, otherwise chunkSize is 0 and cplxChunk is set to NULL. This function does not handle multiframe pixel tags.

static DCMTree::TreePtr ml::DICOMAccessories::getDirectDCMTree ( const std::string &  fName,
std::string *  errVal = NULL 
) [static]

Tries to open a file directly by reading it with the DCMTree interfaces and returns a Const_TreePtr pointer on success or a NULL Const_TreePtr on failure.

An error description is returned in errVal if there is one, otherwise it will be returned as empty string. Note that this tree is not cached.

static size_t ml::DICOMAccessories::getHexTag ( DCMTree::Const_TreePtr  treePtr,
DCMTree::RawTagId  tagId,
double &  ippX1,
double &  ippY1,
double &  ippZ1,
double &  ippX2,
double &  ippY2,
double &  ippZ2,
double  initX1,
double  initY1,
double  initZ1,
double  initX2,
double  initY2,
double  initZ2 
) [static]

Returns the given DICOM tag as two 3 component double vectors; all values which can not be retrieved are returned as values given by the corresponding init* values.

The number of valid coordinates is returned, or 0 if no one or the tag is found.

static size_t ml::DICOMAccessories::getImageOrientationPatient ( DCMTree::Const_TreePtr  treePtr,
double &  iopX1,
double &  iopY1,
double &  iopZ1,
double &  iopX2,
double &  iopY2,
double &  iopZ2 
) [static]

Return the DICOM tag ImageOrientationPatient as three double values; all values which can not be retrieved are returned as 0.

The number of valid coordinates is returned, and 0 if no one or the tag is found.

static size_t ml::DICOMAccessories::getImagePositionPatient ( DCMTree::Const_TreePtr  treePtr,
double &  ippX,
double &  ippY,
double &  ippZ,
bool  replaceOnlyIfFound 
) [static]

Return the DICOM tag ImagePositionPatient as three double values; all values which can not be retrieved are returned as 0.

The number of valid coordinates is returned, and 0 if no one or the tag is found. All not found extents are filled with 0 if replaceOnlyIfFound==false, otherwise they are only set if they are found.

static MLDataType ml::DICOMAccessories::getMLDataTypeFromDCMTree ( DCMTree::Const_TreePtr  treePtr  )  [static]

Determines the ML data type of pixel data in the given DICOM tree treePtr.

On success the data type is returned, otherwise ML_INVALID_DATA_TYPE.

static const void* ml::DICOMAccessories::getPixelDataPtrFromTree ( DCMTree::Const_TreePtr  treePtr,
size_t *  valSizeInBytes = NULL 
) [static]

Returns the pointer to the pixel data tag value.

If data is not found then NULL is returned. If valSizeInBytes is non NULL the *valSizeInBytes is set to the size of the data chunk in bytes. This function does not handle multi frame pixel tags, NULL is returned in that case.

static const SpectComplex* ml::DICOMAccessories::getSpectDataPtrFromTree ( DCMTree::Const_TreePtr  treePtr,
size_t *  valSizeInBytes = NULL 
) [static]

Returns the pointer to the data value in the tag (0x7fe1, 0x1010) or - if that one does not exist - from the tag (0x5600, 0x0020).

If not data is found NULL is returned. If valSizeInBytes is non NULL the *valSizeInBytes is set to the size of the data chunk in bytes. This function does not handle multi frame pixel tags, NULL is returned in that case.

static void ml::DICOMAccessories::getSpectDICOMImageProperties ( DCMTree::Const_TreePtr  treePtr,
const std::string &  fileName,
PagedImg outInfos,
vec4 rotAxisAndRadians,
vec3 ipp,
vec3 relMRSPositionVector,
vec3 mrsPositionVector,
vec3 voiVector,
vec3 fovVector,
bool  useOldWorldMatrixCalculation 
) [static]

Extract spectroscopy image properties and some other infos from the passed DICOM tree.

Note that this function does not set or handle the DICOM tree or other image property extensions. They have to be added be the caller.

Parameters:
treePtr The DICOM tree all tags are extracted from to set up the image properties.
fileName The name of the DICOM file given as treePtr. This is also stored in outInfos to be able to created related target file from it.
outInfos The PagedImg properties to be set up from the treePtr tags. param rotAxisAndRadians TODO param ipp TODO param relMRSPositionVector TODO param mrsPositionVector TODO param voiVector TODO param fovVector TODO
useOldWorldMatrixCalculation If enabled then for standard DICOM files the original world matrix calculation is used as implemented in LoadRawSiemensSpectData. If disabled (the default) then the normal DICOM world matrix calculation is used.
Returns:
outInfos will be set up from the treePtr tags if possible. On success outInfos.upToDate() will be true, on failure it will be set out of date.

static std::string ml::DICOMAccessories::getTagValue ( DCMTree::Const_TreePtr  treePtr,
DCMTree::RawTagId  tagId,
bool  useNumericTagValueSorting 
) [static]

Return tag value of first tag with id tagId in the DICOM tree treePtr as string if it exists, otherwise return an empty string.

static size_t ml::DICOMAccessories::getTripleTag ( DCMTree::Const_TreePtr  treePtr,
DCMTree::RawTagId  tagId,
double &  ippX,
double &  ippY,
double &  ippZ,
double  initX,
double  initY,
double  initZ 
) [static]

Returns the given DICOM tag as three double values; all values which can not be retrieved are returned as values given by the corresponding init* values.

The number of valid coordinates is returned, or 0 if no one or the tag is found.

static size_t ml::DICOMAccessories::getVoxelSize ( DCMTree::Const_TreePtr  treePtr,
double &  voxSizeX,
double &  voxSizeY,
double &  voxSizeZ,
bool  replaceOnlyIfFound,
bool *  isPrecise = NULL,
std::vector< DCMTree::RawTagId > *  usedTags = NULL 
) [static]

Determine the voxel size from the DICOM tags and returns the number of found extents.

All not found extents are filled with 1 if replaceOnlyIfFound==false, otherwise they are only set if they are found.

Parameters:
isPrecise If this is passed non NULL then its return value is set to true if the standard DICOM tags could be retrieved which determine a precise voxel spacing. If tags were used which do not describe the physically exact spacing then false is returned.
usedTags If this is passed non NULL then the DICOM tag ids used to determine the voxel size are returned in the vector.

static bool ml::DICOMAccessories::guessMinMaxRangeFromDICOMTags ( DCMTree::Const_TreePtr  treePtr,
MLdouble minPixVal,
MLdouble maxPixVal 
) [static]

Try to guess a min/max range from dicom tags for the case that they cannot be determined in another way.

The pixel data type, the used bits, the highest bit and stored bit tags can at least limit the min/max range to a useful range if other approaches failed.

Parameters:
treePtr The tree to be checked for min/max pixel tags.
minPixVal The found minimum value if return value is true, otherwise ML_DOUBLE_MAX.
maxPixVal The found maximum value if return value is true, otherwise -ML_DOUBLE_MAX.
Returns:
true if both min/max values were set, false if any of both could not be determined.

static bool ml::DICOMAccessories::hasMFPixelDataTag ( DCMTree::Const_TreePtr  treePtr,
DCMTree::Const_TagPtr tagPtr 
) [static]

Returns true if the tree has a multi frame pixel data tag containing many frames or false otherwise.

In case of true tagPtr is set to the tag which then can be cast to a MLPixelTag, otherwise the tag is reset and must not be cast.

static bool ml::DICOMAccessories::hasMrsASCIITag ( DCMTree::Const_TreePtr  treePtr  )  [static]

Returns true if the spectroscopy ASCII tags (0x0029, 0x1120) or (0x0029, 0x1220) are available in treePtr, otherwise false is returned.

static MLint ml::DICOMAccessories::parseUserTagIdStringVal ( const std::string &  tagIdStrVal  )  [static]

Parses the given string tagIdStrVal and returns it as positive unsigned integer value if the parsed value looks like a valid raw tag id.

Then the return value can be cast to a 32 bit unsigned raw tag id. If parsing failed then a negative value is returned. The tag id string must have a format like (ABCD, EFGH) where ABCD and EFGH are hexadecimal numbers describing 16 bit unsigned integers where ABCD are the high and EFGH are the low bits of the word.

static bool ml::DICOMAccessories::removePixelDataTag ( DCMTree::TreePtr  treePtr  )  [static]

Removes the pixel data data tag DCMTree_PixelData from the treePtr if it can be found.

Returns:
true is returned if a tags was removed, false otherwise.

static bool ml::DICOMAccessories::removeSpectDataTag ( DCMTree::TreePtr  treePtr  )  [static]

Removes the first spectroscopy data tag (0x7fe1, 0x1010) or - if that one does not exist - the tag (0x5600, 0x0020).

Returns:
true is returned if a tags was removed, false otherwise.

static void ml::DICOMAccessories::setWorldMatrixFromDcmTree ( DCMTree::Const_TreePtr  treePtr,
PagedImg outInfos 
) [static]

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.

If no or only partial values are found then default settings are used instead.

static bool ml::DICOMAccessories::updateMinMaxFromDICOMTags ( DCMTree::Const_TreePtr  treePtr,
MLdouble minPixVal,
MLdouble maxPixVal 
) [static]

Checks for min/max DICOM tags on top level and - if both are found - updates the passed min/max values.

Parameters:
treePtr The tree to be checked for min/max pixel tags.
minPixVal The minimum value to be updated if a smaller pixel tag is found.
maxPixVal The maximum value to be updated if a larger pixel tag is found.
Returns:
true if both min/max pixel tags were found, false if any of both was not found. minPixVal and maxPixVal are left unchanged if false is returned.


The documentation for this class was generated from the following file:

Generated on Sat Sep 3 18:39:50 2011 for MeVisLab Toolbox Reference by  doxygen 1.5.8