18 #ifndef itkLabelMapMaskImageFilter_h
19 #define itkLabelMapMaskImageFilter_h
46 template <
typename TInputImage,
typename TOutputImage>
66 using LabelType =
typename LabelObjectType::LabelType;
79 static constexpr
unsigned int InputImageDimension = TInputImage::ImageDimension;
80 static constexpr
unsigned int OutputImageDimension = TOutputImage::ImageDimension;
81 static constexpr
unsigned int ImageDimension = TOutputImage::ImageDimension;
94 this->SetNthInput(1, const_cast<TOutputImage *>(input));
98 const OutputImageType *
108 this->SetInput(input);
115 this->SetFeatureImage(input);
122 itkSetMacro(BackgroundValue, OutputImagePixelType);
123 itkGetConstMacro(BackgroundValue, OutputImagePixelType);
129 itkSetMacro(
Label, InputImagePixelType);
130 itkGetConstMacro(
Label, InputImagePixelType);
136 itkSetMacro(Negated,
bool);
137 itkGetConstReferenceMacro(Negated,
bool);
138 itkBooleanMacro(Negated);
144 itkSetMacro(Crop,
bool);
145 itkGetConstReferenceMacro(Crop,
bool);
146 itkBooleanMacro(Crop);
154 itkGetConstReferenceMacro(CropBorder,
SizeType);
165 GenerateInputRequestedRegion()
override;
169 EnlargeOutputRequestedRegion(
DataObject * itkNotUsed(output))
override;
172 GenerateOutputInformation()
override;
175 GenerateData()
override;
178 DynamicThreadedGenerateData(
const OutputImageRegionType & outputRegionForThread)
override;
184 Superclass::DynamicThreadedGenerateData(outputRegion);
188 ThreadedProcessLabelObject(LabelObjectType * labelObject)
override;
191 PrintSelf(std::ostream & os,
Indent indent)
const override;
196 bool m_Negated{
false };
197 bool m_Crop{
false };
205 #ifndef ITK_MANUAL_INSTANTIATION
206 # include "itkLabelMapMaskImageFilter.hxx"