ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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;
75 using ImagePointer = typename ImageType::Pointer;
76 using ImageConstPointer = typename ImageType::ConstPointer;
77 using PixelType = typename ImageType::PixelType;
79
81 using MaskImageType = TMaskImage;
82 using MaskImagePointer = typename MaskImageType::Pointer;
83 using MaskImageConstPointer = typename MaskImageType::ConstPointer;
84 using MaskPixelType = typename MaskImageType::PixelType;
85
88
90 unsigned int
92
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);
121
122protected:
124 ~ImageToListSampleFilter() override = default;
125 void
126 PrintSelf(std::ostream & os, Indent indent) const override;
127
134
136 void
137 GenerateData() override;
138
141 void
143
144 void
146
147private:
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
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
Protected method for setting indexed and named inputs.
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
Make a DataObject of the correct type to used as the specified output.
Implements transparent reference counting.
void SetMaskImage(const MaskImageType *image)
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.
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
void PrintSelf(std::ostream &os, Indent indent) const override
ListSample< MeasurementVectorType > ListSampleType
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.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....