MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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>
18#include <mlDcmtkBaseObjects.h>
19#include <mlRTBase.h>
21#include <DCMTree_Tree.h>
27#include <mlDicomTree.h>
28#include <string>
29
31
32#define SEQUENCES_ITEM_INTERFACES_IMPLEMENTED
33
36typedef void (*progress_callback_t)(MLdouble progress, void* userData);
37
38class MultiFileVolume;
43
44//----------------------------------------------------------------------------------
46//----------------------------------------------------------------------------------
48
49public:
50
51#ifdef SEQUENCES_ITEM_INTERFACES_IMPLEMENTED
56 std::string* errVal=NULL,
57 progress_callback_t progressCB = NULL,
58 void* userData = NULL);
59
68 std::string* errVal=NULL,
69 progress_callback_t progressCB = NULL,
70 void* userData = NULL);
71
72
77 std::string* errVal=NULL,
78 progress_callback_t progressCB = NULL,
79 void* userData = NULL);
80
83 /*
84 static bool convertImageToDRTDoseIODBase(ml::PagedImage* image,
85 DRTDoseIODBase& rtStruct,
86 std::string* errVal=NULL,
87 progress_callback_t progressCB = NULL,
88 void* userData = NULL);
89 */
90#endif
91
92
96 std::string* errVal);
97
99 std::string filename,
100 std::string* errVal,
102
104 DCMTree::TreePtr treePtr,
105 std::string*errVal);
106
110 template <typename RT_OBJ_TYPE>
112 bool cloneNonConstTree=true,
113 bool alsoUseConstClones=false)
114 {
116
120 if (mutableTree) {
121 nonConstInputDCMTree = mutableTree->getMutableTree();
122 }
124 // Non non-constant tree available. Check whether we can use a copy of a constant one.
129 }
130 }
131 }
132 else{
133 // We have a non-constant tree, make use of and copy it if requested.
136 }
137 }
138
140 std::string errVal;
141 //return DcmtkBaseObjects::createBaseObject<RT_OBJ_TYPE>(nonConstInputDCMTree, &errVal);
143 DcmtkBaseObjects::createBaseObject(retObj, nonConstInputDCMTree, &errVal);
144 return retObj;
145 }
146 }
147 return nullptr;
148 }
149
150};
151
153
154#endif // __mlDcmtkMLConverters_H
155
Project global and OS specific declarations.
#define MLDCMTKMLCONVERTERS_EXPORT
Class representing general ML objects that support import/export via strings (setPersistentState() an...
Definition mlBase.h:63
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
Definition CSOList.h:61
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)
Converts an RTStruct object to a CSOList object and returns true on success, false otherwise.
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)
Converts an RTStruct object to a CSOList object and returns true on success, false otherwise.
static MultiFileVolume * createVolumeReferenceFromFile(DICOMCachedIOFileHandle filename, std::string *errVal)
Converts an image object to RTDose object and returns true on success, false otherwise.
static bool convertCSOListToDRTStructureSetIODBase(CSOList &csoList, DRTStructureSetIODBase &rtStruct, std::string *errVal=NULL, progress_callback_t progressCB=NULL, void *userData=NULL)
Converts a CSOList object to RTStruct object and returns true on success, false otherwise.
static void fillImageWithPixelData(MultiFileVolume &newVolume, DCMTree::TreePtr treePtr, std::string *errVal)
static RT_OBJ_TYPE createTypedRTObjectFromBase(Base *basePtrVal, bool cloneNonConstTree=true, bool alsoUseConstClones=false)
Tries to get a DicomTree from basePtrVal and to convert it to an RT object of type RT_OBJ_TYPE.
static void constructNewSMFTreeFor(MultiFileVolume &newVolume, std::string filename, std::string *errVal, DCMTree::StructuredMFPtr altSmfPtr)
The DicomTree class can be used to transport a DCMTree::Const_TreePtr as a ml::RefCountedBase object.
Definition mlDicomTree.h:30
Management class used by DirectDicomImport to create, represent and describe volumes composed of mult...
The DicomTree class can be used to transport a DCMTree::Const_TreePtr as an ml::RefCountedBase object...
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 toolkit and factory class DcmtkBaseObjects.
DcmtkBase derived base object class for base objects that wrap RT related objects.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
double MLdouble
Definition mlTypeDefs.h:217
boost::shared_ptr< StructuredMF > StructuredMFPtr
boost::shared_ptr< const Tree > Const_TreePtr
Definition DCMTree_Lib.h:68
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.
Definition DCMTree_Lib.h:67