ITK  6.0.0
Insight Toolkit
itkImageToListSampleFilter.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 itkImageToListSampleFilter_h
19#define itkImageToListSampleFilter_h
20
21#include "itkListSample.h"
22#include "itkPixelTraits.h"
23#include "itkProcessObject.h"
25
26namespace itk
27{
28namespace Statistics
29{
55template <typename TImage, typename TMaskImage = TImage>
56class ITK_TEMPLATE_EXPORT ImageToListSampleFilter : public ProcessObject
57{
58public:
59 ITK_DISALLOW_COPY_AND_MOVE(ImageToListSampleFilter);
60
66
68 itkOverrideGetNameOfClassMacro(ImageToListSampleFilter);
69
71 itkNewMacro(Self);
72
74 using ImageType = TImage;
77 using PixelType = typename ImageType::PixelType;
79
81 using MaskImageType = TMaskImage;
84 using MaskPixelType = typename MaskImageType::PixelType;
85
88
90 unsigned int
92
94 using Superclass::SetInput;
95 void
96 SetInput(const ImageType * image);
97
98 const ImageType *
99 GetInput() const;
100
102 void
104
105 const MaskImageType *
107
111 const ListSampleType *
112 GetOutput() const;
113
118 itkSetMacro(MaskValue, MaskPixelType);
119 itkGetConstMacro(MaskValue, MaskPixelType);
122protected:
124 ~ImageToListSampleFilter() override = default;
125 void
126 PrintSelf(std::ostream & os, Indent indent) const override;
127
131 using Superclass::MakeOutput;
134
136 void
137 GenerateData() override;
138
141 void
143
144 void
146
147private:
148 MaskPixelType m_MaskValue{};
149}; // end of class ImageToListSampleFilter
150} // end of namespace Statistics
151} // end of namespace itk
152
153#ifndef ITK_MANUAL_INSTANTIATION
154# include "itkImageToListSampleFilter.hxx"
155#endif
156
157#endif
SmartPointer< Self > Pointer
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
The class takes an image as input and generates a list sample as output.
void SetMaskImage(const MaskImageType *image)
typename MaskImageType::Pointer MaskImagePointer
const MaskImageType * GetMaskImage() const
typename MaskImageType::ConstPointer MaskImageConstPointer
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
Make a DataObject of the correct type to used as the specified output.
void PrintSelf(std::ostream &os, Indent indent) const override
typename MeasurementVectorPixelTraits< PixelType >::MeasurementVectorType MeasurementVectorType
void SetInput(const ImageType *image)
typename ImageType::ConstPointer ImageConstPointer
unsigned int GetMeasurementVectorSize() const
typename MaskImageType::PixelType MaskPixelType
const ListSampleType * GetOutput() const
const ImageType * GetInput() const
This class is the native implementation of the a Sample with an STL container.
Definition: itkListSample.h:52
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41