26 CPPUNIT_TEST_SUITE(mitkArbitraryTimeGeometryTestSuite);
44 CPPUNIT_TEST_SUITE_END();
91 m_Geometry3_5MinTP = 3.5;
95 m_Geometry1MaxTP = 1.9;
96 m_Geometry2MaxTP = 2.9;
97 m_Geometry3MaxTP = 3.9;
98 m_Geometry3_5MaxTP = 3.9;
99 m_Geometry4MaxTP = 4.9;
100 m_Geometry5MaxTP = 5.9;
103 m_NewGeometryMinTP = 20;
104 m_NewGeometryMaxTP = 21.9;
107 m_NewGeometry->SetOrigin(origin);
110 m_emptyTimeGeometry->ClearAllGeometries();
113 m_initTimeGeometry->Initialize();
116 m_12345TimeGeometry->ClearAllGeometries();
117 m_12345TimeGeometry->AppendTimeStep(m_Geometry1, m_Geometry1MaxTP, m_Geometry1MinTP);
118 m_12345TimeGeometry->AppendTimeStep(m_Geometry2, m_Geometry2MaxTP, m_Geometry2MinTP);
119 m_12345TimeGeometry->AppendTimeStep(m_Geometry3, m_Geometry3MaxTP, m_Geometry3MinTP);
120 m_12345TimeGeometry->AppendTimeStep(m_Geometry4, m_Geometry4MaxTP, m_Geometry4MinTP);
121 m_12345TimeGeometry->AppendTimeStep(m_Geometry5, m_Geometry5MaxTP, m_Geometry5MinTP);
124 m_123TimeGeometry->ClearAllGeometries();
125 m_123TimeGeometry->AppendTimeStep(m_Geometry1, m_Geometry1MaxTP, m_Geometry1MinTP);
126 m_123TimeGeometry->AppendTimeStep(m_Geometry2, m_Geometry2MaxTP, m_Geometry2MinTP);
127 m_123TimeGeometry->AppendTimeStep(m_Geometry3, m_Geometry3MaxTP, m_Geometry3MinTP);
130 void tearDown()
override {}
131 void CountTimeSteps()
134 "Testing CountTimeSteps with m_emptyTimeGeometry");
136 "Testing CountTimeSteps with m_initTimeGeometry");
138 "Testing CountTimeSteps with m_12345TimeGeometry");
141 void GetMinimumTimePoint()
144 "Testing GetMinimumTimePoint with m_emptyTimeGeometry");
146 "Testing GetMinimumTimePoint with m_initTimeGeometry");
148 "Testing GetMinimumTimePoint with m_12345TimeGeometry");
151 "Testing GetMinimumTimePoint(2) with m_emptyTimeGeometry");
153 "Testing GetMinimumTimePoint(2) with m_initTimeGeometry");
155 "Testing GetMinimumTimePoint(2) with m_12345TimeGeometry");
158 void GetMaximumTimePoint()
161 "Testing GetMaximumTimePoint with m_emptyTimeGeometry");
163 "Testing GetMaximumTimePoint with m_initTimeGeometry");
165 "Testing GetMaximumTimePoint with m_12345TimeGeometry");
168 "Testing GetMaximumTimePoint(2) with m_emptyTimeGeometry");
170 "Testing GetMaximumTimePoint(2) with m_initTimeGeometry");
172 "Testing GetMaximumTimePoint(2) with m_12345TimeGeometry");
178 "Testing GetMaximumTimePoint(2) with m_emptyTimeGeometry");
180 "Testing GetMaximumTimePoint(2) with m_initTimeGeometry");
182 "Testing GetMaximumTimePoint(2) with m_12345TimeGeometry");
185 "Testing GetTimeBounds lower part with m_emptyTimeGeometry");
187 "Testing GetTimeBounds lower part with m_initTimeGeometry");
189 "Testing GetTimeBounds lower part with m_12345TimeGeometry");
192 "Testing GetTimeBounds with m_emptyTimeGeometry");
194 "Testing GetTimeBounds with m_initTimeGeometry");
196 "Testing GetTimeBounds with m_12345TimeGeometry");
199 "Testing GetTimeBounds(3) lower part with m_emptyTimeGeometry");
201 "Testing GetTimeBounds(3) lower part with m_initTimeGeometry");
203 "Testing GetTimeBounds(3) lower part with m_12345TimeGeometry");
206 "Testing GetTimeBounds(3) with m_emptyTimeGeometry");
208 "Testing GetTimeBounds(3) with m_initTimeGeometry");
210 "Testing GetTimeBounds(3) with m_12345TimeGeometry");
213 void IsValidTimePoint()
216 "Testing IsValidTimePoint(-1) with m_emptyTimeGeometry");
218 "Testing IsValidTimePoint(-1) with m_initTimeGeometry");
220 "Testing IsValidTimePoint(-1) with m_12345TimeGeometry");
223 "Testing IsValidTimePoint(0) with m_emptyTimeGeometry");
225 "Testing IsValidTimePoint(0) with m_initTimeGeometry");
227 "Testing IsValidTimePoint(0) with m_12345TimeGeometry");
230 "Testing IsValidTimePoint(1) with m_emptyTimeGeometry");
232 "Testing IsValidTimePoint(1) with m_initTimeGeometry");
234 "Testing IsValidTimePoint(1) with m_12345TimeGeometry");
237 "Testing IsValidTimePoint(2.5) with m_emptyTimeGeometry");
239 "Testing IsValidTimePoint(2.5) with m_initTimeGeometry");
241 "Testing IsValidTimePoint(2.5) with m_12345TimeGeometry");
244 "Testing IsValidTimePoint(5.89) with m_emptyTimeGeometry");
246 "Testing IsValidTimePoint(5.89) with m_initTimeGeometry");
248 "Testing IsValidTimePoint(5.89) with m_12345TimeGeometry");
251 "Testing IsValidTimePoint(10) with m_emptyTimeGeometry");
253 "Testing IsValidTimePoint(10) with m_initTimeGeometry");
255 "Testing IsValidTimePoint(10) with m_12345TimeGeometry");
258 "Testing IsValidTimeStep(0) with m_emptyTimeGeometry");
260 "Testing IsValidTimeStep(0) with m_initTimeGeometry");
262 "Testing IsValidTimeStep(0) with m_12345TimeGeometry");
265 "Testing IsValidTimeStep(1) with m_emptyTimeGeometry");
267 "Testing IsValidTimeStep(1) with m_initTimeGeometry");
269 "Testing IsValidTimeStep(1) with m_12345TimeGeometry");
272 "Testing IsValidTimeStep(6) with m_emptyTimeGeometry");
274 "Testing IsValidTimeStep(6) with m_initTimeGeometry");
276 "Testing IsValidTimeStep(6) with m_12345TimeGeometry");
279 void TimeStepToTimePoint()
282 "Testing TimeStepToTimePoint(0) with m_emptyTimeGeometry");
284 "Testing TimeStepToTimePoint(0) with m_initTimeGeometry");
286 "Testing TimeStepToTimePoint(0) with m_12345TimeGeometry");
289 "Testing TimeStepToTimePoint(1) with m_emptyTimeGeometry");
291 "Testing TimeStepToTimePoint(1) with m_initTimeGeometry");
293 "Testing TimeStepToTimePoint(1) with m_12345TimeGeometry");
296 "Testing TimeStepToTimePoint(6) with m_emptyTimeGeometry");
298 "Testing TimeStepToTimePoint(6) with m_initTimeGeometry");
300 "Testing TimeStepToTimePoint(6) with m_12345TimeGeometry");
303 void TimePointToTimeStep()
306 "Testing TimePointToTimeStep(0.0) with m_emptyTimeGeometry");
308 "Testing TimePointToTimeStep(0.0) with m_initTimeGeometry");
310 "Testing TimePointToTimeStep(0.0) with m_12345TimeGeometry");
313 "Testing TimePointToTimeStep(0.5) with m_emptyTimeGeometry");
315 "Testing TimePointToTimeStep(0.5) with m_initTimeGeometry");
317 "Testing TimePointToTimeStep(0.5) with m_12345TimeGeometry");
320 "Testing TimePointToTimeStep(3.5) with m_emptyTimeGeometry");
322 "Testing TimePointToTimeStep(3.5) with m_initTimeGeometry");
324 "Testing TimePointToTimeStep(3.5) with m_12345TimeGeometry");
327 "Testing TimePointToTimeStep(5.8) with m_emptyTimeGeometry");
329 "Testing TimePointToTimeStep(5.8) with m_initTimeGeometry");
331 "Testing TimePointToTimeStep(5.8) with m_12345TimeGeometry");
333 "Testing TimePointToTimeStep(5.9) with m_12345TimeGeometry");
336 void GetGeometryCloneForTimeStep()
339 "Testing GetGeometryCloneForTimeStep(0) with m_emptyTimeGeometry");
341 "Testing GetGeometryCloneForTimeStep(0) with m_initTimeGeometry");
343 "Testing GetGeometryCloneForTimeStep(0) with m_12345TimeGeometry");
346 void GetGeometryForTimeStep()
349 "Testing GetGeometryForTimePoint(0) with m_emptyTimeGeometry");
351 "Testing GetGeometryForTimePoint(0) with m_initTimeGeometry");
353 "Testing GetGeometryForTimePoint(1) with m_initTimeGeometry");
355 m_12345TimeGeometry->GetGeometryForTimeStep(0).GetPointer() == m_Geometry1.GetPointer(),
356 "Testing GetGeometryForTimePoint(0) with m_12345TimeGeometry");
358 m_12345TimeGeometry->GetGeometryForTimeStep(3).GetPointer() == m_Geometry4.GetPointer(),
359 "Testing GetGeometryForTimePoint(3) with m_12345TimeGeometry");
361 m_12345TimeGeometry->GetGeometryForTimeStep(4).GetPointer() == m_Geometry5.GetPointer(),
362 "Testing GetGeometryForTimePoint(4) with m_12345TimeGeometry");
364 "Testing GetGeometryForTimePoint(5) with m_12345TimeGeometry");
367 void GetGeometryForTimePoint()
370 "Testing GetGeometryForTimeStep(0) with m_emptyTimeGeometry");
372 "Testing GetGeometryForTimeStep(0) with m_initTimeGeometry");
374 "Testing GetGeometryForTimeStep(0) with m_12345TimeGeometry");
377 "Testing GetGeometryForTimeStep(1.5) with m_emptyTimeGeometry");
379 "Testing GetGeometryForTimeStep(1.5) with m_initTimeGeometry");
381 m_12345TimeGeometry->GetGeometryForTimePoint(1.5).GetPointer() == m_Geometry1.GetPointer(),
382 "Testing GetGeometryForTimeStep(1.5) with m_12345TimeGeometry");
384 m_12345TimeGeometry->GetGeometryForTimePoint(3.5).GetPointer() == m_Geometry3.GetPointer(),
385 "Testing GetGeometryForTimeStep(3.5) with m_12345TimeGeometry");
387 "Testing GetGeometryForTimeStep(5.9) with m_12345TimeGeometry");
399 m_12345TimeGeometry->Expand(3);
401 "Testing Expand(3) doesn't change m_12345TimeGeometry");
403 m_12345TimeGeometry->Expand(7);
405 "Testing Expand(7) with m_12345TimeGeometry");
408 void ReplaceTimeStepGeometries()
411 m_12345TimeGeometry->ReplaceTimeStepGeometries(m_NewGeometry);
413 "Testing ReplaceTimeStepGeometries() with m_12345TimeGeometry");
415 m_12345TimeGeometry->GetGeometryForTimeStep(0)->GetOrigin() == m_NewGeometry->GetOrigin(),
416 "Testing ReplaceTimeStepGeometries(): check if first geometry of m_12345TimeGeometry "
417 "was replaced m_12345TimeGeometry");
419 m_12345TimeGeometry->GetGeometryForTimeStep(4)->GetOrigin() == m_NewGeometry->GetOrigin(),
420 "Testing ReplaceTimeStepGeometries(): check if last geometry of m_12345TimeGeometry "
421 "was replaced m_12345TimeGeometry");
424 void ClearAllGeometries()
427 m_12345TimeGeometry->ClearAllGeometries();
429 "Testing ClearAllGeometries() with m_12345TimeGeometry");
431 "Testing ClearAllGeometries() with m_12345TimeGeometry");
433 "Testing ClearAllGeometries() with m_12345TimeGeometry");
436 void AppendTimeStep()
442 m_emptyTimeGeometry->AppendTimeStep(m_Geometry4, m_Geometry4MaxTP, m_Geometry4MinTP);
444 "Testing AppendTimeStep() with m_emptyTimeGeometry");
446 "Testing ClearAllGeometries() with m_emptyTimeGeometry");
448 "Testing ClearAllGeometries() with m_emptyTimeGeometry");
451 "Testing AppendTimeStep() with m_emptyTimeGeometry");
453 "Testing ClearAllGeometries() with m_emptyTimeGeometry");
455 "Testing ClearAllGeometries() with m_emptyTimeGeometry");
456 m_123TimeGeometry->AppendTimeStep(m_Geometry4, m_Geometry4MaxTP, m_Geometry4MinTP);
458 "Testing AppendTimeStep() with m_123TimeGeometry");
460 "Testing AppendTimeStep() with m_123TimeGeometry");
462 "Testing AppendTimeStep() with m_123TimeGeometry");
464 "Testing AppendTimeStep() with m_123TimeGeometry");
MITK_TEST_SUITE_REGISTRATION(mitkImageToItk)
itk::FixedArray< ScalarType, 2 > TimeBounds
Standard typedef for time-bounds.
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
#define MITK_TEST(TESTMETHOD)
Adds a test to the current test suite.
#define MITK_TEST_FOR_EXCEPTION(EXCEPTIONCLASS, STATEMENT)
Simplified version of MITK_TEST_FOR_EXCEPTION_BEGIN / END for a single statement. ...
An object of this class represents an exception of MITK. Please don't instantiate exceptions manually...
Test fixture for parameterized tests.
mitk::ScalarType TimePointType