ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkNeighborhoodConnectedImageFilter.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 itkNeighborhoodConnectedImageFilter_h
19#define itkNeighborhoodConnectedImageFilter_h
20
22
23namespace itk
24{
36template <typename TInputImage, typename TOutputImage>
37class ITK_TEMPLATE_EXPORT NeighborhoodConnectedImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
38{
39public:
40 ITK_DISALLOW_COPY_AND_MOVE(NeighborhoodConnectedImageFilter);
41
47
49 itkNewMacro(Self);
50
52 itkOverrideGetNameOfClassMacro(NeighborhoodConnectedImageFilter);
53
54 using InputImageType = TInputImage;
55 using InputImagePointer = typename InputImageType::Pointer;
56 using InputImageRegionType = typename InputImageType::RegionType;
57 using InputImagePixelType = typename InputImageType::PixelType;
58 using IndexType = typename InputImageType::IndexType;
59 using InputImageSizeType = typename InputImageType::SizeType;
60
61 using SeedsContainerType = std::vector<IndexType>;
62
63 using OutputImageType = TOutputImage;
64 using OutputImagePointer = typename OutputImageType::Pointer;
65 using OutputImageRegionType = typename OutputImageType::RegionType;
66 using OutputImagePixelType = typename OutputImageType::PixelType;
67
68 void
69 PrintSelf(std::ostream & os, Indent indent) const override;
70
72 void
74
76 void
77 SetSeed(const IndexType & seed);
78
80 void
81 AddSeed(const IndexType & seed);
82
85 itkSetMacro(Seeds, SeedsContainerType);
86 itkGetConstReferenceMacro(Seeds, SeedsContainerType);
88
91 itkSetMacro(Lower, InputImagePixelType);
92 itkGetConstMacro(Lower, InputImagePixelType);
97 itkSetMacro(Upper, InputImagePixelType);
98 itkGetConstMacro(Upper, InputImagePixelType);
104 itkSetMacro(ReplaceValue, OutputImagePixelType);
105 itkGetConstMacro(ReplaceValue, OutputImagePixelType);
108 itkSetMacro(Radius, InputImageSizeType);
109
111 itkGetConstReferenceMacro(Radius, InputImageSizeType);
112
114 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
115 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
116
122
123protected:
127
130
132
134
135 // Override since the filter needs all the data for the algorithm
136 void
138
139 // Override since the filter produces the entire dataset
140 void
142
143 void
144 GenerateData() override;
145};
146} // end namespace itk
147
148#ifndef ITK_MANUAL_INSTANTIATION
149# include "itkNeighborhoodConnectedImageFilter.hxx"
150#endif
151
152#endif
Base class for all data objects in ITK.
Control indentation during Print() invocation.
Definition itkIndent.h:51
~NeighborhoodConnectedImageFilter() override=default
void SetSeed(const IndexType &seed)
typename InputImageType::RegionType InputImageRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
void EnlargeOutputRequestedRegion(DataObject *output) override
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::RegionType OutputImageRegionType
void AddSeed(const IndexType &seed)
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Implements transparent reference counting.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....