GDCM 2.2.1

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

- File List
- File Members

gdcmCurve.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 GDCMCURVE_H
15 #define GDCMCURVE_H
16
17 #include "gdcmTypes.h"
18 #include "gdcmObject.h"
19
20 #include <vector>
21
22 namespace gdcm
23 {
24
25 class CurveInternal;
26 class ByteValue;
27 class DataSet;
28 class DataElement;
39 class GDCM_EXPORT Curve : public Object
40 {
41 public:
42 Curve();
43 ~Curve();
44 void Print(std::ostream &) const;
45
46 void GetAsPoints(float *array) const;
47
48 static unsigned int GetNumberOfCurves(DataSet const & ds);
49
50 // Update curve data from dataelmenet de:
51 void Update(const DataElement & de);
52
53 void SetGroup(unsigned short group);
54 unsigned short GetGroup() const;
55 void SetDimensions(unsigned short dimensions);
56 unsigned short GetDimensions() const;
57 void SetNumberOfPoints(unsigned short numberofpoints);
58 unsigned short GetNumberOfPoints() const;
59 void SetTypeOfData(const char *typeofdata);
60 const char *GetTypeOfData() const;
61 // See PS 3.3 - 2004 - C.10.2.1.1 Type of data
62 const char *GetTypeOfDataDescription() const;
63 void SetCurveDescription(const char *curvedescription);
64 void SetDataValueRepresentation(unsigned short datavaluerepresentation);
65 unsigned short GetDataValueRepresentation() const;
66 void SetCurveDataDescriptor(const uint16_t * values, size_t num);
67 std::vector<unsigned short> const &GetCurveDataDescriptor() const;
68 void SetCoordinateStartValue( unsigned short v );
69 void SetCoordinateStepValue( unsigned short v );
70
71 void SetCurve(const char *array, unsigned int length);
72
73 bool IsEmpty() const;
74
75 void Decode(std::istream &is, std::ostream &os);
76
77 Curve(Curve const &ov);
78 private:
79 double ComputeValueFromStartAndStep(unsigned int idx) const;
80 CurveInternal *Internal;
81 };
82
83 } // end namespace gdcm
84
85 #endif //GDCMCURVE_H