fw4spl
writer/ie/SpatialFiducials.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/exception/Failed.hpp"
10 #include "fwGdcmIO/writer/ie/InformationEntity.hpp"
11 
12 #include <fwData/Image.hpp>
13 
14 namespace fwGdcmIO
15 {
16 namespace writer
17 {
18 namespace ie
19 {
20 
24 class FWGDCMIO_CLASS_API SpatialFiducials : public ::fwGdcmIO::writer::ie::InformationEntity< ::fwData::Image >
25 {
26 
27 public:
37  FWGDCMIO_API SpatialFiducials(const SPTR(::gdcm::Writer)& writer,
38  const SPTR(::fwGdcmIO::container::DicomInstance)& instance,
39  const ::fwData::Image::csptr& series,
40  const ::fwLog::Logger::sptr& logger = nullptr,
41  ProgressCallback progress = nullptr,
42  CancelRequestedCallback cancel = nullptr);
43 
45  FWGDCMIO_API virtual ~SpatialFiducials();
46 
51  FWGDCMIO_API virtual void writeSpatialFiducialsModule();
52 
57  FWGDCMIO_API virtual void writeCommonInstanceReferenceModule();
58 
63  FWGDCMIO_API virtual void writeSOPCommonModule();
64 
65 protected:
66 
70  void writeLandmarks(::gdcm::SmartPointer< ::gdcm::SequenceOfItems > sequence) throw(::fwGdcmIO::exception::Failed);
71 
75  void writeDistances(::gdcm::SmartPointer< ::gdcm::SequenceOfItems > sequence);
76 
82  void addReferencedImage(int frameNumber,
83  ::gdcm::SmartPointer< ::gdcm::SequenceOfItems > referencedImageSequence) throw(::fwGdcmIO::
84  exception::
85  Failed);
86 };
87 
88 } // namespace ie
89 } // namespace writer
90 } // namespace fwGdcmIO
#define SPTR(_cls_)
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.
Implements a failed exception class for fwGdcmIO.
Spatial Fiducials Information Entity class.