MeVisLab Toolbox Reference
mlDicomTreeAccess.h File Reference

Go to the source code of this file.

Namespaces

 ml
 Main documentation file for ML users and developers.
 

Macros

#define ML_DICOM_TREE_IMAGE_PROPERTY_EXTENSION_CLASS_NAME    ml::DicomTreeImagePropertyExtension::getClassTypeId()->getName()
 Macro which resolves the class name of DicomTreeImagePropertyExtension. More...
 
#define ML_GET_DICOM_TREE_CONST(constTreePtr, medicalImageProperties)
 Macro which assigns the dicom tree contained in medicalImageProperties (or PagedImg) to constTreePtr. More...
 
#define ML_GET_DICOM_TREE_FROM_FIELD_CONST(constTreePtr, mlField)
 Macro which assigns the dicom tree contained in the image of the mlfield to constTreePtr. More...
 
#define ML_GET_DICOM_TAG_BY_NAME_CONST(constTagPtr, constTreePtr, name)
 Macro which tries to assign the dicom tag with the given name in constTreePtr to constTagPtr. More...
 

Functions

MLDICOM_TREE_IMAGE_PROPERTY_EXTENSION_EXPORT DCMTree::Const_TreePtr ml::getDicomTreeFromImagePropertyExtension (const ImagePropertyExtension *dicomTreeImagePropertyExtensionPtr)
 Casts the ImagePropertyExtension pointer into a DicomTreeImagePropertyExtension pointer and returns the contained dicom tree pointer. More...
 
MLDICOM_TREE_IMAGE_PROPERTY_EXTENSION_EXPORT DCMTree::Const_TagPtr ml::getDicomTagByName (const ImagePropertyExtension *imagePropertyExtensionPtr, const std::string &tagName)
 Returns the tag with the given name from the property extension. If it is not found, the pointer will be NULL. More...
 
MLDICOM_TREE_IMAGE_PROPERTY_EXTENSION_EXPORT bool ml::getTagIdByATString (const std::string &atString, DCMTree::TagId &tagId)
 Gets the tag id for (group,element) string (AT format). More...
 
MLDICOM_TREE_IMAGE_PROPERTY_EXTENSION_EXPORT bool ml::MLIsATString (const std::string &supposedATString)
 Checks if the given string is a well-formed AT string. More...
 

Macro Definition Documentation

◆ ML_DICOM_TREE_IMAGE_PROPERTY_EXTENSION_CLASS_NAME

#define ML_DICOM_TREE_IMAGE_PROPERTY_EXTENSION_CLASS_NAME    ml::DicomTreeImagePropertyExtension::getClassTypeId()->getName()

Macro which resolves the class name of DicomTreeImagePropertyExtension.

Definition at line 47 of file mlDicomTreeAccess.h.

◆ ML_GET_DICOM_TAG_BY_NAME_CONST

#define ML_GET_DICOM_TAG_BY_NAME_CONST (   constTagPtr,
  constTreePtr,
  name 
)
Value:
if (constTreePtr) { \
try { \
constTagPtr = treePtr->getTag(tagName); \
} catch (DCMTree::Exception&) { } \
} else if (constTagPtr) { \
constTagPtr = DCMTree::Const_TagPtr(); \
}
Exception class for DCMTree.
boost::shared_ptr< const Tag > Const_TagPtr
Definition: DCMTree_Lib.h:63

Macro which tries to assign the dicom tag with the given name in constTreePtr to constTagPtr.

If constTreePtr is NULL or the tag could not be found then constTagPtr is set to NULL.

Definition at line 85 of file mlDicomTreeAccess.h.

◆ ML_GET_DICOM_TREE_CONST

#define ML_GET_DICOM_TREE_CONST (   constTreePtr,
  medicalImageProperties 
)
Value:
const RuntimeType* runtimeType = DicomTreeImagePropertyExtension::getClassTypeId(); \
const ImagePropertyExtensionContainer& propContainer = medicalImageProperties->getConstImagePropertyContainer(); \
const DicomTreeImagePropertyExtension* propExtension = static_cast<const DicomTreeImagePropertyExtension*>( \
propContainer.getFirstEntryOfType(runtimeType)); \
constTreePtr = getDicomTreeFromImagePropertyExtension(propExtension);
MLDICOM_TREE_IMAGE_PROPERTY_EXTENSION_EXPORT DCMTree::Const_TreePtr getDicomTreeFromImagePropertyExtension(const ImagePropertyExtension *dicomTreeImagePropertyExtensionPtr)
Casts the ImagePropertyExtension pointer into a DicomTreeImagePropertyExtension pointer and returns t...

Macro which assigns the dicom tree contained in medicalImageProperties (or PagedImg) to constTreePtr.

Definition at line 53 of file mlDicomTreeAccess.h.

◆ ML_GET_DICOM_TREE_FROM_FIELD_CONST

#define ML_GET_DICOM_TREE_FROM_FIELD_CONST (   constTreePtr,
  mlField 
)
Value:
{ \
\
const ml::ImagePropertyExtension* extension = NULL; \
\
reinterpret_cast<void**>( \
const_cast<ml::ImagePropertyExtension**>(&extension))); \
if (errorCode){ \
std::cerr << "Failed to get dicom image property extension (" \
<< MLGetErrorCodeDescription(errorCode) << ")" << std::endl; \
} else if(extension != NULL) { \
constTreePtr = ml::getDicomTreeFromImagePropertyExtension(extension); \
} \
}
Base class from which one can derive own image properties.
#define mlField
A macro name for a void pointer to a field in the ML to make pointer more readable.
Definition: mlAPI.h:54
MLEXPORT MLErrorCode MLImageGetFirstImagePropertyExtensionByType(mlField *outField, const char *imagePropertyTypeClassName, void **imagePropertyExtension)
Returns the first image property extension imagePropertyExtension (as void-Pointer) of type imageProp...
#define ML_DICOM_TREE_IMAGE_PROPERTY_EXTENSION_CLASS_NAME
Macro which resolves the class name of DicomTreeImagePropertyExtension.
ML_UTILS_EXPORT const char * MLGetErrorCodeDescription(MLErrorCode errCode)
String names for each error code.

Macro which assigns the dicom tree contained in the image of the mlfield to constTreePtr.

Access to mlAPI.h is necessary for this macro to work!

Definition at line 64 of file mlDicomTreeAccess.h.