ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkImageToListSampleFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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"
24 #include "itkDataObjectDecorator.h"
25 
26 namespace itk
27 {
28 namespace Statistics
29 {
54 template< typename TImage, typename TMaskImage = TImage >
56  public ProcessObject
57 {
58 public:
64 
67 
69  itkNewMacro(Self);
70 
72  typedef TImage ImageType;
73  typedef typename ImageType::Pointer ImagePointer;
74  typedef typename ImageType::ConstPointer ImageConstPointer;
75  typedef typename ImageType::PixelType PixelType;
76  typedef typename MeasurementVectorPixelTraits<
78 
80  typedef TMaskImage MaskImageType;
81  typedef typename MaskImageType::Pointer MaskImagePointer;
82  typedef typename MaskImageType::ConstPointer MaskImageConstPointer;
83  typedef typename MaskImageType::PixelType MaskPixelType;
84 
87 
89  unsigned int GetMeasurementVectorSize() const;
90 
93  void SetInput(const ImageType *image);
94 
95  const ImageType * GetInput() const;
96 
98  void SetMaskImage(const MaskImageType *image);
99 
100  const MaskImageType * GetMaskImage() const;
101 
105  const ListSampleType * GetOutput() const;
106 
111  itkSetMacro(MaskValue, MaskPixelType);
112  itkGetConstMacro(MaskValue, MaskPixelType);
114 
115 protected:
118  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
119 
125 
127  virtual void GenerateData() ITK_OVERRIDE;
128 
131  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
132 
133  virtual void GenerateOutputInformation() ITK_OVERRIDE;
134 
135 private:
136  ImageToListSampleFilter(const Self &); //purposely not implemented
137  void operator=(const Self &); //purposely not implemented
138 
140 }; // end of class ImageToListSampleFilter
141 } // end of namespace Statistics
142 } // end of namespace itk
143 
144 #ifndef ITK_MANUAL_INSTANTIATION
145 #include "itkImageToListSampleFilter.hxx"
146 #endif
147 
148 #endif
Light weight base class for most itk classes.
const ImageType * GetInput() const
virtual void GenerateInputRequestedRegion() ITK_OVERRIDE
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
The class takes an image as input and generates a list sample as output.
MeasurementVectorPixelTraits< PixelType >::MeasurementVectorType MeasurementVectorType
void SetInput(const ImageType *image)
void SetMaskImage(const MaskImageType *image)
virtual void GenerateData() ITK_OVERRIDE
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
const MaskImageType * GetMaskImage() const
const ListSampleType * GetOutput() const
unsigned int GetMeasurementVectorSize() const
virtual void SetInput(const DataObjectIdentifierType &key, DataObject *input)
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx)
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
This class is the native implementation of the a Sample with an STL container.
Definition: itkListSample.h:51
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void GenerateOutputInformation() ITK_OVERRIDE
virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) ITK_OVERRIDE
ListSample< MeasurementVectorType > ListSampleType