GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

gdcmSegment.h
Go to the documentation of this file.
1 /*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13 =========================================================================*/
14 #ifndef GDCMSEGMENT_H
15 #define GDCMSEGMENT_H
16
17 #include <vector>
18
19 #include <gdcmObject.h>
20 #include <gdcmSurface.h>
21 #include "gdcmSegmentHelper.h"
22
23 namespace gdcm
24 {
25
33 class GDCM_EXPORT Segment : public Object
34 {
35 public:
36
37 typedef std::vector< SmartPointer< Surface > > SurfaceVector;
38
39 typedef enum {
40 MANUAL = 0,
41 AUTOMATIC,
42 ALGOType_END
43 } ALGOType;
44
45 static const char * GetALGOTypeString(ALGOType type);
46 static ALGOType GetALGOType(const char * type);
47
48
49 Segment();
50
51 virtual ~Segment();
52
53 //** Segment getters/setters **//
54 unsigned short GetSegmentNumber() const;
55 void SetSegmentNumber(const unsigned short num);
56
57 const char * GetSegmentLabel() const;
58 void SetSegmentLabel(const char * label);
59
60 const char * GetSegmentDescription() const;
61 void SetSegmentDescription(const char * description);
62
63 SegmentHelper::BasicCodedEntry const & GetAnatomicRegion() const;
64 SegmentHelper::BasicCodedEntry & GetAnatomicRegion();
65 void SetAnatomicRegion(SegmentHelper::BasicCodedEntry const & BSE);
66
67 SegmentHelper::BasicCodedEntry const & GetPropertyCategory() const;
68 SegmentHelper::BasicCodedEntry & GetPropertyCategory();
69 void SetPropertyCategory(SegmentHelper::BasicCodedEntry const & BSE);
70
71 SegmentHelper::BasicCodedEntry const & GetPropertyType() const;
72 SegmentHelper::BasicCodedEntry & GetPropertyType();
73 void SetPropertyType(SegmentHelper::BasicCodedEntry const & BSE);
74
75 ALGOType GetSegmentAlgorithmType() const;
76 void SetSegmentAlgorithmType(ALGOType type);
77 void SetSegmentAlgorithmType(const char * typeStr);
78
79 const char * GetSegmentAlgorithmName() const;
80 void SetSegmentAlgorithmName(const char * name);
81
82 //** Surface getters/setters **//
83 unsigned long GetSurfaceCount();
84 void SetSurfaceCount(const unsigned long nb);
85
86 SurfaceVector const & GetSurfaces() const;
87 SurfaceVector & GetSurfaces();
88
89 SmartPointer< Surface > GetSurface(const unsigned int idx = 0) const;
90
91 void AddSurface(SmartPointer< Surface > surface);
92
93 protected :
94 //** Segment members **//
95 //0062 0004 US 1 Segment Number
96 unsigned short SegmentNumber;
97 //0062 0005 LO 1 Segment Label
98 std::string SegmentLabel;
99 //0062 0006 ST 1 Segment Description
100 std::string SegmentDescription;
101
102 // General Anatomic Region
103 SegmentHelper::BasicCodedEntry AnatomicRegion;
104 // Property Category Code
105 SegmentHelper::BasicCodedEntry PropertyCategory;
106 // Property Type Code
107 SegmentHelper::BasicCodedEntry PropertyType;
108
109 //0062 0008 CS 1 Segment Algorithm Type
110 ALGOType SegmentAlgorithmType;
111 //0062 0009 LO 1 Segment Algorithm Name
112 std::string SegmentAlgorithmName;
113
114 //** Surface members **//
115 //0066 002a UL 1 Surface Count
116 unsigned long SurfaceCount;
117
118 SurfaceVector Surfaces;
119
120 private :
121 void ComputeSurfaceCount();
122 };
123
124 }
125
126 #endif // GDCMSEGMENT_H