1 /*============================================================================
3 The Medical Imaging Interaction Toolkit (MITK)
5 Copyright (c) German Cancer Research Center (DKFZ)
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
11 ============================================================================*/
13 /*===================================================================
15 This file is based heavily on a corresponding ITK filter.
17 ===================================================================*/
19 #ifndef __itkImageToPathFilter_txx
20 #define __itkImageToPathFilter_txx
22 #include "itkImageToPathFilter.h"
29 template <class TInputImage, class TOutputPath>
30 ImageToPathFilter<TInputImage, TOutputPath>::ImageToPathFilter()
32 // Modify superclass default values, can be overridden by subclasses
33 this->SetNumberOfRequiredInputs(1);
39 template <class TInputImage, class TOutputPath>
40 ImageToPathFilter<TInputImage, TOutputPath>::~ImageToPathFilter()
47 template <class TInputImage, class TOutputPath>
48 void ImageToPathFilter<TInputImage, TOutputPath>::SetInput(const InputImageType *input)
50 // Process object is not const-correct so the const_cast is required here
51 this->ProcessObject::SetNthInput(0, const_cast<InputImageType *>(input));
55 * Connect one of the operands for pixel-wise addition
57 template <class TInputImage, class TOutputPath>
58 void ImageToPathFilter<TInputImage, TOutputPath>::SetInput(unsigned int index, const TInputImage *image)
60 // Process object is not const-correct so the const_cast is required here
61 this->ProcessObject::SetNthInput(index, const_cast<TInputImage *>(image));
67 template <class TInputImage, class TOutputPath>
68 const typename ImageToPathFilter<TInputImage, TOutputPath>::InputImageType *
69 ImageToPathFilter<TInputImage, TOutputPath>::GetInput(void)
71 if (this->GetNumberOfInputs() < 1)
76 return static_cast<const TInputImage *>(this->ProcessObject::GetInput(0));
82 template <class TInputImage, class TOutputPath>
83 const typename ImageToPathFilter<TInputImage, TOutputPath>::InputImageType *
84 ImageToPathFilter<TInputImage, TOutputPath>::GetInput(unsigned int idx)
86 return static_cast<const TInputImage *>(this->ProcessObject::GetInput(idx));
89 template <class TInputImage, class TOutputPath>
90 void ImageToPathFilter<TInputImage, TOutputPath>::PrintSelf(std::ostream &os, Indent indent) const
92 Superclass::PrintSelf(os, indent);
95 } // end namespace itk