ITK  5.2.0
Insight Toolkit
itkDiffusionTensor3D.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  * 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 itkDiffusionTensor3D_h
19 #define itkDiffusionTensor3D_h
20 
21 // Undefine an eventual DiffusionTensor3D macro
22 #ifdef DiffusionTensor3D
23 # undef DiffusionTensor3D
24 #endif
25 
27 
28 namespace itk
29 {
78 template <typename TComponent>
79 class ITK_TEMPLATE_EXPORT DiffusionTensor3D : public SymmetricSecondRankTensor<TComponent, 3>
80 {
81 public:
85 
87  using ValueType = typename Superclass::ValueType;
90 
93 
96 
98  DiffusionTensor3D() = default;
99 
101  DiffusionTensor3D(const Superclass & r);
102  DiffusionTensor3D(const ComponentType & r);
105 
107  template <typename TCoordRepB>
109  : SymmetricSecondRankTensor<TComponent, 3>(pa)
110  {}
111 
113  Self &
114  operator=(const Superclass & r);
115 
116  Self &
117  operator=(const ComponentType & r);
118 
119  Self &
120  operator=(const ComponentArrayType r);
121 
123  template <typename TCoordRepB>
124  Self &
126  {
127  // NOTE (this != &pa ) because they are different pointer types
128  // if this templated function is called
129  // ComponentType 'itk::DiffusionTensor3D<double> *'
130  // TCoordRepB 'const DiffusionTensor3D<float> *')
132  return *this;
133  }
135 
137  AccumulateValueType
138  GetTrace() const;
139 
141  RealValueType
142  GetFractionalAnisotropy() const;
143 
145  RealValueType
146  GetRelativeAnisotropy() const;
147 
149  RealValueType
150  GetInnerScalarProduct() const;
151 };
152 
153 
154 template <typename T>
155 inline void
157 {
158  a.swap(b);
159 }
160 
161 } // end namespace itk
163 
164 #ifndef ITK_MANUAL_INSTANTIATION
165 # include "itkDiffusionTensor3D.hxx"
166 #endif
167 
168 #endif
itk::SymmetricSecondRankTensor< TComponent, 3 >::ComponentArrayType
ComponentType[Self::InternalDimension] ComponentArrayType
Definition: itkSymmetricSecondRankTensor.h:124
itk::DiffusionTensor3D::AccumulateValueType
typename Superclass::AccumulateValueType AccumulateValueType
Definition: itkDiffusionTensor3D.h:91
itk::DiffusionTensor3D::EigenVectorsMatrixType
typename Superclass::EigenVectorsMatrixType EigenVectorsMatrixType
Definition: itkDiffusionTensor3D.h:95
itk::DiffusionTensor3D::RealValueType
typename Superclass::RealValueType RealValueType
Definition: itkDiffusionTensor3D.h:92
itk::SymmetricSecondRankTensor::operator=
SymmetricSecondRankTensor & operator=(const SymmetricSecondRankTensor &)=default
itk::SymmetricSecondRankTensor< TComponent, 3 >::AccumulateValueType
typename NumericTraits< ValueType >::RealType AccumulateValueType
Definition: itkSymmetricSecondRankTensor.h:99
itk::swap
void swap(Array< T > &a, Array< T > &b)
Definition: itkArray.h:244
itk::DiffusionTensor3D
Represent a diffusion tensor as used in DTI images.
Definition: itkDiffusionTensor3D.h:79
itk::SymmetricSecondRankTensor
Represent a symmetric tensor of second rank.
Definition: itkSymmetricSecondRankTensor.h:75
itkSymmetricSecondRankTensor.h
itk::SymmetricSecondRankTensor< TComponent, 3 >::ComponentType
TComponent ComponentType
Definition: itkSymmetricSecondRankTensor.h:97
itk::FixedArray
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:52
itk::Matrix
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:51
itkNumericTraitsDiffusionTensor3DPixel.h
itk::DiffusionTensor3D::DiffusionTensor3D
DiffusionTensor3D(const DiffusionTensor3D< TCoordRepB > &pa)
Definition: itkDiffusionTensor3D.h:108
itk::SymmetricSecondRankTensor< TComponent, 3 >::RealValueType
typename NumericTraits< ValueType >::RealType RealValueType
Definition: itkSymmetricSecondRankTensor.h:100
itk::SymmetricSecondRankTensor< TComponent, 3 >::ValueType
typename Superclass::ValueType ValueType
Definition: itkSymmetricSecondRankTensor.h:98
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::DiffusionTensor3D::operator=
Self & operator=(const DiffusionTensor3D< TCoordRepB > &pa)
Definition: itkDiffusionTensor3D.h:125
itk::DiffusionTensor3D::ComponentType
typename Superclass::ComponentType ComponentType
Definition: itkDiffusionTensor3D.h:88
itk::FixedArray< TComponent, NDimension *(NDimension+1)/2 >::swap
void swap(FixedArray &other)
Definition: itkFixedArray.h:444
itk::DiffusionTensor3D::EigenValuesArrayType
typename Superclass::EigenValuesArrayType EigenValuesArrayType
Definition: itkDiffusionTensor3D.h:94
itk::DiffusionTensor3D::ComponentArrayType
typename Superclass::ComponentArrayType ComponentArrayType
Definition: itkDiffusionTensor3D.h:89
itk::DiffusionTensor3D::ValueType
typename Superclass::ValueType ValueType
Definition: itkDiffusionTensor3D.h:87