ITK  5.4.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 * 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 itkDiffusionTensor3D_h
19#define itkDiffusionTensor3D_h
20
21// Undefine an eventual DiffusionTensor3D macro
22#ifdef DiffusionTensor3D
23# undef DiffusionTensor3D
24#endif
25
27
28namespace itk
29{
78template <typename TComponent>
79class ITK_TEMPLATE_EXPORT DiffusionTensor3D : public SymmetricSecondRankTensor<TComponent, 3>
80{
81public:
85
87 using typename Superclass::ValueType;
88 using typename Superclass::ComponentType;
89 using typename Superclass::ComponentArrayType;
90
92 using typename Superclass::RealValueType;
93
96
98 DiffusionTensor3D() = default;
99
107 template <typename TCoordRepB>
109 : SymmetricSecondRankTensor<TComponent, 3>(pa)
110 {}
111
113 Self &
115
116 Self &
118
119 Self &
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 }
150 AccumulateValueType
151 GetTrace() const;
152
156
160
164};
165
166
167template <typename T>
168inline void
170{
171 a.swap(b);
172}
173
174} // end namespace itk
176
177#ifndef ITK_MANUAL_INSTANTIATION
178# include "itkDiffusionTensor3D.hxx"
179#endif
180
181#endif
Pixel-wise addition of two images.
Represent a diffusion tensor as used in DTI images.
AccumulateValueType GetTrace() const
DiffusionTensor3D(const Superclass &r)
DiffusionTensor3D(const ComponentType &r)
Self & operator=(const ComponentType &r)
Self & operator=(const ComponentArrayType r)
DiffusionTensor3D(const DiffusionTensor3D< TCoordRepB > &pa)
Self & operator=(const DiffusionTensor3D< TCoordRepB > &pa)
Self & operator=(const Superclass &r)
DiffusionTensor3D(const ComponentArrayType r)
RealValueType GetRelativeAnisotropy() const
RealValueType GetFractionalAnisotropy() const
RealValueType GetInnerScalarProduct() const
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:54
void swap(FixedArray &other)
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:53
Represent a symmetric tensor of second rank.
typename NumericTraits< ValueType >::RealType RealValueType
ComponentType[Self::InternalDimension] ComponentArrayType
Self & operator=(const SymmetricSecondRankTensor< TCoordRepB, VDimension > &pa)
typename NumericTraits< ValueType >::RealType AccumulateValueType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
void swap(Array< T > &a, Array< T > &b)
Definition: itkArray.h:242