ITK  5.2.0
Insight Toolkit
itkGTestTypedefsAndConstructors.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 
19 #ifndef itkGTestTypedefsAndConstructors_h
20 #define itkGTestTypedefsAndConstructors_h
21 
22 
23 #include "gtest/gtest.h"
24 
25 #include "itkImageBase.h"
26 
27 
28 namespace itk
29 {
30 
31 namespace GTest
32 {
33 
34 namespace TypedefsAndConstructors
35 {
36 
41 namespace Dimension2
42 {
43 
44 constexpr unsigned int Dimension = 2;
45 
47 
48 
55 
56 inline static PointType
58 {
59  const PointType::ValueType a[] = { p1, p2 };
60  PointType point(a);
61  return point;
62 }
63 
64 inline static VectorType
66 {
67  const VectorType::ValueType a[] = { v1, v2 };
68  VectorType vector(a);
69  return vector;
70 }
71 
72 inline static IndexType
74 {
75  IndexType idx = { { i1, i2 } };
76  return idx;
77 }
78 
79 inline static SizeType
81 {
82  SizeType size = { { s1, s2 } };
83  return size;
84 }
85 
86 } // end namespace Dimension2
87 
88 
93 namespace Dimension3
94 {
95 
96 constexpr unsigned int Dimension = 3;
97 
99 
100 
107 
108 inline static PointType
110 {
111  const PointType::ValueType a[] = { p1, p2, p3 };
112  PointType point(a);
113  return point;
114 }
115 
116 inline static VectorType
118 {
119  const VectorType::ValueType a[] = { v1, v2, v3 };
120  VectorType vector(a);
121  return vector;
122 }
123 
124 inline static IndexType
126 {
127  IndexType idx = { { i1, i2, i3 } };
128  return idx;
129 }
130 
131 inline static SizeType
133 {
134  SizeType size = { { s1, s2, s3 } };
135  return size;
136 }
137 
138 } // end namespace Dimension3
139 
140 } // end namespace TypedefsAndConstructors
141 } // end namespace GTest
142 } // end namespace itk
143 
144 
145 #endif // itkGTestTypedefsAndConstructors_h
itk::Index< VImageDimension >
itk::GTest::TypedefsAndConstructors::Dimension3::MakeIndex
static IndexType MakeIndex(IndexType::IndexValueType i1, IndexType::IndexValueType i2, IndexType::IndexValueType i3)
Definition: itkGTestTypedefsAndConstructors.h:125
itk::GTest::TypedefsAndConstructors::Dimension3::MakeSize
static SizeType MakeSize(SizeType::SizeValueType s1, SizeType::SizeValueType s2, SizeType::SizeValueType s3)
Definition: itkGTestTypedefsAndConstructors.h:132
itk::Size
Represent a n-dimensional size (bounds) of a n-dimensional image.
Definition: itkSize.h:69
itk::ImageBase
Base class for templated image classes.
Definition: itkImageBase.h:105
itk::ImageBase::SpacingType
Vector< SpacingValueType, VImageDimension > SpacingType
Definition: itkImageBase.h:152
itk::ImageRegion
An image region represents a structured region of data.
Definition: itkImageRegion.h:69
itk::GTest::TypedefsAndConstructors::Dimension2::MakeVector
static VectorType MakeVector(VectorType::ValueType v1, VectorType::ValueType v2)
Definition: itkGTestTypedefsAndConstructors.h:65
itk::GTest::TypedefsAndConstructors::Dimension2::VectorType
ImageBaseType::SpacingType VectorType
Definition: itkGTestTypedefsAndConstructors.h:53
itk::Vector< SpacingValueType, VImageDimension >
itk::Index< VImageDimension >::IndexValueType
::itk::IndexValueType IndexValueType
Definition: itkIndex.h:77
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::GTest::TypedefsAndConstructors::Dimension3::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:96
itk::GTest::TypedefsAndConstructors::Dimension2::MakeSize
static SizeType MakeSize(SizeType::SizeValueType s1, SizeType::SizeValueType s2)
Definition: itkGTestTypedefsAndConstructors.h:80
itk::GTest::TypedefsAndConstructors::Dimension3::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:102
itk::ImageBase::PointType
Point< PointValueType, VImageDimension > PointType
Definition: itkImageBase.h:157
itk::ImageBase::IndexType
Index< VImageDimension > IndexType
Definition: itkImageBase.h:132
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::GTest::TypedefsAndConstructors::Dimension2::MakeIndex
static IndexType MakeIndex(IndexType::IndexValueType i1, IndexType::IndexValueType i2)
Definition: itkGTestTypedefsAndConstructors.h:73
itk::GTest::TypedefsAndConstructors::Dimension3::MakeVector
static VectorType MakeVector(VectorType::ValueType v1, VectorType::ValueType v2, VectorType::ValueType v3)
Definition: itkGTestTypedefsAndConstructors.h:117
itk::ImageBase::RegionType
ImageRegion< VImageDimension > RegionType
Definition: itkImageBase.h:145
itk::Size::SizeValueType
::itk::SizeValueType SizeValueType
Definition: itkSize.h:80
itk::GTest::TypedefsAndConstructors::Dimension3::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:101
itk::GTest::TypedefsAndConstructors::Dimension3::VectorType
ImageBaseType::SpacingType VectorType
Definition: itkGTestTypedefsAndConstructors.h:105
itk::GTest::TypedefsAndConstructors::Dimension2::MakePoint
static PointType MakePoint(PointType::ValueType p1, PointType::ValueType p2)
Definition: itkGTestTypedefsAndConstructors.h:57
itk::Matrix< SpacePrecisionType, VImageDimension, VImageDimension >
itk::Vector< SpacingValueType, VImageDimension >::ValueType
SpacingValueType ValueType
Definition: itkVector.h:71
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::GTest::TypedefsAndConstructors::Dimension3::MakePoint
static PointType MakePoint(PointType::ValueType p1, PointType::ValueType p2, PointType::ValueType p3)
Definition: itkGTestTypedefsAndConstructors.h:109
itk::ImageBase::DirectionType
Matrix< SpacePrecisionType, VImageDimension, VImageDimension > DirectionType
Definition: itkImageBase.h:162
itk::Point< PointValueType, VImageDimension >
itk::Point< PointValueType, VImageDimension >::ValueType
PointValueType ValueType
Definition: itkPoint.h:63
itk::ImageBase::SizeType
Size< VImageDimension > SizeType
Definition: itkImageBase.h:141
itk::GTest::TypedefsAndConstructors::Dimension2::Dimension
constexpr unsigned int Dimension
Definition: itkGTestTypedefsAndConstructors.h:44
itkImageBase.h