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 OutputImageType = TOutputImage;
62 using OutputImagePointer = typename OutputImageType::Pointer;
63 using OutputImageRegionType = typename OutputImageType::RegionType;
64 using OutputImagePixelType = typename OutputImageType::PixelType;
65
66 void
67 PrintSelf(std::ostream & os, Indent indent) const override;
68
70 void
72
74 void
75 SetSeed(const IndexType & seed);
76
78 void
79 AddSeed(const IndexType & seed);
80
82 itkSetMacro(Lower, InputImagePixelType);
83 itkGetConstMacro(Lower, InputImagePixelType);
85
88 itkSetMacro(Upper, InputImagePixelType);
89 itkGetConstMacro(Upper, InputImagePixelType);
91
95 itkSetMacro(ReplaceValue, OutputImagePixelType);
96 itkGetConstMacro(ReplaceValue, OutputImagePixelType);
98
100 itkSetMacro(Radius, InputImageSizeType);
101
103 itkGetConstReferenceMacro(Radius, InputImageSizeType);
104
106 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
107 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
108
114
115protected:
118 std::vector<IndexType> m_Seeds{};
119
122
124
126
127 // Override since the filter needs all the data for the algorithm
128 void
130
131 // Override since the filter produces the entire dataset
132 void
134
135 void
136 GenerateData() override;
137};
138} // end namespace itk
139
140#ifndef ITK_MANUAL_INSTANTIATION
141# include "itkNeighborhoodConnectedImageFilter.hxx"
142#endif
143
144#endif
Base class for all data objects in ITK.
Control indentation during Print() invocation.
Definition itkIndent.h:50
~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....