fw4spl
TagValueSplitter.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 "fwDicomIOFilter/config.hpp"
10 #include "fwDicomIOFilter/splitter/ISplitter.hpp"
11 
12 #include <fwMedData/DicomSeries.hpp>
13 
14 #include <dcmtk/dcmdata/dctagkey.h>
15 
16 namespace fwDicomIOFilter
17 {
18 namespace splitter
19 {
20 
24 class FWDICOMIOFILTER_CLASS_API TagValueSplitter : public ISplitter
25 {
26 public:
28  (()), ::fwDicomIOFilter::factory::New< TagValueSplitter > );
29 
31  FWDICOMIOFILTER_API TagValueSplitter(::fwDicomIOFilter::IFilter::Key key);
32 
34  FWDICOMIOFILTER_API virtual ~TagValueSplitter();
35 
37  FWDICOMIOFILTER_API virtual DicomSeriesContainerType apply(
38  const ::fwMedData::DicomSeries::sptr& series, const ::fwLog::Logger::sptr& logger) const override;
39 
41  FWDICOMIOFILTER_API virtual std::string getName() const override;
42 
44  FWDICOMIOFILTER_API virtual std::string getDescription() const override;
45 
47  FWDICOMIOFILTER_API virtual bool isConfigurationRequired() const override;
48 
52  //------------------------------------------------------------------------------
53 
54  DcmTagKey& getTag ()
55  {
56  return this->m_tag;
57  }
58  //------------------------------------------------------------------------------
59 
60  const DcmTagKey& getTag() const
61  {
62  return this->m_tag;
63  }
64  //------------------------------------------------------------------------------
65 
66  void setTag (const DcmTagKey& _tag)
67  {
68  this->m_tag = _tag;
69  }
72 protected:
74  static const std::string s_FILTER_NAME;
75 
77  static const std::string s_FILTER_DESCRIPTION;
78 
80  DcmTagKey m_tag;
81 
82 };
83 
84 } // namespace splitter
85 } // namespace fwDicomIOFilter
DcmTagKey & getTag()
Tag used to sort instances.
fwDicomIOFilter contains filters used to pre-process images before reading.
static const std::string s_FILTER_NAME
Filter name.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
Key class used to restrict access to Filter construction. See http://www.drdobbs.com/184402053.
const DcmTagKey & getTag() const
Tag used to sort instances.
static const std::string s_FILTER_DESCRIPTION
Filter description.
DcmTagKey m_tag
Tag used to sort instances.
void setTag(const DcmTagKey &_tag)
Tag used to sort instances.
Filter that uses a tag to split the instances.
Base class for Dicom instance splitter.
Definition: ISplitter.hpp:23