Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itkShortestPathCostFunctionTbss.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 #ifndef __itkShortestPathCostFunctionTbss_h
17 #define __itkShortestPathCostFunctionTbss_h
18 
19 #include "itkObject.h"
20 #include "itkObjectFactory.h"
21 #include "itkShapedNeighborhoodIterator.h"
22 #include "itkShortestPathCostFunction.h" // Superclass of Metrics
23 #include <itkImageRegionConstIterator.h>
24 #include <itkMacro.h>
25 
26 namespace itk
27 {
28  template <class TInputImageType>
30  {
31  public:
37  typedef itk::ImageRegionConstIterator<TInputImageType> ConstIteratorType;
38  typedef typename TInputImageType::IndexType IndexType;
39 
40  typedef itk::Image<float, 3> FloatImageType;
41 
43  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
44 
46  itkTypeMacro(Self, Superclass);
47 
48  // \brief calculates the costs for going from p1 to p2
49  virtual double GetCost(IndexType p1, IndexType p2);
50 
51  // \brief Initialize the metric
52  virtual void Initialize();
53 
54  // \brief returns the minimal costs possible (needed for A*)
55  virtual double GetMinCost();
56 
57  void SetThreshold(double t) { m_Threshold = t; }
58  protected:
60 
62 
63  double m_Threshold;
64 
65  private:
66  };
67 
68 } // end namespace itk
69 
71 
72 #endif /* __itkShortestPathCostFunctionTbss_h */
ShortestPathCostFunction< TInputImageType > Superclass
virtual double GetCost(IndexType p1, IndexType p2)
itk::ImageRegionConstIterator< TInputImageType > ConstIteratorType