fw4spl
InstanceNumberSorter.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/sorter/InstanceNumberSorter.hpp"
8 #include "fwDicomIOFilter/registry/macros.hpp"
9 #include "fwDicomIOFilter/exceptions/FilterFailure.hpp"
10 
11 #include <dcmtk/config/osconfig.h>
12 #include <dcmtk/dcmnet/diutil.h>
13 #include <dcmtk/dcmdata/dcfilefo.h>
14 #include <dcmtk/dcmdata/dcdeftag.h>
15 #include <dcmtk/dcmimgle/dcmimage.h>
16 
17 fwDicomIOFilterRegisterMacro( ::fwDicomIOFilter::sorter::InstanceNumberSorter );
18 
19 namespace fwDicomIOFilter
20 {
21 namespace sorter
22 {
23 
24 const std::string InstanceNumberSorter::s_FILTER_NAME = "Instance number sorter";
26  "Sort instances using <i>InstanceNumber</i> tag.";
27 
28 //-----------------------------------------------------------------------------
29 
31  fwDicomIOFilter::sorter::TagValueSorter(key)
32 {
33  this->setTag(DCM_InstanceNumber);
34 }
35 
36 //-----------------------------------------------------------------------------
37 
39 {
40 }
41 
42 //-----------------------------------------------------------------------------
43 
44 std::string InstanceNumberSorter::getName() const
45 {
47 }
48 
49 //-----------------------------------------------------------------------------
50 
52 {
54 }
55 
56 //-----------------------------------------------------------------------------
57 
59 {
60  return false;
61 }
62 
63 } // namespace sorter
64 } // namespace fwDicomIOFilter
virtual FWDICOMIOFILTER_API std::string getName() const override
Return the name of the filter.
fwDicomIOFilter contains filters used to pre-process images before reading.
Filter that uses a tag to sort the instances.
Filter that uses the InstanceNumber tag to sort the instances.
Key class used to restrict access to Filter construction. See http://www.drdobbs.com/184402053.
static const std::string s_FILTER_DESCRIPTION
Filter description.
virtual FWDICOMIOFILTER_API std::string getDescription() const override
Return the description of the filter.
virtual FWDICOMIOFILTER_API bool isConfigurationRequired() const override
Return true if a configuration is required.
virtual FWDICOMIOFILTER_API ~InstanceNumberSorter()
Destructor.
static const std::string s_FILTER_NAME
Filter name.
void setTag(const DcmTagKey &_tag)
Tag used to sort instances.
FWDICOMIOFILTER_API InstanceNumberSorter(::fwDicomIOFilter::IFilter::Key key)
Constructor.