fw4spl
ImageStorageReader.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 "fwDcmtkIO/config.hpp"
10 #include "fwDcmtkIO/reader/IObjectReader.hpp"
11 
12 #include <fwData/Image.hpp>
13 
14 #include <fwTools/Type.hpp>
15 
16 #include <dcmtk/dcmdata/dcdatset.h>
17 
18 namespace fwDcmtkIO
19 {
20 namespace reader
21 {
22 
26 class FWDCMTKIO_CLASS_API ImageStorageReader : public ::fwDcmtkIO::reader::IObjectReader
27 {
28 public:
29  typedef ::fwMedData::DicomSeries::DicomContainerType DicomContainerType;
30 
32  FWDCMTKIO_API ImageStorageReader();
33 
35  FWDCMTKIO_API virtual ~ImageStorageReader();
36 
38  FWDCMTKIO_API virtual ::fwMedData::Series::sptr read(const ::fwMedData::DicomSeries::csptr& series);
39 
40 protected:
53  FWDCMTKIO_API void directRead(const ::fwData::Image::sptr& image,
54  DicomContainerType instances,
55  unsigned short rows, unsigned short columns,
56  int depth, double rescaleSlope,
57  double rescaleIntercept,
58  unsigned short pixelRepresentation,
59  ::fwTools::Type imageType);
60 
71  FWDCMTKIO_API void directRGBLookupRead(const ::fwData::Image::sptr& image,
72  DcmDataset& dataset,
73  DicomContainerType instances,
74  unsigned short rows,
75  unsigned short columns, int depth,
76  unsigned short bitsAllocated);
77 
90  FWDCMTKIO_API void lazyRead(const ::fwData::Image::sptr& image,
91  const ::fwMedData::DicomSeries::csptr& series,
92  unsigned short rows, unsigned short columns,
93  int depth, double rescaleSlope,
94  double rescaleIntercept,
95  unsigned short pixelRepresentation,
96  ::fwTools::Type imageType);
97 
110  FWDCMTKIO_API void lazyRGBLookupRead(const ::fwData::Image::sptr& image,
111  const ::fwMedData::DicomSeries::csptr& series,
112  DcmDataset& dataset,
113  DicomContainerType instances, unsigned short rows,
114  unsigned short columns,
115  int depth, unsigned short bitsAllocated,
116  ::fwTools::Type imageType);
117 
118 };
119 
120 } //reader
121 } //fwDcmtkIO
Base class for Dicom instance reader.
Class describing an elementary C++ type aka unsigned char, signed char, .... int, float...
Definition: Type.hpp:32
fwDcmtkIO contains classes used to pull Dicom images from a pacs using dcmtk library.
Definition: Codec.hpp:12