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