MeVisLab Toolbox Reference
mlContourToCSO.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code
3 //----------------------------------------------------------------------------------
5 
10 //----------------------------------------------------------------------------------
11 #ifndef __mlContourToCSO_H
12 #define __mlContourToCSO_H
13 
15 
16 #include <mlVector3.h>
17 #include <CSOBase/CSOList.h>
19 #include <vector>
20 #include <map>
21 #include <utility>
22 
23 typedef std::map<std::string, std::string> TStrStrMap;
24 typedef std::pair<std::string, std::string> TStrStrPair;
25 
26 ML_START_NAMESPACE
27 
28 class CSO;
29 class CSOGroup;
30 
32 {
33 public:
36  ContourToCSO(CSOListPtr csoList);
37 
41  void addCSO(CSOGroup *csoGroup, const DcmDRTContourSequenceInterface::Item &contour);
42 
43 private:
44  void populateDcmrtGeometricTypeToCSOTypeMap();
45  void retrieveDataFromContour(const DcmDRTContourSequenceInterface::Item &contour);
46  void retrieveContourData(const DcmDRTContourSequenceInterface::Item &contour);
47  void retrieveCSOSubType(const DcmDRTContourSequenceInterface::Item &contour);
48 
49  void addPointsToCSO(CSO *cso);
50  void addFirstPoint(CSO *cso);
51  void addIntermediatePoints(CSO *cso);
52  void addLastPoint(CSO *cso);
53  void closeCSO(CSO *cso);
54  Vector3 getPoint(MLuint idx);
55  void setCSOProperties(CSO *cso);
56 
57  CSOListPtr _csoList;
58  std::string _csoSubType;
59  MLuint32 _numContourPoints;
60  std::vector<double> _contourData;
61  TStrStrMap _dcmrtGeometricTypeToCSOTypeMap;
62 
64 };
65 
66 ML_END_NAMESPACE
67 
68 #endif // mlContourToCSO
Project global and OS specific declarations.
#define MLDCMTKMLCONVERTERS_EXPORT
A CSOGroup comprises a number of CSOs, which themselves can be in a number of different CSOGroups.
Definition: CSOGroup.h:38
The CSO represents a contour segmentation object.
Definition: CSO.h:44
void addCSO(CSOGroup *csoGroup, const DcmDRTContourSequenceInterface::Item &contour)
Adds new CSO to CSOList and combines it with CSOGroup.
ContourToCSO(CSOListPtr csoList)
Constructor.
#define ML_DISALLOW_COPY_AND_ASSIGN(className)
Defines basic macros.
Definition: mlMacros.h:23
std::map< std::string, std::string > TStrStrMap
std::pair< std::string, std::string > TStrStrPair
Class to provide access to DRTContourSequence.
unsigned int MLuint32
Definition: mlTypeDefs.h:191
MLuint64 MLuint
An unsigned ML integer type with at least 64 bits used for index calculations on very large images ev...
Definition: mlTypeDefs.h:594
std::map< std::string, std::string > TStrStrMap