MeVisLab Toolbox Reference
mlDcmtkAccessories.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
5
10//----------------------------------------------------------------------------------
11
12#ifndef __mlDcmtkAccessories_H
13#define __mlDcmtkAccessories_H
14
15#ifndef __MLDcmtkAccessoriesSystem_H
17#endif
18
19// Suppress warning garbage from dcmtk includes.
20#ifdef WIN32
21 #pragma warning( push, 3 )
22 #pragma warning ( disable: 4267 )
23#endif
24
25// dcmrt includes
26
27#include <dcmtk/dcmsr/dsrdoc.h>
28#include <dcmtk/dcmpstat/dvpstat.h>
29
30#ifdef WIN32
31 #pragma warning( pop )
32#endif
33
34#include <mlModuleIncludes.h>
35#include <boost/shared_ptr.hpp>
36#include <DCMTree_Tree.h>
37#include <DCMTree_DicomTags.h>
38#include <DCMTree_Tag.h>
39#include "DCMTree_Lib.h"
40#include "DCMTree_TagInfo.h"
41#include "DCMTree_Value.h"
42#include "DCMTree_Defines.h"
43#include "DCMTree_OFFIS_Defines.h"
45
47
49template<typename CT>
50class DICOMCachedIOFileHandleBase;
51typedef DICOMCachedIOFileHandleBase<char> DICOMCachedIOFileHandle;
52
99};
100
101//----------------------------------------------------------------------------------
103//----------------------------------------------------------------------------------
105
106 public:
107
108
110 static bool loadDcmFile(const std::string& fName, DcmFileFormat& dcmfile, std::string* errVal=NULL);
113
119 static void tokenize(const OFString& str, std::vector<OFString>& tokens, const OFString& delimiter=" ");
120
125 static std::vector<double> stringToDoubleVector(const std::string &str,
126 const std::string &delimiters);
127
129 static bool loadDcmTree(DICOMCachedIOFileHandle &fileHandle, DCMTree::TreePtr& dcmTree, std::string* errVal=NULL);
130
131
133 static OFString getModality(DCMTree::TreePtr& dcmTree, std::string *errVal=NULL);
134 static OFString getSopClassUid(DCMTree::TreePtr& dcmTree, std::string* errVal);
135
144
145
146protected:
147
148};
149
151
152#endif
Project global and OS specific declarations.
#define MLDCMTKACCESSORIES_EXPORT
Class collecting some DICOM helper functions.
static DCMTree::TreePtr createEmptyDRTPlanIOD()
static DCMTree::TreePtr createEmptyDRTTreatmentSummaryRecordIOD()
static OFString getModality(DCMTree::TreePtr &dcmTree, std::string *errVal=NULL)
Return the modality of a given Dicom tree fileHandle which represents a Dicom RT object.
static DCMTree::TreePtr createNewDicomTree()
static OFString getSopClassUid(DCMTree::TreePtr &dcmTree, std::string *errVal)
static DCMTree::TreePtr createEmptyDRTImageIOD()
static bool loadDcmTree(DICOMCachedIOFileHandle &fileHandle, DCMTree::TreePtr &dcmTree, std::string *errVal=NULL)
Load a Dicom Tree from the given fileHandle. The tree will be cached for further queries in the MLDIC...
static bool loadDcmFile(const std::string &fName, DcmFileFormat &dcmfile, std::string *errVal=NULL)
Will be deleted when the SRDOC and PresentationState gets converted.
static DCMTree::TreePtr createEmptyDRTStructureSetIOD()
static std::vector< double > stringToDoubleVector(const std::string &str, const std::string &delimiters)
Converts string to a vector<double>.
static DCMTree::TreePtr createEmptyDRTIonPlanIOD()
static DCMTree::TreePtr createEmptyDRTIonBeamsTreatmentRecordIOD()
static DCMTree::TreePtr createEmptyDRTDoseIOD()
static void tokenize(const OFString &str, std::vector< OFString > &tokens, const OFString &delimiter=" ")
Tokenize a given string by splitting it at delimiters.
static OFString getModality(DcmFileFormat &dcmfile, std::string *errVal=NULL)
Will be deleted when the SRDOC and PresentationState gets converted.
A collection of tools related to DICOM tags and dictionaries.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Definition DCMTree_Lib.h:72
@ DCM_GENERALEQUIPMENTMODULE_TYPE
@ DCM_CALCULATEDDOSEREFERENCERECORDMODULE_TYPE
@ DCM_RTIONTOLERANCETABLESMODULE_TYPE
@ DCM_VOILUTMODULE_TYPE
@ DCM_RTDVHMODULE_TYPE
@ DCM_ROICONTOURMODULE_TYPE
@ DCM_APPROVALMODULE_TYPE
@ DCM_IMAGEPLANEMODULE_TYPE
@ DCM_CINEMODULE_TYPE
@ DCM_RTIONBEAMSSESSIONRECORDMODULE_TYPE
@ DCM_RTPATIENTSETUPMODULE_TYPE
@ DCM_RTBRACHYAPPLICATIONSETUPSMODULE_TYPE
@ DCM_RTPRESCRIPTIONMODULE_TYPE
@ DCM_RTIONBEAMSMODULE_TYPE
@ DCM_RTROIOBSERVATIONSMODULE_TYPE
@ DCM_PATIENTMODULE_TYPE
@ DCM_RTGENERALTREATMENTRECORDMODULE_TYPE
@ DCM_DEVICEMODULE_TYPE
@ DCM_MODALITYLUTMODULE_TYPE
@ DCM_NUM_MODULE_TYPES
@ DCM_CONTRASTBOLUSMODULE_TYPE
@ DCM_RTTREATMENTSUMMARYRECORDMODULE_TYPE
@ DCM_PATIENTSTUDYMODULE_TYPE
@ DCM_STRUCTURESETMODULE_TYPE
@ DCM_GENERALSTUDYMODULE_TYPE
@ DCM_RTIMAGEMODULE_TYPE
@ DCM_FRAMEOFREFERENCEMODULE_TYPE
@ DCM_RTGENERALPLANMODULE_TYPE
@ DCM_MEASUREDDOSEREFERENCERECORDMODULE_TYPE
@ DCM_IMAGEPIXELMODULE_TYPE
@ DCM_CLINICALTRIALSERIESMODULE_TYPE
@ DCM_OVERLAYPLANEMODULE_TYPE
@ DCM_CLINICALTRIALSUBJECTMODULE_TYPE
@ DCM_MULTIFRAMEOVERLAYMODULE_TYPE
@ DCM_CLINICALTRIALSTUDYMODULE_TYPE
@ DCM_RTTREATMENTMACHINERECORDMODULE_TYPE
@ DCM_RTDOSEROIMODULE_TYPE
@ DCM_RTTOLERANCETABLESMODULE_TYPE
@ DCM_RTBEAMSMODULE_TYPE
@ DCM_SOPCOMMONMODULE_TYPE
@ DCM_RTDOSEMODULE_TYPE
@ DCM_RTSERIESMODULE_TYPE
@ DCM_RTFRACTIONSCHEMEMODULE_TYPE
@ DCM_GENERALIMAGEMODULE_TYPE
@ DCM_MULTIFRAMEMODULE_TYPE
DICOMCachedIOFileHandleBase< char > DICOMCachedIOFileHandle
"Forward" to DICOMCachedIOFileHandle.