MeVisLabToolboxReference
MeVis/Foundation/Sources/MLDicomTreeImagePropertyExtension/mlDicomTreeImagePropertyExtension.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00005 
00010 // Introduces a ImagePropertyExtension managing a DICOM tree referenced with 
00011 // a shared pointer.
00012 //----------------------------------------------------------------------------------
00013 
00014 #ifndef __mlDicomTreeImagePropertyExtension_H
00015 #define __mlDicomTreeImagePropertyExtension_H
00016 
00017 // Resolve platform independencies.
00018 #ifndef __MLDicomTreeImagePropertyExtensionSystem_H
00019 #include "MLDicomTreeImagePropertyExtensionSystem.h"
00020 #endif
00021 
00022 #ifndef __mlImagePropertyExtension_H
00023 #include "mlImagePropertyExtension.h"
00024 #endif
00025 
00026 // Include DicomTree support for the ML.
00027 #include "DCMTree_Dict.h"
00028 #include "DCMTree_Tree.h"
00029 
00030 // These header files are not necessary here, but are usually needed by files
00031 // including this header.
00032 #include <DCMTree_Exception.h>
00033 #include <DCMTree_Tag.h>
00034 
00035 
00036 ML_UTILS_START_NAMESPACE
00037 
00038   // -------------------------------------------------------------------
00044   // -------------------------------------------------------------------
00045   class MLDICOM_TREE_IMAGE_PROPERTY_EXTENSION_EXPORT DicomTreeImagePropertyExtension : public ImagePropertyExtension 
00046   {
00047   public:
00048 
00050     DicomTreeImagePropertyExtension();
00051 
00053     DicomTreeImagePropertyExtension(const DicomTreeImagePropertyExtension &origObj);
00054 
00056     DicomTreeImagePropertyExtension(const DCMTree::Const_TreePtr &initDCMTree, const std::string& fileName);
00057 
00059     virtual ~DicomTreeImagePropertyExtension();
00060 
00062     DicomTreeImagePropertyExtension &operator=(const DicomTreeImagePropertyExtension &origObj);
00063 
00065     const std::string& getFileName() const;
00066 
00068     void setFileName(const std::string& fileName);
00069 
00071     const DCMTree::Const_TreePtr &getDicomTagTree() const;
00072 
00074     void setDicomTagTree(const DCMTree::Const_TreePtr &newTree);
00075 
00077     virtual bool equals(const ImagePropertyExtension &imgPropExt) const;
00078 
00080     virtual ImagePropertyExtension *createClone() const;
00081 
00083     virtual std::string getValueAsString() const;
00084 
00087     virtual MLErrorCode setValueFromString(const std::string &str);
00088 
00089 
00090   private:
00093     DCMTree::Const_TreePtr _dcmTreeSharedPtr;
00094 
00096     std::string _fileName;
00097 
00099     ML_CLASS_HEADER(DicomTreeImagePropertyExtension)
00100   };
00101 
00102 ML_UTILS_END_NAMESPACE
00103 
00104 #endif // __mlDicomTreeImagePropertyExtension_H
00105 
00106