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::Statistics
27{
53template <typename TImage, typename TMaskImage = TImage>
54class ITK_TEMPLATE_EXPORT ImageToListSampleFilter : public ProcessObject
55{
56public:
57 ITK_DISALLOW_COPY_AND_MOVE(ImageToListSampleFilter);
58
64
66 itkOverrideGetNameOfClassMacro(ImageToListSampleFilter);
67
69 itkNewMacro(Self);
70
72 using ImageType = TImage;
73 using ImagePointer = typename ImageType::Pointer;
74 using ImageConstPointer = typename ImageType::ConstPointer;
75 using PixelType = typename ImageType::PixelType;
77
79 using MaskImageType = TMaskImage;
80 using MaskImagePointer = typename MaskImageType::Pointer;
81 using MaskImageConstPointer = typename MaskImageType::ConstPointer;
82 using MaskPixelType = typename MaskImageType::PixelType;
83
86
88 unsigned int
90
93 void
94 SetInput(const ImageType * image);
95
96 const ImageType *
97 GetInput() const;
98
100 void
102
103 const MaskImageType *
105
109 const ListSampleType *
110 GetOutput() const;
111
117 itkSetMacro(MaskValue, MaskPixelType);
118 itkGetConstMacro(MaskValue, MaskPixelType);
120protected:
122 ~ImageToListSampleFilter() override = default;
123 void
124 PrintSelf(std::ostream & os, Indent indent) const override;
125
132
134 void
135 GenerateData() override;
136
139 void
141
142 void
144
145private:
147}; // end of class ImageToListSampleFilter
148} // namespace itk::Statistics
149
150#ifndef ITK_MANUAL_INSTANTIATION
151# include "itkImageToListSampleFilter.hxx"
152#endif
153
154#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.