fw4spl
writer/ie/Surface.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
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 #pragma once
8 
9 #include "fwGdcmIO/helper/SegmentedPropertyRegistry.hpp"
10 #include "fwGdcmIO/writer/ie/InformationEntity.hpp"
11 
12 #include <fwMedData/ModelSeries.hpp>
13 
14 #include <boost/filesystem/path.hpp>
15 
16 #include <gdcmSegment.h>
17 
18 namespace fwGdcmIO
19 {
20 namespace writer
21 {
22 namespace ie
23 {
24 
28 class FWGDCMIO_CLASS_API Surface : public ::fwGdcmIO::writer::ie::InformationEntity< ::fwMedData::ModelSeries >
29 {
30 
31 public:
41  FWGDCMIO_API Surface(const SPTR(::gdcm::Writer)& writer,
42  const SPTR(::fwGdcmIO::container::DicomInstance)& instance,
43  const SPTR(::fwGdcmIO::container::DicomInstance)& imageInstance,
44  const ::fwMedData::ModelSeries::csptr& series,
45  const ::fwLog::Logger::sptr& logger = nullptr,
46  ProgressCallback progress = nullptr,
47  CancelRequestedCallback cancel = nullptr);
48 
50  FWGDCMIO_API virtual ~Surface();
51 
57  FWGDCMIO_API bool loadSegmentedPropertyRegistry(const ::boost::filesystem::path& filepath);
58 
63  FWGDCMIO_API virtual void writeSOPCommonModule();
64 
69  FWGDCMIO_API virtual void writeSurfaceSegmentationAndSurfaceMeshModules();
70 
71 protected:
72 
81  FWGDCMIO_API virtual void writeSegmentSequence(const CSPTR(::fwData::Reconstruction)& reconstruction,
82  ::gdcm::Item& segmentItem,
83  const ::gdcm::SmartPointer< ::gdcm::Segment >& segment,
84  unsigned short segmentNumber);
93  FWGDCMIO_API virtual void writeSurfaceSequence(const CSPTR(::fwData::Reconstruction)& reconstruction,
94  ::gdcm::Item& surfaceItem,
95  const ::gdcm::SmartPointer< ::gdcm::Surface >& surface,
96  unsigned short segmentNumber);
97 
100 
103 
104 };
105 
106 } // namespace ie
107 } // namespace writer
108 } // namespace fwGdcmIO
#define SPTR(_cls_)
#define CSPTR(_cls_)
Surface Information Entity class.
This class defines a reconstruction object.
InformationEntity base class used to write modules.
This class defines a DICOM SOP instance. It is useful during the whole writing process. This class allows to share data between module writers.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
Registry of Segment Properties. This class defines a registry which links a structure type to an entr...
::fwGdcmIO::helper::SegmentedPropertyRegistry m_segmentedPropertyRegistry
Structure Dictionary.