ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkRieszRotationMatrix.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 itkRieszRotationMatrix_h
19#define itkRieszRotationMatrix_h
20#include <vector>
21#include "itkImage.h"
22#include "itkMatrix.h"
23#include "itkRieszUtilities.h"
25#include "itkVectorContainer.h"
26
27namespace itk
28{
47
48template <unsigned int VImageDimension>
49class RieszRotationMatrix : public itk::VariableSizeMatrix<std::complex<double>>
50{
51public:
54 using ValueType = std::complex<double>;
56
58 using RealType = typename ValueType::value_type;
62
67 template <typename TImage>
68 std::vector<typename TImage::Pointer>
69 MultiplyWithVectorOfImages(const std::vector<typename TImage::Pointer> & vect) const;
70
71 template <typename TInputValue>
72 std::vector<TInputValue>
73 MultiplyWithVector(const std::vector<TInputValue> & vect) const;
74
75 template <typename TInputValue>
78
94 const InternalMatrixType &
96
98 using IndicesArrayType = std::vector<unsigned int>;
99 using IndicesVector = std::vector<IndicesArrayType>;
100 using IndicesMatrixRow = std::vector<IndicesVector>;
101 using IndicesMatrix = std::vector<IndicesMatrixRow>;
102
129
133 RieszRotationMatrix(const Self & matrix);
135 RieszRotationMatrix(const SpatialRotationMatrixType & spatialRotationMatrix, const unsigned int & order);
136
144 const unsigned int &
145 GetOrder() const
146 {
147 return this->m_Order;
148 }
149 void
150 SetOrder(const unsigned int & order)
151 {
152 this->m_Order = order;
153 this->m_Components = itk::utils::ComputeNumberOfComponents(this->m_Order, VImageDimension);
154 this->SetSize(this->m_Components, this->m_Components);
155 }
156
165 const unsigned int &
167 {
168 return this->m_Components;
169 }
170
174 {
175 return this->m_SpatialRotationMatrix;
176 }
177
178 void
180 {
181 this->m_SpatialRotationMatrix = spatialRotationMatrix;
182 }
183
196 const RealType &
201 void
202 SetMaxAbsoluteDifferenceCloseToZero(const RealType & maxAbsoluteDifference)
203 {
204 this->m_MaxAbsoluteDifferenceCloseToZero = maxAbsoluteDifference;
205 }
206 // ------- Debug Macro ------
208 const bool &
209 GetDebug() const
210 {
211 return this->m_Debug;
212 }
213 void
214 SetDebug(const bool & boolean)
215 {
216 this->m_Debug = boolean;
217 }
218 void
220 {
221 this->m_Debug = true;
222 }
223 void
225 {
226 this->m_Debug = false;
227 }
228
229private:
230 using ResultValueType = std::complex<long double>;
232 unsigned int m_Order{ 0 };
233 unsigned int m_Components{ 0 };
235 bool m_Debug{ false };
236
237}; // end of class
238} // end namespace itk
239#ifndef ITK_MANUAL_INSTANTIATION
240# include "itkRieszRotationMatrix.hxx"
241#endif
242
243#endif
Templated n-dimensional image class.
Definition itkImage.h:89
A templated class holding a M x N size Matrix.
Definition itkMatrix.h:71
VariableSizeMatrix< TInputValue > MultiplyWithColumnMatrix(const VariableSizeMatrix< TInputValue > &vect) const
std::vector< IndicesMatrixRow > IndicesMatrix
void SetMaxAbsoluteDifferenceCloseToZero(const RealType &maxAbsoluteDifference)
itk::Matrix< RealType, VImageDimension, VImageDimension > SpatialRotationMatrixType
const SpatialRotationMatrixType & GetSpatialRotationMatrix() const
Get/Set the spatial rotation matrix from which the steerable matrix is composed.
IndicesMatrix GenerateIndicesMatrix()
void SetDebug(const bool &boolean)
std::complex< long double > ResultValueType
std::vector< IndicesVector > IndicesMatrixRow
RieszRotationMatrix(const SpatialRotationMatrixType &spatialRotationMatrix, const unsigned int &order)
const unsigned int & GetComponents() const
itk::VariableSizeMatrix< ValueType > Superclass
void SetOrder(const unsigned int &order)
const RealType & GetMaxAbsoluteDifferenceCloseToZero() const
std::vector< TInputValue > MultiplyWithVector(const std::vector< TInputValue > &vect) const
std::vector< typename TImage::Pointer > MultiplyWithVectorOfImages(const std::vector< typename TImage::Pointer > &vect) const
typename ValueType::value_type RealType
RieszRotationMatrix(const Self &matrix)
const bool & GetDebug() const
Get/Set Debug flag to print extra information.
void SetSpatialRotationMatrix(const SpatialRotationMatrixType &spatialRotationMatrix)
std::vector< unsigned int > IndicesArrayType
Typedefs for IndicesMatrix.
std::vector< IndicesArrayType > IndicesVector
itk::Image< ValueType, VImageDimension > ComplexImageType
std::complex< double > ValueType
typename Superclass::InternalMatrixType InternalMatrixType
const unsigned int & GetOrder() const
SpatialRotationMatrixType m_SpatialRotationMatrix
const InternalMatrixType & ComputeSteerableMatrix()
A templated class holding a M x N size Matrix.
IsotropicWavelets_EXPORT unsigned int ComputeNumberOfComponents(const unsigned int &order, const unsigned int &dimension)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....