GDCM: gdcmMeshPrimitive.h Source File

GDCM 3.2.5

gdcmMeshPrimitive.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
15#ifndef GDCMMESHPRIMITIVE_H
16#define GDCMMESHPRIMITIVE_H
17
18#include <gdcmObject.h>
19#include <gdcmDataElement.h>
20
21namespace gdcm
22{
23
30 class GDCM_EXPORT MeshPrimitive : public Object
31{
32public:
33
34 typedef std::vector< DataElement > PrimitivesData;
35
41 typedef enum {
42 VERTEX = 0,
43 EDGE,
44 TRIANGLE,
45 TRIANGLE_STRIP,
46 TRIANGLE_FAN,
47 LINE,
48 FACET,
49 MPType_END
50 } MPType;
51
52 static const char * GetMPTypeString(const MPType type);
53
54 static MPType GetMPType(const char * type);
55
56 MeshPrimitive();
57
58 ~MeshPrimitive() override;
59
60 MPType GetPrimitiveType() const;
61 void SetPrimitiveType(const MPType type);
62
63 const DataElement & GetPrimitiveData() const;
64 DataElement & GetPrimitiveData();
65 void SetPrimitiveData(DataElement const & de);
66
67 const PrimitivesData & GetPrimitivesData() const;
68 PrimitivesData & GetPrimitivesData();
69 void SetPrimitivesData(PrimitivesData const & DEs);
70
71 const DataElement & GetPrimitiveData(const unsigned int idx) const;
72 DataElement & GetPrimitiveData(const unsigned int idx);
73 void SetPrimitiveData(const unsigned int idx, DataElement const & de);
74 void AddPrimitiveData(DataElement const & de);
75
76 unsigned int GetNumberOfPrimitivesData() const;
77
78protected:
79
80 // Use to define tag where PrimitiveData will be put.
81 MPType PrimitiveType;
82
83 // PrimitiveData contains point index list.
84 // It shall have 1 or 1-n DataElement following PrimitiveType.
85 PrimitivesData PrimitiveData;
86};
87
88}
89
90#endif // GDCMMESHPRIMITIVE_H
gdcm::DataElement
Class to represent a Data Element either Implicit or Explicit.
Definition gdcmDataElement.h:59
gdcm::MeshPrimitive::GetPrimitiveType
MPType GetPrimitiveType() const
gdcm::MeshPrimitive::AddPrimitiveData
void AddPrimitiveData(DataElement const &de)
gdcm::MeshPrimitive::~MeshPrimitive
~MeshPrimitive() override
gdcm::MeshPrimitive::GetPrimitiveData
const DataElement & GetPrimitiveData() const
gdcm::MeshPrimitive::PrimitivesData
std::vector< DataElement > PrimitivesData
Definition gdcmMeshPrimitive.h:34
gdcm::MeshPrimitive::PrimitiveType
MPType PrimitiveType
Definition gdcmMeshPrimitive.h:81
gdcm::MeshPrimitive::GetPrimitiveData
const DataElement & GetPrimitiveData(const unsigned int idx) const
gdcm::MeshPrimitive::MeshPrimitive
MeshPrimitive()
gdcm::MeshPrimitive::GetPrimitivesData
const PrimitivesData & GetPrimitivesData() const
gdcm::MeshPrimitive::PrimitiveData
PrimitivesData PrimitiveData
Definition gdcmMeshPrimitive.h:85
gdcm::MeshPrimitive::GetPrimitivesData
PrimitivesData & GetPrimitivesData()
gdcm::MeshPrimitive::SetPrimitiveType
void SetPrimitiveType(const MPType type)
gdcm::MeshPrimitive::GetPrimitiveData
DataElement & GetPrimitiveData(const unsigned int idx)
gdcm::MeshPrimitive::GetNumberOfPrimitivesData
unsigned int GetNumberOfPrimitivesData() const
gdcm::MeshPrimitive::MPType
MPType
This enumeration defines primitive types.
Definition gdcmMeshPrimitive.h:41
gdcm::MeshPrimitive::FACET
@ FACET
Definition gdcmMeshPrimitive.h:48
gdcm::MeshPrimitive::VERTEX
@ VERTEX
Definition gdcmMeshPrimitive.h:42
gdcm::MeshPrimitive::MPType_END
@ MPType_END
Definition gdcmMeshPrimitive.h:49
gdcm::MeshPrimitive::EDGE
@ EDGE
Definition gdcmMeshPrimitive.h:43
gdcm::MeshPrimitive::LINE
@ LINE
Definition gdcmMeshPrimitive.h:47
gdcm::MeshPrimitive::TRIANGLE_STRIP
@ TRIANGLE_STRIP
Definition gdcmMeshPrimitive.h:45
gdcm::MeshPrimitive::TRIANGLE
@ TRIANGLE
Definition gdcmMeshPrimitive.h:44
gdcm::MeshPrimitive::TRIANGLE_FAN
@ TRIANGLE_FAN
Definition gdcmMeshPrimitive.h:46
gdcm::MeshPrimitive::GetPrimitiveData
DataElement & GetPrimitiveData()
gdcm::MeshPrimitive::SetPrimitiveData
void SetPrimitiveData(DataElement const &de)
gdcm::MeshPrimitive::SetPrimitiveData
void SetPrimitiveData(const unsigned int idx, DataElement const &de)
gdcm::MeshPrimitive::GetMPType
static MPType GetMPType(const char *type)
gdcm::MeshPrimitive::GetMPTypeString
static const char * GetMPTypeString(const MPType type)
gdcm::MeshPrimitive::SetPrimitivesData
void SetPrimitivesData(PrimitivesData const &DEs)
gdcm::Object::Object
Object()
Definition gdcmObject.h:42
gdcmDataElement.h
gdcmObject.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21