ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkRieszStructureTensorImageFilter.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 itkRieszStructureTensorImageFilter_h
19#define itkRieszStructureTensorImageFilter_h
20
24#include <itkArray.h>
28namespace itk
29{
81template <typename TInputImage,
82 typename TOutputImage = itk::Image<itk::VariableSizeMatrix<double>, TInputImage::ImageDimension>>
83class RieszStructureTensorImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
84{
85public:
86 ITK_DISALLOW_COPY_AND_MOVE(RieszStructureTensorImageFilter);
87
94
96 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
97
99 itkNewMacro(Self);
100
102 itkOverrideGetNameOfClassMacro(RieszStructureTensorImageFilter);
103
107
108 using InputImagePointer = typename InputImageType::Pointer;
109 using InputImageConstPointer = typename InputImageType::ConstPointer;
110 using InputImageRegionType = typename InputImageType::RegionType;
111 using InputImagePixelType = typename InputImageType::PixelType;
112 using SpacingType = typename InputImageType::SpacingType;
113 using SizeType = typename InputImageRegionType::SizeType;
114
115 using OutputImagePointer = typename OutputImageType::Pointer;
116 using OutputImageConstPointer = typename OutputImageType::ConstPointer;
117 using OutputImageRegionType = typename OutputImageType::RegionType;
118 using OutputImagePixelType = typename OutputImageType::PixelType;
119
120 using FloatType = double;
123
124 // This ensure that PixelType is float||double, and not complex.
131
132 using InputsType = typename std::vector<InputImagePointer>;
133 // using InputsType = typename itk::VectorContainer<InputImagePointer>;
134 //
135 void
136 SetInputs(const InputsType & inputs);
137
142 itkSetMacro(GaussianWindowRadius, FloatType);
143 itkGetConstMacro(GaussianWindowRadius, FloatType);
148 itkSetMacro(GaussianWindowSigma, FloatType);
149 itkGetConstMacro(GaussianWindowSigma, FloatType);
154 itkGetModifiableObjectMacro(GaussianSource, GaussianSourceType);
155
166 ComputeProjectionImage(unsigned int eigen_number) const;
167
176
187
203 bool reOrderLargestEigenvectorInFirstRow = false) const;
204
205protected:
208 void
209 PrintSelf(std::ostream & os, Indent indent) const override;
210
211 void
213
214 void
215 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
216
218 static unsigned int
219 LowerTriangleToLinearIndex(unsigned int r, unsigned int c)
220 {
221 return r + (c + 1) * c / 2;
222 }
223
224private:
225 unsigned int m_GaussianWindowRadius{ 2 };
229};
230} // end namespace itk
231#ifndef ITK_MANUAL_INSTANTIATION
232# include "itkRieszStructureTensorImageFilter.hxx"
233#endif
234
235#endif
Array class with size defined at construction time.
Definition itkArray.h:48
Generate an n-dimensional image of a Gaussian.
TOutputImage OutputImageType
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:53
typename Superclass::OutputImageType OutputImageType
typename InputImageRegionType::SizeType SizeType
InputImagePointer ComputeCoherencyImage() const
InputImagePointer ComputeProjectionImage(unsigned int eigen_number) const
itk::Array< typename OutputImagePixelType::ValueType > EigenValuesType
itk::Image< FloatType, ImageDimension > FloatImageType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
~RieszStructureTensorImageFilter() override=default
GaussianImageSource< FloatImageType > GaussianSourceType
typename OutputImageType::ConstPointer OutputImageConstPointer
itk::SymmetricEigenAnalysis< EigenMatrixType, EigenValuesType > SymmetricEigenAnalysisType
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::RegionType InputImageRegionType
void SetInputs(const InputsType &inputs)
static unsigned int LowerTriangleToLinearIndex(unsigned int r, unsigned int c)
EigenMatrixType GetRotationMatrixFromOutputMatrix(const EigenMatrixType &outputMatrix, bool reOrderLargestEigenvectorInFirstRow=false) const
InputImagePointer ComputeProjectionImageWithLargestResponse() const
typename std::vector< InputImagePointer > InputsType
void PrintSelf(std::ostream &os, Indent indent) const override
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
typename OutputImageType::RegionType OutputImageRegionType
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::ConstPointer InputImageConstPointer
Implements transparent reference counting.
Find Eigen values of a real 2D symmetric matrix. It serves as a thread-safe alternative to the class:...
#define itkConceptMacro(name, conceptType)
Compile-time check that a template argument satisfies an itk::Concept.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)