fw4spl
CTImageStorageDefaultComposite.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2016.
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 #include "fwDicomIOFilter/composite/CTImageStorageDefaultComposite.hpp"
8 
9 #include "fwDicomIOFilter/modifier/SliceThicknessModifier.hpp"
10 #include "fwDicomIOFilter/sorter/ImagePositionPatientSorter.hpp"
11 #include "fwDicomIOFilter/sorter/InstanceNumberSorter.hpp"
12 #include "fwDicomIOFilter/splitter/AcquisitionNumberSplitter.hpp"
13 #include "fwDicomIOFilter/splitter/ImageDimensionsSplitter.hpp"
14 #include "fwDicomIOFilter/splitter/ImagePositionPatientSplitter.hpp"
15 #include "fwDicomIOFilter/splitter/ImageTypeSplitter.hpp"
16 #include "fwDicomIOFilter/splitter/SOPClassUIDSplitter.hpp"
17 #include "fwDicomIOFilter/splitter/TemporalPositionSplitter.hpp"
18 #include "fwDicomIOFilter/registry/macros.hpp"
19 
20 fwDicomIOFilterRegisterMacro( ::fwDicomIOFilter::composite::CTImageStorageDefaultComposite );
21 
22 namespace fwDicomIOFilter
23 {
24 namespace composite
25 {
26 
27 const std::string CTImageStorageDefaultComposite::s_FILTER_NAME = "CTImageStorage default composite";
29  "CTImageStorage default composite.";
30 
31 //-----------------------------------------------------------------------------
32 
34 {
35  // Split according to image type
36  this->addChild(::fwDicomIOFilter::splitter::ImageTypeSplitter::New());
37  // Split according to acquisition number
38  this->addChild(::fwDicomIOFilter::splitter::AcquisitionNumberSplitter::New());
39  // Split according to temporal position (MR)
40  this->addChild(::fwDicomIOFilter::splitter::TemporalPositionSplitter::New());
41  // Split according to image dimensions
42  this->addChild(::fwDicomIOFilter::splitter::ImageDimensionsSplitter::New());
43  // Sort according to instance number
44  this->addChild(::fwDicomIOFilter::sorter::InstanceNumberSorter::New());
45  // Sort according to image position
46  this->addChild(::fwDicomIOFilter::sorter::ImagePositionPatientSorter::New());
47  // Split if gaps are found in image positions
48  this->addChild(::fwDicomIOFilter::splitter::ImagePositionPatientSplitter::New());
49  // Sort according to image position to get correct orientation
50  this->addChild(::fwDicomIOFilter::sorter::ImagePositionPatientSorter::New());
51  // Correct slice thickness if needed
52  this->addChild(::fwDicomIOFilter::modifier::SliceThicknessModifier::New());
53 }
54 
55 //-----------------------------------------------------------------------------
56 
58 {
59 }
60 
61 //-----------------------------------------------------------------------------
62 
64 {
66 }
67 
68 //-----------------------------------------------------------------------------
69 
71 {
73 }
74 
75 } // namespace composite
76 } // namespace fwDicomIOFilter
FWDICOMIOFILTER_API void addChild(const ::fwDicomIOFilter::IFilter::sptr &filter)
Add a filter to the composite.
Definition: IComposite.cpp:87
Base class for Dicom instance composite filter.
Definition: IComposite.hpp:23
fwDicomIOFilter contains filters used to pre-process images before reading.
FWDICOMIOFILTER_API CTImageStorageDefaultComposite(::fwDicomIOFilter::IFilter::Key key)
Constructor.
virtual FWDICOMIOFILTER_API std::string getName() const override
Return the name of the filter.
Key class used to restrict access to Filter construction. See http://www.drdobbs.com/184402053.
Default filter used to read CTImageStorage SOP class.
virtual FWDICOMIOFILTER_API std::string getDescription() const override
Return the description of the filter.