1 /*===================================================================
3 The Medical Imaging Interaction Toolkit (MITK)
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 See LICENSE.txt or http://www.mitk.org for details.
15 ===================================================================*/
17 /*===================================================================
19 This file is based heavily on a corresponding ITK filter.
21 ===================================================================*/
23 #ifndef __itkImageToPathFilter_txx
24 #define __itkImageToPathFilter_txx
26 #include "itkImageToPathFilter.h"
33 template <class TInputImage, class TOutputPath>
34 ImageToPathFilter<TInputImage, TOutputPath>::ImageToPathFilter()
36 // Modify superclass default values, can be overridden by subclasses
37 this->SetNumberOfRequiredInputs(1);
43 template <class TInputImage, class TOutputPath>
44 ImageToPathFilter<TInputImage, TOutputPath>::~ImageToPathFilter()
51 template <class TInputImage, class TOutputPath>
52 void ImageToPathFilter<TInputImage, TOutputPath>::SetInput(const InputImageType *input)
54 // Process object is not const-correct so the const_cast is required here
55 this->ProcessObject::SetNthInput(0, const_cast<InputImageType *>(input));
59 * Connect one of the operands for pixel-wise addition
61 template <class TInputImage, class TOutputPath>
62 void ImageToPathFilter<TInputImage, TOutputPath>::SetInput(unsigned int index, const TInputImage *image)
64 // Process object is not const-correct so the const_cast is required here
65 this->ProcessObject::SetNthInput(index, const_cast<TInputImage *>(image));
71 template <class TInputImage, class TOutputPath>
72 const typename ImageToPathFilter<TInputImage, TOutputPath>::InputImageType *
73 ImageToPathFilter<TInputImage, TOutputPath>::GetInput(void)
75 if (this->GetNumberOfInputs() < 1)
80 return static_cast<const TInputImage *>(this->ProcessObject::GetInput(0));
86 template <class TInputImage, class TOutputPath>
87 const typename ImageToPathFilter<TInputImage, TOutputPath>::InputImageType *
88 ImageToPathFilter<TInputImage, TOutputPath>::GetInput(unsigned int idx)
90 return static_cast<const TInputImage *>(this->ProcessObject::GetInput(idx));
93 template <class TInputImage, class TOutputPath>
94 void ImageToPathFilter<TInputImage, TOutputPath>::PrintSelf(std::ostream &os, Indent indent) const
96 Superclass::PrintSelf(os, indent);
99 } // end namespace itk