fw4spl
DicomSurface.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWGDCMIO_CONTAINER_DICOMSURFACE_HPP__
8 #define __FWGDCMIO_CONTAINER_DICOMSURFACE_HPP__
9 
10 #include "fwGdcmIO/config.hpp"
11 
12 #include <fwData/Mesh.hpp>
13 #include <fwData/Reconstruction.hpp>
14 
15 #include <cstdint>
16 
17 namespace fwGdcmIO
18 {
19 namespace container
20 {
21 
25 class FWGDCMIO_CLASS_API DicomSurface
26 {
27 
28 public:
29 
34  typedef std::uint32_t DicomCellValueType;
35 
39  typedef std::vector< float > DicomPointBufferType;
40  typedef std::vector< DicomCellValueType > DicomCellBufferType;
41  typedef std::vector< float > DicomNormalBufferType;
48  FWGDCMIO_API DicomSurface(const ::fwData::Reconstruction::csptr& reconstruction);
49 
58  FWGDCMIO_API DicomSurface(const ::fwData::Mesh::PointValueType* pointBuffer,
59  const ::fwData::Mesh::Id pointBufferSize,
60  const DicomCellValueType* cellBuffer,
61  const ::fwData::Mesh::Id cellBufferSize,
62  const ::fwData::Mesh::NormalValueType* normalBuffer);
63 
65  FWGDCMIO_API ~DicomSurface();
66 
68  FWGDCMIO_API ::fwData::Mesh::sptr convertToData();
69 
71  FWGDCMIO_API const DicomPointBufferType& getPointBuffer() const;
73  FWGDCMIO_API const DicomCellBufferType& getCellBuffer() const;
74 
76  FWGDCMIO_API const DicomNormalBufferType& getNormalBuffer() const;
77 
79  FWGDCMIO_API std::size_t getPointBufferSize() const;
80 
82  FWGDCMIO_API std::size_t getCellBufferSize() const;
83 
85  FWGDCMIO_API std::size_t getNormalBufferSize() const;
86 
87 private:
88 
93  DicomPointBufferType m_pointBuffer;
94 
102  DicomCellBufferType m_cellBuffer;
103 
108  DicomNormalBufferType m_normalBuffer;
109 };
110 
111 } //namespace container
112 } //namespace fwGdcmIO
113 
114 #endif /* __FWGDCMIO_CONTAINER_DICOMSURFACE_HPP__ */
This class defines one surface mesh item in order to transform into DICOM/FW4SPL form.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
std::vector< float > DicomNormalBufferType
Container types to store points, cells and normals.
std::vector< DicomCellValueType > DicomCellBufferType
Container types to store points, cells and normals.
std::vector< float > DicomPointBufferType
Container types to store points, cells and normals.