fw4spl
TagValueInstanceRemoveSplitter.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 TagValueInstanceRemoveSplitter : public ISplitter
25 {
26 public:
28  (()), ::fwDicomIOFilter::factory::New< TagValueInstanceRemoveSplitter > );
29 
32 
34  FWDICOMIOFILTER_API virtual ~TagValueInstanceRemoveSplitter();
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  }
75  //------------------------------------------------------------------------------
76 
77  std::string& getTagValue()
78  {
79  return this->m_tagValue;
80  }
81  //------------------------------------------------------------------------------
82 
83  const std::string& getTagValue() const
84  {
85  return this->m_tagValue;
86  }
87  //------------------------------------------------------------------------------
88 
89  void setTagValue(const std::string& _tagValue)
90  {
91  this->m_tagValue = _tagValue;
92  }
95 protected:
97  static const std::string s_FILTER_NAME;
98 
100  static const std::string s_FILTER_DESCRIPTION;
101 
103  DcmTagKey m_tag;
104 
106  std::string m_tagValue;
107 
108 };
109 
110 } // namespace splitter
111 } // namespace fwDicomIOFilter
const std::string & getTagValue() const
Tag value used to determine if an instance must be removed.
Filter that remove instances according to tag value.
fwDicomIOFilter contains filters used to pre-process images before reading.
#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.
std::string & getTagValue()
Tag value used to determine if an instance must be removed.
void setTag(const DcmTagKey &_tag)
Tag used to sort instances.
Base class for Dicom instance splitter.
Definition: ISplitter.hpp:23
std::string m_tagValue
Tag value used to determine if an instance must be removed.
void setTagValue(const std::string &_tagValue)
Tag value used to determine if an instance must be removed.