00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 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 #include "mitkRegistrationBase.h" 00019 #include "mitkProgressBar.h" 00020 00021 namespace mitk { 00022 00023 RegistrationBase::RegistrationBase() 00024 { 00025 m_ReferenceImage = Image::New(); 00026 } 00027 00028 RegistrationBase::~RegistrationBase() 00029 { 00030 } 00031 00032 void RegistrationBase::SetReferenceImage(Image::Pointer fixedImage) 00033 { 00034 m_ReferenceImage = fixedImage; 00035 SetNthInput(1, m_ReferenceImage); 00036 Modified(); 00037 } 00038 00039 void RegistrationBase::SetProgress(const itk::EventObject& ) 00040 { 00041 ProgressBar::GetInstance()->AddStepsToDo(1); 00042 ProgressBar::GetInstance()->Progress(); 00043 } 00044 00045 void RegistrationBase::AddStepsToDo(int steps) 00046 { 00047 ProgressBar::GetInstance()->AddStepsToDo(steps); 00048 } 00049 00050 void RegistrationBase::SetRemainingProgress(int steps) 00051 { 00052 ProgressBar::GetInstance()->Progress(steps); 00053 } 00054 }