ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkGTestTypedefsAndConstructors.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 const unsigned int Dimension = 2;
45 
47 
48 
54 
55 
58 {
59  const PointType::ValueType a[] = {p1,p2};
60  PointType point(a);
61  return point;
62 }
63 
66 {
67  const VectorType::ValueType a[] = {v1,v2};
68  VectorType vector(a);
69  return vector;
70 }
71 
74 {
75  IndexType idx = {{i1,i2}};
76  return idx;
77 }
78 
81 {
82  SizeType size = {{s1,s2}};
83  return size;
84 }
85 
86 } // end namespace Dimension2
87 
88 
93 namespace Dimension3
94 {
95 
96 const unsigned int Dimension = 3;
97 
99 
100 
106 
107 
111 {
112  const PointType::ValueType a[] = {p1,p2,p3};
113  PointType point(a);
114  return point;
115 }
116 
120 {
121  const VectorType::ValueType a[] = {v1,v2,v3};
122  VectorType vector(a);
123  return vector;
124 }
125 
129 {
130  IndexType idx = {{i1,i2,i3}};
131  return idx;
132 }
133 
137 {
138  SizeType size = {{s1,s2,s3}};
139  return size;
140 }
141 
142 } // end namespace Dimension3
143 
144 } // end namespace TypedefsAndConstructors
145 } // end namespace GTest
146 } // end namespace itk
147 
148 
149 #endif // itkGTestTypedefsAndConstructors_h
static PointType MakePoint(PointType::ValueType p1, PointType::ValueType p2)
static IndexType MakeIndex(IndexType::IndexValueType i1, IndexType::IndexValueType i2)
static IndexType MakeIndex(IndexType::IndexValueType i1, IndexType::IndexValueType i2, IndexType::IndexValueType i3)
itk::SizeValueType SizeValueType
Definition: itkSize.h:60
Represent the size (bounds) of a n-dimensional image.
Definition: itkSize.h:52
static VectorType MakeVector(VectorType::ValueType v1, VectorType::ValueType v2, VectorType::ValueType v3)
::itk::IndexValueType IndexValueType
Definition: itkIndex.h:80
static SizeType MakeSize(SizeType::SizeValueType s1, SizeType::SizeValueType s2, SizeType::SizeValueType s3)
static VectorType MakeVector(VectorType::ValueType v1, VectorType::ValueType v2)
static SizeType MakeSize(SizeType::SizeValueType s1, SizeType::SizeValueType s2)
Base class for templated image classes.
Definition: itkImageBase.h:114
static PointType MakePoint(PointType::ValueType p1, PointType::ValueType p2, PointType::ValueType p3)