GDCM 2.2.0

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

- File List
- File Members

gdcmSurface.h
Go to the documentation of this file.

    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 GDCMSURFACE_H
    00015 #define GDCMSURFACE_H
    00016
    00017 #include <gdcmObject.h>
    00018 #include <gdcmDataElement.h>
    00019 #include <gdcmMeshPrimitive.h>
    00020 #include "gdcmSegmentHelper.h"  // for BasicCodedEntry
    00021
    00022 namespace gdcm
    00023 {
    00024
    00031 class GDCM_EXPORT Surface : public Object
    00032 {
    00033 public:
    00034
    00035   typedef enum {
    00036     NO = 0,
    00037     YES,
    00038     UNKNOWN,
    00039     STATES_END
    00040   } STATES;
    00041
    00042   static const char * GetSTATESString(STATES state);
    00043   static STATES GetSTATES(const char * state);
    00044
    00050   typedef enum {
    00051     SURFACE = 0,
    00052     WIREFRAME,
    00053     POINTS,
    00054     VIEWType_END
    00055   } VIEWType;
    00056
    00057   static const char * GetVIEWTypeString(VIEWType type);
    00058   static VIEWType GetVIEWType(const char * type);
    00059
    00060   Surface();
    00061
    00062   virtual ~Surface();
    00063
    00064   //**    Common getters/setters      **//
    00065   unsigned long GetSurfaceNumber() const;
    00066   void SetSurfaceNumber(const unsigned long nb);
    00067
    00068   const char * GetSurfaceComments() const;
    00069   void SetSurfaceComments(const char * comment);
    00070
    00071   bool GetSurfaceProcessing() const;
    00072   void SetSurfaceProcessing(bool b);
    00073
    00074   float GetSurfaceProcessingRatio() const;
    00075   void SetSurfaceProcessingRatio(const float ratio);
    00076
    00077   const char * GetSurfaceProcessingDescription() const;
    00078   void SetSurfaceProcessingDescription(const char * description);
    00079
    00080   SegmentHelper::BasicCodedEntry const & GetProcessingAlgorithm() const;
    00081   SegmentHelper::BasicCodedEntry & GetProcessingAlgorithm();
    00082   void SetProcessingAlgorithm(SegmentHelper::BasicCodedEntry const & BSE);
    00083
    00084   unsigned short GetRecommendedDisplayGrayscaleValue() const;
    00085   void SetRecommendedDisplayGrayscaleValue(const unsigned short vl);
    00086
    00087   const unsigned short * GetRecommendedDisplayCIELabValue() const;
    00088   unsigned short GetRecommendedDisplayCIELabValue(const unsigned int idx) const;
    00089   void SetRecommendedDisplayCIELabValue(const unsigned short vl[3]);
    00090   void SetRecommendedDisplayCIELabValue(const unsigned short vl, const unsigned int idx = 0);
    00091   void SetRecommendedDisplayCIELabValue(const std::vector< unsigned short > & vl);
    00092
    00093   float GetRecommendedPresentationOpacity() const;
    00094   void SetRecommendedPresentationOpacity(const float opacity);
    00095
    00096   VIEWType GetRecommendedPresentationType() const;
    00097   void SetRecommendedPresentationType(VIEWType type);
    00098
    00099   STATES GetFiniteVolume() const;
    00100   void SetFiniteVolume(STATES state);
    00101
    00102   STATES GetManifold() const;
    00103   void SetManifold(STATES state);
    00104
    00105   SegmentHelper::BasicCodedEntry const & GetAlgorithmFamily() const;
    00106   SegmentHelper::BasicCodedEntry & GetAlgorithmFamily();
    00107   void SetAlgorithmFamily(SegmentHelper::BasicCodedEntry const & BSE);
    00108
    00109   const char * GetAlgorithmVersion() const;
    00110   void SetAlgorithmVersion(const char * str);
    00111
    00112   const char * GetAlgorithmName() const;
    00113   void SetAlgorithmName(const char * str);
    00114
    00115   //**    Points getters/setters      **//
    00116   unsigned long GetNumberOfSurfacePoints() const;
    00117   void SetNumberOfSurfacePoints(const unsigned long nb);
    00118
    00119   const DataElement & GetPointCoordinatesData() const;
    00120   DataElement & GetPointCoordinatesData();
    00121
    00122   void SetPointCoordinatesData(DataElement const & de);
    00123
    00127   const float * GetPointPositionAccuracy() const;
    00128   void SetPointPositionAccuracy(const float * accuracies);
    00129
    00130   float GetMeanPointDistance() const;
    00131   void SetMeanPointDistance(float average);
    00132
    00133   float GetMaximumPointDistance() const;
    00134   void SetMaximumPointDistance(float maximum);
    00135
    00139   const float * GetPointsBoundingBoxCoordinates() const;
    00140   void SetPointsBoundingBoxCoordinates(const float * coordinates);
    00141
    00145   const float * GetAxisOfRotation() const;
    00146   void SetAxisOfRotation(const float * axis);
    00147
    00151   const float * GetCenterOfRotation() const;
    00152   void SetCenterOfRotation(const float * center);
    00153
    00154   //**    Vectors getters/setters      **//
    00155   unsigned long GetNumberOfVectors() const;
    00156   void SetNumberOfVectors(const unsigned long nb);
    00157
    00158   unsigned short GetVectorDimensionality() const;
    00159   void SetVectorDimensionality(const unsigned short dim);
    00160
    00161   const float * GetVectorAccuracy() const;
    00162   void SetVectorAccuracy(const float * accuracy);
    00163
    00164   const DataElement & GetVectorCoordinateData() const;
    00165   DataElement & GetVectorCoordinateData();
    00166
    00167   void SetVectorCoordinateData(DataElement const & de);
    00168
    00169   //**    Primitive getters/setters      **//
    00170   MeshPrimitive const & GetMeshPrimitive() const;
    00171   MeshPrimitive & GetMeshPrimitive();
    00172
    00173   void SetMeshPrimitive(MeshPrimitive & mp);
    00174
    00175 private:
    00176
    00177   //**        Common members      **//
    00178
    00179   //0066 0003 UL 1 Surface Number
    00180   unsigned long SurfaceNumber;
    00181   //0066 0004 LT 1 Surface Comments
    00182   std::string   SurfaceComments;
    00183
    00184   //0066 0009 CS 1 Surface Processing
    00185   bool          SurfaceProcessing;
    00186   //0066 000a FL 1 Surface Processing Ratio
    00187   float         SurfaceProcessingRatio;
    00188   //0066 000b LO 1 Surface Processing Description
    00189   std::string   SurfaceProcessingDescription;
    00190   // Processing Algorithm Code
    00191   SegmentHelper::BasicCodedEntry ProcessingAlgorithm;
    00192
    00193   //0062 000c US 1 Recommended Display Grayscale Value
    00194   unsigned short  RecommendedDisplayGrayscaleValue;
    00195   //0062 000d US 3 Recommended Display CIELab Value
    00196   unsigned short  RecommendedDisplayCIELabValue[3];
    00197
    00198   // 0066 000c FL 1 Recommended Presentation Opacity
    00199   float           RecommendedPresentationOpacity;
    00200   // 0066 000d CS 1 Recommended Presentation Type
    00201   VIEWType        RecommendedPresentationType;
    00202
    00203   //0066 000e CS 1 Finite Volume
    00204   STATES        FiniteVolume;
    00205   //0066 0010 CS 1 Manifold
    00206   STATES        Manifold;
    00207
    00208   // Algorithm Family Code
    00209   SegmentHelper::BasicCodedEntry AlgorithmFamily;
    00210
    00211   //0066 0031 LO 1 Algorithm Version
    00212   std::string   AlgorithmVersion;
    00213   //0066 0032 LT 1 Algorithm Parameters
    00214   //0066 0036 LO 1 Algorithm Name
    00215   std::string   AlgorithmName;
    00216
    00217
    00218   //**        Point members      **//
    00219
    00220   //0066 0015 UL 1 Number of Surface Points
    00221   unsigned long NumberOfSurfacePoints;
    00222   //0066 0016 OF 1 Point Coordinates Data
    00223   DataElement   PointCoordinatesData;
    00224   //0066 0017 FL 3 Point Position Accuracy
    00225   float *       PointPositionAccuracy;
    00226   //0066 0018 FL 1 Mean Point Distance
    00227   float         MeanPointDistance;
    00228   //0066 0019 FL 1 Maximum Point Distance
    00229   float         MaximumPointDistance;
    00230   //0066 001a FL 6 Points Bounding Box Coordinates
    00231   float *       PointsBoundingBoxCoordinates;
    00232   //0066 001b FL 3 Axis of Rotation
    00233   float *       AxisOfRotation;
    00234   //0066 001c FL 3 Center of Rotation
    00235   float *       CenterOfRotation;
    00236
    00237
    00238   //**        Normal members      **//
    00239
    00240   //0066 001e UL 1 Number of Vectors
    00241   unsigned long NumberOfVectors;
    00242   //0066 001f US 1 Vector Dimensionality
    00243   unsigned short VectorDimensionality;
    00244   //0066 0020 FL 1-n Vector Accuracy
    00245   float *       VectorAccuracy;
    00246   //0066 0021 OF 1 Vector Coordinate Data
    00247   DataElement   VectorCoordinateData;
    00248
    00249
    00250   //**        Primitive members      **//
    00251   SmartPointer< MeshPrimitive > Primitive;
    00252 };
    00253
    00254 }
    00255
    00256 #endif // GDCMSURFACE_H