ITK  5.1.0
Insight Toolkit
itkBinaryReconstructionLabelMapFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkBinaryReconstructionLabelMapFilter_h
19 #define itkBinaryReconstructionLabelMapFilter_h
20 
23 
24 namespace itk
25 {
45 template <typename TImage,
46  typename TMarkerImage,
47  typename TAttributeAccessor =
48  typename Functor::AttributeLabelObjectAccessor<typename TImage::LabelObjectType>>
49 class ITK_TEMPLATE_EXPORT BinaryReconstructionLabelMapFilter : public InPlaceLabelMapFilter<TImage>
50 {
51 public:
52  ITK_DISALLOW_COPY_AND_ASSIGN(BinaryReconstructionLabelMapFilter);
53 
59 
61  using ImageType = TImage;
62  using ImagePointer = typename ImageType::Pointer;
63  using ImageConstPointer = typename ImageType::ConstPointer;
64  using PixelType = typename ImageType::PixelType;
65  using IndexType = typename ImageType::IndexType;
66  using LabelObjectType = typename ImageType::LabelObjectType;
67 
68  using MarkerImageType = TMarkerImage;
69  using MarkerImagePointer = typename MarkerImageType::Pointer;
70  using MarkerImageConstPointer = typename MarkerImageType::ConstPointer;
71  using MarkerImagePixelType = typename MarkerImageType::PixelType;
72 
73  using AttributeAccessorType = TAttributeAccessor;
74 
76  static constexpr unsigned int ImageDimension = TImage::ImageDimension;
77 
79  itkNewMacro(Self);
80 
83 
84 #ifdef ITK_USE_CONCEPT_CHECKING
85  // Begin concept checking
86  /* itkConceptMacro(InputEqualityComparableCheck,
87  (Concept::EqualityComparable<PixelType>));
88  itkConceptMacro(IntConvertibleToInputCheck,
89  (Concept::Convertible<int, PixelType>));
90  itkConceptMacro(InputOStreamWritableCheck,
91  (Concept::OStreamWritable<PixelType>));*/
92  // End concept checking
93 #endif
94 
96  itkSetInputMacro(MarkerImage, MarkerImageType);
97  itkGetInputMacro(MarkerImage, MarkerImageType);
99 
101  void
102  SetInput1(TImage * input)
103  {
104  this->SetInput(input);
105  }
106 
108  void
109  SetInput2(TMarkerImage * input)
110  {
111  this->SetMarkerImage(input);
112  }
113 
118  itkSetMacro(ForegroundValue, MarkerImagePixelType);
119  itkGetConstMacro(ForegroundValue, MarkerImagePixelType);
121 
122 protected:
124  ~BinaryReconstructionLabelMapFilter() override = default;
125 
126  void
127  ThreadedProcessLabelObject(LabelObjectType * labelObject) override;
128 
129  void
130  PrintSelf(std::ostream & os, Indent indent) const override;
131 
132 private:
134 
135 }; // end of class
136 
137 } // end namespace itk
138 
139 #ifndef ITK_MANUAL_INSTANTIATION
140 # include "itkBinaryReconstructionLabelMapFilter.hxx"
141 #endif
142 
143 #endif
itk::BinaryReconstructionLabelMapFilter::PixelType
typename ImageType::PixelType PixelType
Definition: itkBinaryReconstructionLabelMapFilter.h:64
itk::BinaryReconstructionLabelMapFilter::AttributeAccessorType
TAttributeAccessor AttributeAccessorType
Definition: itkBinaryReconstructionLabelMapFilter.h:73
itk::InPlaceLabelMapFilter
Base class for filters that takes an image as input and overwrites that image as the output.
Definition: itkInPlaceLabelMapFilter.h:84
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::BinaryReconstructionLabelMapFilter::MarkerImageType
TMarkerImage MarkerImageType
Definition: itkBinaryReconstructionLabelMapFilter.h:68
itk::BinaryReconstructionLabelMapFilter::LabelObjectType
typename ImageType::LabelObjectType LabelObjectType
Definition: itkBinaryReconstructionLabelMapFilter.h:66
itk::BinaryReconstructionLabelMapFilter::ImagePointer
typename ImageType::Pointer ImagePointer
Definition: itkBinaryReconstructionLabelMapFilter.h:62
itk::BinaryReconstructionLabelMapFilter
Mark the objects at least partially at the same position as the objects in a binary image.
Definition: itkBinaryReconstructionLabelMapFilter.h:49
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::BinaryReconstructionLabelMapFilter::MarkerImageConstPointer
typename MarkerImageType::ConstPointer MarkerImageConstPointer
Definition: itkBinaryReconstructionLabelMapFilter.h:70
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itkAttributeLabelObject.h
itk::BinaryReconstructionLabelMapFilter::IndexType
typename ImageType::IndexType IndexType
Definition: itkBinaryReconstructionLabelMapFilter.h:65
itk::BinaryReconstructionLabelMapFilter::SetInput2
void SetInput2(TMarkerImage *input)
Definition: itkBinaryReconstructionLabelMapFilter.h:109
itk::BinaryReconstructionLabelMapFilter::MarkerImagePointer
typename MarkerImageType::Pointer MarkerImagePointer
Definition: itkBinaryReconstructionLabelMapFilter.h:69
itk::BinaryReconstructionLabelMapFilter::ImageType
TImage ImageType
Definition: itkBinaryReconstructionLabelMapFilter.h:61
itkInPlaceLabelMapFilter.h
itk::BinaryReconstructionLabelMapFilter::m_ForegroundValue
MarkerImagePixelType m_ForegroundValue
Definition: itkBinaryReconstructionLabelMapFilter.h:133
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::BinaryReconstructionLabelMapFilter::MarkerImagePixelType
typename MarkerImageType::PixelType MarkerImagePixelType
Definition: itkBinaryReconstructionLabelMapFilter.h:71
itk::BinaryReconstructionLabelMapFilter::SetInput1
void SetInput1(TImage *input)
Definition: itkBinaryReconstructionLabelMapFilter.h:102
itk::BinaryReconstructionLabelMapFilter::ImageConstPointer
typename ImageType::ConstPointer ImageConstPointer
Definition: itkBinaryReconstructionLabelMapFilter.h:63