MeVisLab Toolbox Reference
mlDcmtkMLConverters.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
5
11//----------------------------------------------------------------------------------
12#ifndef __mlDcmtkMLConverters_H
13#define __mlDcmtkMLConverters_H
14
16
17#include <CSOBase/CSOList.h>
19#include <DCMTree_Tree.h>
25#include <mlDicomTree.h>
26#include <string>
27
28ML_START_NAMESPACE
29
30#define SEQUENCES_ITEM_INTERFACES_IMPLEMENTED
31
34typedef void (*progress_callback_t)(MLdouble progress, void* userData);
35
36class MultiFileVolume;
37class RTBase;
42
43//----------------------------------------------------------------------------------
45//----------------------------------------------------------------------------------
47
48public:
49
50#ifdef SEQUENCES_ITEM_INTERFACES_IMPLEMENTED
54 DRTStructureSetIODBase& rtStruct,
55 std::string* errVal=NULL,
56 progress_callback_t progressCB = NULL,
57 void* userData = NULL);
58
63 DcmDRTStructureSetROISequenceInterface* structureSetROISequence,
64 DcmDRTROIContourSequenceInterface* roiContourSequence,
66 DcmDRTRTDoseROISequenceInterface* rtDoseROISequencePtr=NULL,
67 std::string* errVal=NULL,
68 progress_callback_t progressCB = NULL,
69 void* userData = NULL);
70
71
75 DRTStructureSetIODBase& rtStruct,
76 std::string* errVal=NULL,
77 progress_callback_t progressCB = NULL,
78 void* userData = NULL);
79
82 /*
83 static bool convertImageToDRTDoseIODBase(ml::PagedImage* image,
84 DRTDoseIODBase& rtStruct,
85 std::string* errVal=NULL,
86 progress_callback_t progressCB = NULL,
87 void* userData = NULL);
88 */
89#endif
90
91
95 std::string* errVal);
96
98 std::string filename,
99 std::string* errVal,
100 DCMTree::StructuredMFPtr altSmfPtr);
101
103 DCMTree::TreePtr treePtr,
104 std::string*errVal);
105
115 bool cloneNonConstTree=true,
116 bool alsoUseConstClones=false);
117
121 template <typename RT_OBJ_TYPE>
122 static inline RT_OBJ_TYPE *createTypedRTObjectFromBase(Base *basePtrVal,
123 bool cloneNonConstTree=true,
124 bool alsoUseConstClones=false)
125 {
126 DicomTree *refCountedInTree = mlbase_cast<DicomTree*>(basePtrVal);
127 RTBase* inputRTBase = createRTBaseFromDCMTreeRefCounted(refCountedInTree, cloneNonConstTree, alsoUseConstClones);
128 return mlbase_cast<RT_OBJ_TYPE*>(inputRTBase);
129 }
130
131};
132
133ML_END_NAMESPACE
134
135#endif // __mlDcmtkMLConverters_H
136
Project global and OS specific declarations.
#define MLDCMTKMLCONVERTERS_EXPORT
Base object class for passing DRTStructureSetIOD objects between MeVisLab modules.
Class to provide access to DRTROIContourSequence.
Class to provide access to DRTRTDoseROISequence.
Class to provide access to DRTRTROIObservationsSequence.
Class to provide access to DRTStructureSetROISequence.
The tool function class DcmtkMLConverters.
static bool convertDRTStructureSetIODBaseToCSOList(CSOList &csoList, DRTStructureSetIODBase &rtStruct, std::string *errVal=NULL, progress_callback_t progressCB=NULL, void *userData=NULL)
static bool convertDRTStructureSetROISequenceToCSOList(CSOList &csoList, DcmDRTStructureSetROISequenceInterface *structureSetROISequence, DcmDRTROIContourSequenceInterface *roiContourSequence, DcmDRTRTROIObservationsSequenceInterface *rtRoiObservationSeq, DcmDRTRTDoseROISequenceInterface *rtDoseROISequencePtr=NULL, std::string *errVal=NULL, progress_callback_t progressCB=NULL, void *userData=NULL)
static MultiFileVolume * createVolumeReferenceFromFile(DICOMCachedIOFileHandle filename, std::string *errVal)
static bool convertCSOListToDRTStructureSetIODBase(CSOList &csoList, DRTStructureSetIODBase &rtStruct, std::string *errVal=NULL, progress_callback_t progressCB=NULL, void *userData=NULL)
static void fillImageWithPixelData(MultiFileVolume &newVolume, DCMTree::TreePtr treePtr, std::string *errVal)
static RT_OBJ_TYPE * createTypedRTObjectFromBase(Base *basePtrVal, bool cloneNonConstTree=true, bool alsoUseConstClones=false)
static RTBase * createRTBaseFromDCMTreeRefCounted(DicomTree *refCountedDCMTree, bool cloneNonConstTree=true, bool alsoUseConstClones=false)
static void constructNewSMFTreeFor(MultiFileVolume &newVolume, std::string filename, std::string *errVal, DCMTree::StructuredMFPtr altSmfPtr)
DcmtkBase derived base object class for base objects that wrap RT related objects.
Definition mlRTBase.h:34
ToTypePtr mlbase_cast(ml::Base *from)
Template function to allow type-safe casting of a base object to a derived object.
Definition mlBase.h:176
Base object class for passing DRTStructureSetIOD objects between MeVisLab modules.
Class to provide access to DRTROIContourSequence.
Class to provide access to DRTRTDoseROISequence.
Class to provide access to DRTRTROIObservationsSequence.
Class to provide access to DRTStructureSetROISequence.
double MLdouble
Definition mlTypeDefs.h:216
boost::shared_ptr< StructuredMF > StructuredMFPtr
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.
Definition DCMTree_Lib.h:66
DICOMCachedIOFileHandleBase< char > DICOMCachedIOFileHandle
"Forward" to DICOMCachedIOFileHandle.
void(* progress_callback_t)(MLdouble progress, void *userData)