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