ITK  6.0.0
Insight Toolkit
itkScalarImageToCooccurrenceListSampleFilter.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 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 {
51 template <typename TImage>
52 class ITK_TEMPLATE_EXPORT ScalarImageToCooccurrenceListSampleFilter : public ProcessObject
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_MOVE(ScalarImageToCooccurrenceListSampleFilter);
56 
57  using ImageType = TImage;
58 
60 
63 
69 
72 
75  using OffsetTable = std::vector<OffsetType>;
76 
77  void
78  UseNeighbor(const OffsetType & offset);
79 
81  using Superclass::SetInput;
82  void
83  SetInput(const ImageType * image);
84 
85  const ImageType *
86  GetInput() const;
87 
89  const SampleType *
90  GetOutput() const;
91 
93  itkOverrideGetNameOfClassMacro(ScalarImageToCooccurrenceListSampleFilter);
94 
96  itkNewMacro(Self);
97 
99  static constexpr unsigned int MeasurementVectorSize = 2;
100 
102  static constexpr unsigned int ImageDimension = TImage::ImageDimension;
103 
104 protected:
106  ~ScalarImageToCooccurrenceListSampleFilter() override = default;
107  void
108  PrintSelf(std::ostream & os, Indent indent) const override;
109 
112  using Superclass::MakeOutput;
114  MakeOutput(DataObjectPointerArraySizeType idx) override;
115 
117  void
118  GenerateData() override;
119 
120 private:
121  OffsetTable m_OffsetTable{};
122 }; // end of class ScalarImageToListSampleFilter
123 } // end of namespace Statistics
124 } // end of namespace itk
125 
126 #ifndef ITK_MANUAL_INSTANTIATION
127 # include "itkScalarImageToCooccurrenceListSampleFilter.hxx"
128 #endif
129 
130 #endif
itkImageToListSampleFilter.h
itkNeighborhoodAlgorithm.h
itk::Statistics::ListSample
This class is the native implementation of the a Sample with an STL container.
Definition: itkListSample.h:51
itk::SmartPointer< Self >
itkImageRegionIterator.h
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:194
itk::ShapedNeighborhoodIterator
A neighborhood iterator which can take on an arbitrary shape.
Definition: itkShapedNeighborhoodIterator.h:149
itkConstantBoundaryCondition.h
itk::Statistics::Sample::MeasurementVectorSizeType
unsigned int MeasurementVectorSizeType
Definition: itkSample.h:94
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::Statistics::ScalarImageToCooccurrenceListSampleFilter::MeasurementVectorSizeType
typename SampleType::MeasurementVectorSizeType MeasurementVectorSizeType
Definition: itkScalarImageToCooccurrenceListSampleFilter.h:62
itkFixedArray.h
itk::FixedArray
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:53
itk::Offset
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image.
Definition: itkOffset.h:66
itkShapedNeighborhoodIterator.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::Statistics::ScalarImageToCooccurrenceListSampleFilter::OffsetType
typename ShapedNeighborhoodIteratorType::OffsetType OffsetType
Definition: itkScalarImageToCooccurrenceListSampleFilter.h:74
itk::Statistics::ScalarImageToCooccurrenceListSampleFilter::ImageType
TImage ImageType
Definition: itkScalarImageToCooccurrenceListSampleFilter.h:57
itkSmartPointer.h
itk::Statistics::ScalarImageToCooccurrenceListSampleFilter::OffsetTable
std::vector< OffsetType > OffsetTable
Definition: itkScalarImageToCooccurrenceListSampleFilter.h:75
itk::DataObject::Pointer
SmartPointer< Self > Pointer
Definition: itkDataObject.h:301
itk::Statistics::ScalarImageToCooccurrenceListSampleFilter
Converts pixel data into a list of pairs in order to compute a cooccurrence Histogram.
Definition: itkScalarImageToCooccurrenceListSampleFilter.h:52