GDCM
2.2.3
|
00001 /*========================================================================= 00002 00003 Program: GDCM (Grassroots DICOM). A DICOM library 00004 00005 Copyright (c) 2006-2011 Mathieu Malaterre 00006 All rights reserved. 00007 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 #ifndef GDCMSEGMENT_H 00015 #define GDCMSEGMENT_H 00016 00017 #include <vector> 00018 00019 #include <gdcmObject.h> 00020 #include <gdcmSurface.h> 00021 #include "gdcmSegmentHelper.h" 00022 00023 namespace gdcm 00024 { 00025 00033 class GDCM_EXPORT Segment : public Object 00034 { 00035 public: 00036 00037 typedef std::vector< SmartPointer< Surface > > SurfaceVector; 00038 00039 typedef enum { 00040 MANUAL = 0, 00041 AUTOMATIC, 00042 ALGOType_END 00043 } ALGOType; 00044 00045 static const char * GetALGOTypeString(ALGOType type); 00046 static ALGOType GetALGOType(const char * type); 00047 00048 00049 Segment(); 00050 00051 virtual ~Segment(); 00052 00053 //** Segment getters/setters **// 00054 unsigned short GetSegmentNumber() const; 00055 void SetSegmentNumber(const unsigned short num); 00056 00057 const char * GetSegmentLabel() const; 00058 void SetSegmentLabel(const char * label); 00059 00060 const char * GetSegmentDescription() const; 00061 void SetSegmentDescription(const char * description); 00062 00063 SegmentHelper::BasicCodedEntry const & GetAnatomicRegion() const; 00064 SegmentHelper::BasicCodedEntry & GetAnatomicRegion(); 00065 void SetAnatomicRegion(SegmentHelper::BasicCodedEntry const & BSE); 00066 00067 SegmentHelper::BasicCodedEntry const & GetPropertyCategory() const; 00068 SegmentHelper::BasicCodedEntry & GetPropertyCategory(); 00069 void SetPropertyCategory(SegmentHelper::BasicCodedEntry const & BSE); 00070 00071 SegmentHelper::BasicCodedEntry const & GetPropertyType() const; 00072 SegmentHelper::BasicCodedEntry & GetPropertyType(); 00073 void SetPropertyType(SegmentHelper::BasicCodedEntry const & BSE); 00074 00075 ALGOType GetSegmentAlgorithmType() const; 00076 void SetSegmentAlgorithmType(ALGOType type); 00077 void SetSegmentAlgorithmType(const char * typeStr); 00078 00079 const char * GetSegmentAlgorithmName() const; 00080 void SetSegmentAlgorithmName(const char * name); 00081 00082 //** Surface getters/setters **// 00083 unsigned long GetSurfaceCount(); 00084 void SetSurfaceCount(const unsigned long nb); 00085 00086 SurfaceVector const & GetSurfaces() const; 00087 SurfaceVector & GetSurfaces(); 00088 00089 SmartPointer< Surface > GetSurface(const unsigned int idx = 0) const; 00090 00091 void AddSurface(SmartPointer< Surface > surface); 00092 00093 protected : 00094 //** Segment members **// 00095 //0062 0004 US 1 Segment Number 00096 unsigned short SegmentNumber; 00097 //0062 0005 LO 1 Segment Label 00098 std::string SegmentLabel; 00099 //0062 0006 ST 1 Segment Description 00100 std::string SegmentDescription; 00101 00102 // General Anatomic Region 00103 SegmentHelper::BasicCodedEntry AnatomicRegion; 00104 // Property Category Code 00105 SegmentHelper::BasicCodedEntry PropertyCategory; 00106 // Property Type Code 00107 SegmentHelper::BasicCodedEntry PropertyType; 00108 00109 //0062 0008 CS 1 Segment Algorithm Type 00110 ALGOType SegmentAlgorithmType; 00111 //0062 0009 LO 1 Segment Algorithm Name 00112 std::string SegmentAlgorithmName; 00113 00114 //** Surface members **// 00115 //0066 002a UL 1 Surface Count 00116 unsigned long SurfaceCount; 00117 00118 SurfaceVector Surfaces; 00119 00120 private : 00121 void ComputeSurfaceCount(); 00122 }; 00123 00124 } 00125 00126 #endif // GDCMSEGMENT_H