24 #include <itksys/SystemTools.hxx>
31 std::string m_Filename;
42 catch (
const itk::ExceptionObject &e)
44 MITK_TEST_FAILED_MSG(<<
"(Setup) Caught exception from IOUtil while loading input : " << m_Filename <<
"\n"
54 timeSelector->SetInput(m_Image);
57 const unsigned int maxTimeStep = m_Image->GetTimeSteps();
58 for (
unsigned int t = 0; t < maxTimeStep; t++)
60 timeSelector->SetTimeNr(t);
61 timeSelector->Update();
66 ss <<
" : Valid image in timestep " << t;
78 const unsigned int maxTimeStep = m_Image->GetTimeSteps();
81 ptg->
Expand(maxTimeStep + 1);
85 expandedImage->Initialize(m_Image->GetPixelType(0), *tsg);
87 timeSelector->SetInput(expandedImage);
89 for (
unsigned int t = 0; t < maxTimeStep + 1; t++)
91 timeSelector->SetTimeNr(t);
92 timeSelector->Update();
97 ss <<
" : Valid image in timestep " << t;
107 m_Filename = std::string(argv[1]);
static void Valid_ImageExpandedByTimestep_ReturnsTrue()
virtual BaseGeometry::Pointer GetGeometryForTimeStep(TimeStepType timeStep) const override
Returns the geometry which corresponds to the given time step.
#define MITK_TEST_CONDITION_REQUIRED(COND, MSG)
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
virtual void Expand(TimeStepType size) override
Expands the time geometry to the given number of time steps.
virtual void SetTimeStepGeometry(BaseGeometry *geometry, TimeStepType timeStep) override
Sets the geometry for the given time step.
#define MITK_TEST_FAILED_MSG(MSG)
Fail and finish test with message MSG.
static void Setup()
Global test setup.
int mitkImageTimeSelectorTest(int, char *argv[])
static mitk::Image::Pointer LoadImage(const std::string &path)
LoadImage Convenience method to load an arbitrary mitkImage.
static void Valid_AllInputTimesteps_ReturnsTrue()