ITK  6.0.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 * https://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
24namespace itk
25{
44template <typename TImage,
45 typename TMarkerImage,
46 typename TAttributeAccessor =
47 typename Functor::AttributeLabelObjectAccessor<typename TImage::LabelObjectType>>
48class ITK_TEMPLATE_EXPORT BinaryReconstructionLabelMapFilter : public InPlaceLabelMapFilter<TImage>
49{
50public:
51 ITK_DISALLOW_COPY_AND_MOVE(BinaryReconstructionLabelMapFilter);
52
58
60 using ImageType = TImage;
63 using PixelType = typename ImageType::PixelType;
65 using LabelObjectType = typename ImageType::LabelObjectType;
66
67 using MarkerImageType = TMarkerImage;
70 using MarkerImagePixelType = typename MarkerImageType::PixelType;
71
72 using AttributeAccessorType = TAttributeAccessor;
73
75 static constexpr unsigned int ImageDimension = TImage::ImageDimension;
76
78 itkNewMacro(Self);
79
81 itkOverrideGetNameOfClassMacro(BinaryReconstructionLabelMapFilter);
82
83#ifdef ITK_USE_CONCEPT_CHECKING
84 // Begin concept checking
85 /* itkConceptMacro(InputEqualityComparableCheck,
86 (Concept::EqualityComparable<PixelType>));
87 itkConceptMacro(IntConvertibleToInputCheck,
88 (Concept::Convertible<int, PixelType>));
89 itkConceptMacro(InputOStreamWritableCheck,
90 (Concept::OStreamWritable<PixelType>));*/
91 // End concept checking
92#endif
93
100 void
101 SetInput1(TImage * input)
102 {
103 this->SetInput(input);
104 }
105
107 void
108 SetInput2(TMarkerImage * input)
109 {
110 this->SetMarkerImage(input);
111 }
112
117 itkSetMacro(ForegroundValue, MarkerImagePixelType);
118 itkGetConstMacro(ForegroundValue, MarkerImagePixelType);
121protected:
124
125 void
127
128 void
129 PrintSelf(std::ostream & os, Indent indent) const override;
130
131private:
132 MarkerImagePixelType m_ForegroundValue{};
133
134}; // end of class
135
136} // end namespace itk
137
138#ifndef ITK_MANUAL_INSTANTIATION
139# include "itkBinaryReconstructionLabelMapFilter.hxx"
140#endif
141
142#endif
Mark the objects at least partially at the same position as the objects in a binary image.
typename MarkerImageType::ConstPointer MarkerImageConstPointer
~BinaryReconstructionLabelMapFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
itkSetInputMacro(MarkerImage, MarkerImageType)
void ThreadedProcessLabelObject(LabelObjectType *labelObject) override
itkGetInputMacro(MarkerImage, MarkerImageType)
Base class for filters that takes an image as input and overwrites that image as the output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....