00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Module: $RCSfile$ 00005 Language: C++ 00006 Date: $Date$ 00007 Version: $Revision$ 00008 00009 Copyright (c) German Cancer Research Center, Division of Medical and 00010 Biological Informatics. All rights reserved. 00011 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00012 00013 This software is distributed WITHOUT ANY WARRANTY; without even 00014 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00015 PURPOSE. See the above copyright notices for more information. 00016 00017 =========================================================================*/ 00018 00019 00020 #include "mitkPointSetToPointSetFilter.h" 00021 00022 00023 mitk::PointSetToPointSetFilter::PointSetToPointSetFilter() 00024 { 00025 // Modify superclass default values, may be overridden by subclasses 00026 this->SetNumberOfRequiredInputs( 1 ); 00027 } 00028 00029 00030 mitk::PointSetToPointSetFilter::~PointSetToPointSetFilter() 00031 {} 00032 00033 00034 void mitk::PointSetToPointSetFilter::SetInput( const mitk::PointSetToPointSetFilter::InputType* input ) 00035 { 00036 // Process object is not const-correct so the const_cast is required here 00037 this->ProcessObject::SetNthInput( 0, const_cast< mitk::PointSetToPointSetFilter::InputType * >( input ) ); 00038 } 00039 00040 00041 void mitk::PointSetToPointSetFilter::SetInput( const unsigned int& idx, const mitk::PointSetToPointSetFilter::InputType* input ) 00042 { 00043 if ( idx + 1 > this->GetNumberOfInputs() ) 00044 { 00045 this->SetNumberOfRequiredInputs( idx + 1 ); 00046 } 00047 // Process object is not const-correct so the const_cast is required here 00048 this->ProcessObject::SetNthInput( idx, const_cast< mitk::PointSetToPointSetFilter::InputType *>( input ) ); 00049 } 00050 00051 00052 const mitk::PointSetToPointSetFilter::InputType * mitk::PointSetToPointSetFilter::GetInput( void ) 00053 { 00054 if ( this->GetNumberOfInputs() < 1 ) 00055 return 0; 00056 // Process object is not const-correct so the const_cast is required here 00057 return static_cast<const mitk::PointSetToPointSetFilter::InputType * >( this->ProcessObject::GetInput( 0 ) ); 00058 } 00059 00060 00061 const mitk::PointSetToPointSetFilter::InputType * mitk::PointSetToPointSetFilter::GetInput( const unsigned int& idx ) 00062 { 00063 if (idx > this->GetNumberOfInputs() - 1 ) 00064 return 0; 00065 // Process object is not const-correct so the const_cast is required here 00066 return static_cast< const mitk::PointSetToPointSetFilter::InputType * >(this->ProcessObject::GetInput(idx)); 00067 } 00068 00069 00070 void mitk::PointSetToPointSetFilter::operator=( const mitk::PointSetToPointSetFilter::Self& ) 00071 {} 00072 00073