diff --git a/Modules/GraphAlgorithms/itkShortestPathCostFunction.h b/Modules/GraphAlgorithms/itkShortestPathCostFunction.h index 6dc357d450..3e94296bc1 100644 --- a/Modules/GraphAlgorithms/itkShortestPathCostFunction.h +++ b/Modules/GraphAlgorithms/itkShortestPathCostFunction.h @@ -1,85 +1,83 @@ #ifndef __itkShortestPathCostFunction_h #define __itkShortestPathCostFunction_h #include "itkObject.h" #include "itkObjectFactory.h" #include "itkShapedNeighborhoodIterator.h" #include #include namespace itk { // \brief this is a pure virtual superclass for all cost function for the itkShortestPathImageFilter template class MitkGraphAlgorithms_EXPORT ShortestPathCostFunction : public Object { public: /** Standard class typedefs. */ typedef ShortestPathCostFunction Self; typedef Object Superclass; typedef SmartPointer Pointer; typedef SmartPointer ConstPointer; typedef ShapedNeighborhoodIterator< TInputImageType > itkShapedNeighborhoodIteratorType; /** Run-time type information (and related methods). */ itkTypeMacro(ShortestPathCostFunction, Object); /** Type definition for the input image. */ typedef TInputImageType ImageType; // More typdefs for convenience typedef typename TInputImageType::Pointer ImagePointer; typedef typename TInputImageType::ConstPointer ImageConstPointer; typedef typename TInputImageType::PixelType PixelType; typedef typename TInputImageType::IndexType IndexType; /** Set the input image. */ itkSetConstObjectMacro(Image,TInputImageType); // \brief calculates the costs for going from pixel1 to pixel2 virtual double GetCost( IndexType p1, IndexType p2) = 0; // \brief returns the minimal costs possible (needed for A*) virtual double GetMinCost() = 0; // \brief Initialize the metric virtual void Initialize () = 0; // \brief Set Starpoint for Path void SetStartIndex (const IndexType & StartIndex); // \brief Set Endpoint for Path void SetEndIndex(const IndexType & EndIndex); ShortestPathCostFunction(); protected: virtual ~ShortestPathCostFunction() {}; void PrintSelf(std::ostream& os, Indent indent) const; ImageConstPointer m_Image; IndexType m_StartIndex, m_EndIndex; private: ShortestPathCostFunction(const Self&); //purposely not implemented void operator=(const Self&); //purposely not implemented }; } // end namespace itk -#ifndef ITK_MANUAL_INSTANTIATION -#include "itkShortestPathCostFunction.txx" -#endif + #endif /* __itkShortestPathCostFunction_h */ diff --git a/Modules/GraphAlgorithms/itkShortestPathCostFunctionTbss.h b/Modules/GraphAlgorithms/itkShortestPathCostFunctionTbss.h index fc7b07d265..e26a3acd99 100644 --- a/Modules/GraphAlgorithms/itkShortestPathCostFunctionTbss.h +++ b/Modules/GraphAlgorithms/itkShortestPathCostFunctionTbss.h @@ -1,75 +1,73 @@ #ifndef __itkShortestPathCostFunctionTbss_h #define __itkShortestPathCostFunctionTbss_h #include "itkObject.h" #include "itkObjectFactory.h" #include "itkShapedNeighborhoodIterator.h" #include "itkShortestPathCostFunction.h" // Superclass of Metrics #include #include namespace itk { template class MitkGraphAlgorithms_EXPORT ShortestPathCostFunctionTbss : public ShortestPathCostFunction { public: /** Standard class typedefs. */ typedef ShortestPathCostFunctionTbss Self; typedef ShortestPathCostFunction Superclass; typedef SmartPointer Pointer; typedef SmartPointer ConstPointer; typedef itk::ImageRegionConstIterator ConstIteratorType; typedef typename TInputImageType::IndexType IndexType; typedef itk::Image FloatImageType; /** Method for creation through the object factory. */ itkNewMacro(Self); /** Run-time type information (and related methods). */ itkTypeMacro(ShortestPathCostFunctionTbss, Object); // \brief calculates the costs for going from p1 to p2 virtual double GetCost( IndexType p1, IndexType p2); // \brief Initialize the metric virtual void Initialize (); // \brief returns the minimal costs possible (needed for A*) virtual double GetMinCost(); ShortestPathCostFunctionTbss(); void SetThreshold(double t) { m_Threshold = t; } protected: virtual ~ShortestPathCostFunctionTbss() {}; double m_Threshold; private: }; } // end namespace itk -#ifndef ITK_MANUAL_INSTANTIATION -#include "itkShortestPathCostFunctionTbss.txx" -#endif + #endif /* __itkShortestPathCostFunctionTbss_h */