GDCM
2.2.0
|
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 GDCMCURVE_H 00015 #define GDCMCURVE_H 00016 00017 #include "gdcmTypes.h" 00018 #include "gdcmObject.h" 00019 00020 namespace gdcm 00021 { 00022 00023 class CurveInternal; 00024 class ByteValue; 00025 class DataSet; 00026 class DataElement; 00037 class GDCM_EXPORT Curve : public Object 00038 { 00039 public: 00040 Curve(); 00041 ~Curve(); 00042 void Print(std::ostream &) const; 00043 00044 void GetAsPoints(float *array) const; 00045 00046 00047 static unsigned int GetNumberOfCurves(DataSet const & ds); 00048 00049 // Update curve data from dataelmenet de: 00050 void Update(const DataElement & de); 00051 00052 void SetGroup(unsigned short group); 00053 unsigned short GetGroup() const; 00054 void SetDimensions(unsigned short dimensions); 00055 unsigned short GetDimensions() const; 00056 void SetNumberOfPoints(unsigned short numberofpoints); 00057 unsigned short GetNumberOfPoints() const; 00058 void SetTypeOfData(const char *typeofdata); 00059 const char *GetTypeOfData() const; 00060 // See PS 3.3 - 2004 - C.10.2.1.1 Type of data 00061 const char *GetTypeOfDataDescription() const; 00062 void SetCurveDescription(const char *curvedescription); 00063 void SetDataValueRepresentation(unsigned short datavaluerepresentation); 00064 unsigned short GetDataValueRepresentation() const; 00065 void SetCurveDataDescriptor(const uint16_t * values, size_t num); 00066 void SetCoordinateStartValue( unsigned short v ); 00067 void SetCoordinateStepValue( unsigned short v ); 00068 00069 void SetCurve(const char *array, unsigned int length); 00070 00071 bool IsEmpty() const; 00072 00073 void Decode(std::istream &is, std::ostream &os); 00074 00075 Curve(Curve const &ov); 00076 private: 00077 double ComputeValueFromStartAndStep(unsigned int idx) const; 00078 CurveInternal *Internal; 00079 }; 00080 00081 } // end namespace gdcm 00082 00083 #endif //GDCMCURVE_H