ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkScalarImageToCooccurrenceListSampleFilter.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 itkScalarImageToCooccurrenceListSampleFilter_h
19 #define itkScalarImageToCooccurrenceListSampleFilter_h
20 
21 #include <typeinfo>
22 
24 #include "itkSmartPointer.h"
25 #include "itkImageRegionIterator.h"
29 #include "itkFixedArray.h"
30 
31 #include <vector>
32 #include <algorithm>
33 #include <iostream>
34 
35 namespace itk
36 {
37 namespace Statistics
38 {
50 template< typename TImage >
52  public ProcessObject
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_ASSIGN(ScalarImageToCooccurrenceListSampleFilter);
56 
57  using ImageType = TImage;
58 
60 
63 
69 
72  TImage,
74  >;
75 
78  using OffsetTable = std::vector< OffsetType >;
79 
80  void UseNeighbor(const OffsetType & offset);
81 
83  using Superclass::SetInput;
84  void SetInput(const ImageType *image);
85 
86  const ImageType * GetInput() const;
87 
89  const SampleType * GetOutput() const;
90 
93 
95  itkNewMacro(Self);
96 
98  static constexpr unsigned int MeasurementVectorSize = 2;
99 
101  static constexpr unsigned int ImageDimension = TImage::ImageDimension;
102 
103 protected:
105  ~ScalarImageToCooccurrenceListSampleFilter() override = default;
106  void PrintSelf(std::ostream & os, Indent indent) const override;
107 
110  using Superclass::MakeOutput;
111  DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override;
112 
114  void GenerateData() override;
115 
116 private:
118 }; // end of class ScalarImageToListSampleFilter
119 } // end of namespace Statistics
120 } // end of namespace itk
121 
122 #ifndef ITK_MANUAL_INSTANTIATION
123 #include "itkScalarImageToCooccurrenceListSampleFilter.hxx"
124 #endif
125 
126 #endif
Light weight base class for most itk classes.
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
This boundary condition returns a constant value for out-of-bounds image pixels.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
A neighborhood iterator which can take on an arbitrary shape.
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:40
Simulate a standard C array with copy semnatics.
Definition: itkFixedArray.h:51
Converts pixel data into a list of pairs in order to compute a cooccurrence Histogram.
typename Superclass::OffsetType OffsetType
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
SmartPointer< Self > Pointer
typename Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
Definition: itkListSample.h:70