GDCM 2.2.1

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

- File List
- File Members

gdcmSurface.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 GDCMSURFACE_H
15 #define GDCMSURFACE_H
16
17 #include <gdcmObject.h>
18 #include <gdcmDataElement.h>
19 #include <gdcmMeshPrimitive.h>
20 #include "gdcmSegmentHelper.h" // for BasicCodedEntry
21
22 namespace gdcm
23 {
24
31 class GDCM_EXPORT Surface : public Object
32 {
33 public:
34
35 typedef enum {
36 NO = 0,
37 YES,
38 UNKNOWN,
39 STATES_END
40 } STATES;
41
42 static const char * GetSTATESString(STATES state);
43 static STATES GetSTATES(const char * state);
44
50 typedef enum {
51 SURFACE = 0,
52 WIREFRAME,
53 POINTS,
54 VIEWType_END
55 } VIEWType;
56
57 static const char * GetVIEWTypeString(VIEWType type);
58 static VIEWType GetVIEWType(const char * type);
59
60 Surface();
61
62 virtual ~Surface();
63
64 //** Common getters/setters **//
65 unsigned long GetSurfaceNumber() const;
66 void SetSurfaceNumber(const unsigned long nb);
67
68 const char * GetSurfaceComments() const;
69 void SetSurfaceComments(const char * comment);
70
71 bool GetSurfaceProcessing() const;
72 void SetSurfaceProcessing(bool b);
73
74 float GetSurfaceProcessingRatio() const;
75 void SetSurfaceProcessingRatio(const float ratio);
76
77 const char * GetSurfaceProcessingDescription() const;
78 void SetSurfaceProcessingDescription(const char * description);
79
80 SegmentHelper::BasicCodedEntry const & GetProcessingAlgorithm() const;
81 SegmentHelper::BasicCodedEntry & GetProcessingAlgorithm();
82 void SetProcessingAlgorithm(SegmentHelper::BasicCodedEntry const & BSE);
83
84 unsigned short GetRecommendedDisplayGrayscaleValue() const;
85 void SetRecommendedDisplayGrayscaleValue(const unsigned short vl);
86
87 const unsigned short * GetRecommendedDisplayCIELabValue() const;
88 unsigned short GetRecommendedDisplayCIELabValue(const unsigned int idx) const;
89 void SetRecommendedDisplayCIELabValue(const unsigned short vl[3]);
90 void SetRecommendedDisplayCIELabValue(const unsigned short vl, const unsigned int idx = 0);
91 void SetRecommendedDisplayCIELabValue(const std::vector< unsigned short > & vl);
92
93 float GetRecommendedPresentationOpacity() const;
94 void SetRecommendedPresentationOpacity(const float opacity);
95
96 VIEWType GetRecommendedPresentationType() const;
97 void SetRecommendedPresentationType(VIEWType type);
98
99 STATES GetFiniteVolume() const;
100 void SetFiniteVolume(STATES state);
101
102 STATES GetManifold() const;
103 void SetManifold(STATES state);
104
105 SegmentHelper::BasicCodedEntry const & GetAlgorithmFamily() const;
106 SegmentHelper::BasicCodedEntry & GetAlgorithmFamily();
107 void SetAlgorithmFamily(SegmentHelper::BasicCodedEntry const & BSE);
108
109 const char * GetAlgorithmVersion() const;
110 void SetAlgorithmVersion(const char * str);
111
112 const char * GetAlgorithmName() const;
113 void SetAlgorithmName(const char * str);
114
115 //** Points getters/setters **//
116 unsigned long GetNumberOfSurfacePoints() const;
117 void SetNumberOfSurfacePoints(const unsigned long nb);
118
119 const DataElement & GetPointCoordinatesData() const;
120 DataElement & GetPointCoordinatesData();
121
122 void SetPointCoordinatesData(DataElement const & de);
123
127 const float * GetPointPositionAccuracy() const;
128 void SetPointPositionAccuracy(const float * accuracies);
129
130 float GetMeanPointDistance() const;
131 void SetMeanPointDistance(float average);
132
133 float GetMaximumPointDistance() const;
134 void SetMaximumPointDistance(float maximum);
135
139 const float * GetPointsBoundingBoxCoordinates() const;
140 void SetPointsBoundingBoxCoordinates(const float * coordinates);
141
145 const float * GetAxisOfRotation() const;
146 void SetAxisOfRotation(const float * axis);
147
151 const float * GetCenterOfRotation() const;
152 void SetCenterOfRotation(const float * center);
153
154 //** Vectors getters/setters **//
155 unsigned long GetNumberOfVectors() const;
156 void SetNumberOfVectors(const unsigned long nb);
157
158 unsigned short GetVectorDimensionality() const;
159 void SetVectorDimensionality(const unsigned short dim);
160
161 const float * GetVectorAccuracy() const;
162 void SetVectorAccuracy(const float * accuracy);
163
164 const DataElement & GetVectorCoordinateData() const;
165 DataElement & GetVectorCoordinateData();
166
167 void SetVectorCoordinateData(DataElement const & de);
168
169 //** Primitive getters/setters **//
170 MeshPrimitive const & GetMeshPrimitive() const;
171 MeshPrimitive & GetMeshPrimitive();
172
173 void SetMeshPrimitive(MeshPrimitive & mp);
174
175 private:
176
177 //** Common members **//
178
179 //0066 0003 UL 1 Surface Number
180 unsigned long SurfaceNumber;
181 //0066 0004 LT 1 Surface Comments
182 std::string SurfaceComments;
183
184 //0066 0009 CS 1 Surface Processing
185 bool SurfaceProcessing;
186 //0066 000a FL 1 Surface Processing Ratio
187 float SurfaceProcessingRatio;
188 //0066 000b LO 1 Surface Processing Description
189 std::string SurfaceProcessingDescription;
190 // Processing Algorithm Code
191 SegmentHelper::BasicCodedEntry ProcessingAlgorithm;
192
193 //0062 000c US 1 Recommended Display Grayscale Value
194 unsigned short RecommendedDisplayGrayscaleValue;
195 //0062 000d US 3 Recommended Display CIELab Value
196 unsigned short RecommendedDisplayCIELabValue[3];
197
198 // 0066 000c FL 1 Recommended Presentation Opacity
199 float RecommendedPresentationOpacity;
200 // 0066 000d CS 1 Recommended Presentation Type
201 VIEWType RecommendedPresentationType;
202
203 //0066 000e CS 1 Finite Volume
204 STATES FiniteVolume;
205 //0066 0010 CS 1 Manifold
206 STATES Manifold;
207
208 // Algorithm Family Code
209 SegmentHelper::BasicCodedEntry AlgorithmFamily;
210
211 //0066 0031 LO 1 Algorithm Version
212 std::string AlgorithmVersion;
213 //0066 0032 LT 1 Algorithm Parameters
214 //0066 0036 LO 1 Algorithm Name
215 std::string AlgorithmName;
216
217
218 //** Point members **//
219
220 //0066 0015 UL 1 Number of Surface Points
221 unsigned long NumberOfSurfacePoints;
222 //0066 0016 OF 1 Point Coordinates Data
223 DataElement PointCoordinatesData;
224 //0066 0017 FL 3 Point Position Accuracy
225 float * PointPositionAccuracy;
226 //0066 0018 FL 1 Mean Point Distance
227 float MeanPointDistance;
228 //0066 0019 FL 1 Maximum Point Distance
229 float MaximumPointDistance;
230 //0066 001a FL 6 Points Bounding Box Coordinates
231 float * PointsBoundingBoxCoordinates;
232 //0066 001b FL 3 Axis of Rotation
233 float * AxisOfRotation;
234 //0066 001c FL 3 Center of Rotation
235 float * CenterOfRotation;
236
237
238 //** Normal members **//
239
240 //0066 001e UL 1 Number of Vectors
241 unsigned long NumberOfVectors;
242 //0066 001f US 1 Vector Dimensionality
243 unsigned short VectorDimensionality;
244 //0066 0020 FL 1-n Vector Accuracy
245 float * VectorAccuracy;
246 //0066 0021 OF 1 Vector Coordinate Data
247 DataElement VectorCoordinateData;
248
249
250 //** Primitive members **//
251 SmartPointer< MeshPrimitive > Primitive;
252 };
253
254 }
255
256 #endif // GDCMSURFACE_H