fw4spl
DicomDataTools.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2017-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/config.hpp"
10 #include "fwGdcmIO/container/DicomCodedAttribute.hpp"
11 #include "fwGdcmIO/exception/Failed.hpp"
12 
13 #include <fwData/Image.hpp>
14 #include <fwData/Material.hpp>
15 #include <fwData/Point.hpp>
16 
17 #include <gdcmImage.h>
18 #include <gdcmSurface.h>
19 
20 namespace fwGdcmIO
21 {
22 
23 namespace helper
24 {
25 
31 class FWGDCMIO_CLASS_API DicomDataTools
32 {
33 public:
34 
40  FWGDCMIO_API static const ::gdcm::PixelFormat getPixelType(const ::fwData::Image::csptr& image);
41 
47  FWGDCMIO_API static const ::gdcm::PhotometricInterpretation getPhotometricInterpretation(
48  const ::fwData::Image::csptr& image);
49 
56  FWGDCMIO_API static ::gdcm::Surface::VIEWType convertToPresentationType(
57  ::fwData::Material::RepresentationType representationMode);
58 
64  FWGDCMIO_API static ::fwData::Material::RepresentationType convertToRepresentationMode(
65  ::gdcm::Surface::VIEWType presentationType);
66 
72  FWGDCMIO_API static std::size_t convertPointToFrameNumber(const ::fwData::Image::csptr& image,
73  const ::fwData::Point::csptr& point)
75 
81  FWGDCMIO_API static double convertFrameNumberToZCoordinate(const ::fwData::Image::csptr& image,
82  const std::size_t frameNumber)
84 
85 };
86 
87 } // namespace helper
88 } // namespace fwGdcmIO
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
Implements a failed exception class for fwGdcmIO.
RepresentationType
Representation models.
This class contains helpers to handle GDCM data. It implements many tag value getters/setters. It defines also some tools for converting GDCM data to FW4SPL data.