00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2009-05-13 14:52:01 +0200 (Wed, 13 May 2009) $ 00006 Version: $Revision: 17230 $ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #include "mitkStepper.h" 00020 #include "mitkMultiStepper.h" 00021 #include "mitkTestingMacros.h" 00022 00023 int mitkMultiStepperTest(int /*argc*/, char* /*argv*/[]) 00024 { 00025 mitk::Stepper::Pointer stepperA; 00026 stepperA = mitk::Stepper::New(); 00027 00028 mitk::Stepper::Pointer stepperB = mitk::Stepper::New(); 00029 stepperA->SetSteps(4); 00030 stepperB->SetSteps(6); 00031 mitk::MultiStepper::Pointer multiStepper = mitk::MultiStepper::New(); 00032 00033 multiStepper->AddStepper(stepperA,2); 00034 multiStepper->AddStepper(stepperB); 00035 00036 for (int i=0 ; i<10; i++) { 00037 std::cout << i << ": A: " << stepperA->GetPos() << " B:" << stepperB->GetPos() << std::endl; 00038 multiStepper->Next(); 00039 } 00040 00041 return EXIT_SUCCESS; 00042 }