/usr/include/InsightToolkit/Algorithms/itkBinaryMedialNodeMetric.h is in libinsighttoolkit3-dev 3.20.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | /*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: itkBinaryMedialNodeMetric.h
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Insight Software Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __itkBinaryMedialNodeMetric_h
#define __itkBinaryMedialNodeMetric_h
#include "itkObjectFactory.h"
#include "itkLightObject.h"
#include "itkBloxCoreAtomPixel.h"
namespace itk
{
/**
* Metric to compare two medial nodes using the Signature Technique as described in:
*
* Tamburo, Cois, Shelton, Stetten. "Medial Node Correspondences Towards Automated
* Registration", Lecture Notes in Computer Science (in press), 2003.
*
*/
template <int VDimensions>
class ITK_EXPORT BinaryMedialNodeMetric : public LightObject
{
public:
/** Standard class typedefs. */
typedef BinaryMedialNodeMetric Self;
typedef LightObject Superclass;
typedef SmartPointer<Self> Pointer;
typedef SmartPointer<const Self> ConstPointer;
/** Method for creation through the object factory */
itkNewMacro(Self);
/** We use the value 2.0 to represent an empty space in an eigen value list,
* since eigen values can never be greater than 1.0. This is an int because
* itkStaticConstMacro had issues with the use of a double */
itkStaticConstMacro(EMPTY, int, 2);
/** Run-time type information (and related methods) */
itkTypeMacro(BinaryMedialNodeMetric, LightObject);
/** typedef for core atom pixel */
typedef BloxCoreAtomPixel<VDimensions> MedialNode;
/** The type used to store the position of the BloxPixel. */
typedef Point<double, VDimensions> PositionType;
/** Initialize the Metric. */
void Initialize(void);
/** Sets the input medial nodes. */
void SetMedialNodes(MedialNode * NodeA1, MedialNode * NodeA2, MedialNode * NodeB1, MedialNode * NodeB2);
/** Function to print the list of combined eigen values. */
void PrintCombinedEigens();
/** Function to set a boolean to show the calculation process of the metric. */
void ShowCalculation(){m_ShowCalc = true;}
/** Function to set a boolean to not show the calculation process of the metric. */
void DontShowCalculation(){m_ShowCalc = false;}
/** Function to return the result of the metric calculations */
double GetResult(){return m_Result;}
//itkSetMacro(Result, double);
//itkGetConstMacro(Result, double);
protected:
/** Default Constructor */
BinaryMedialNodeMetric();
/** Default Destructor */
~BinaryMedialNodeMetric() {};
void PrintSelf(std::ostream& os, Indent indent) const;
private:
/** Function used internally to arrange the eigen value list. */
void OrderValues();
/** Arrays to hold combined eigen and distance values. */
double m_CombinedEigenValues[VDimensions*2];
double m_CombinedDistanceValues[VDimensions*2];
/** A key array which tells us which node the eigen values were from originally */
int m_CombinedEigensKey[VDimensions*2];
/** Base node pair */
MedialNode * m_NodeA1;
MedialNode * m_NodeA2;
/** Second node pair */
MedialNode * m_NodeB1;
MedialNode * m_NodeB2;
/** List of Eigen values for each pair */
typename MedialNode::EigenvalueType m_EigenA;
typename MedialNode::EigenvalueType m_EigenB;
/** Distance vectors for each pair */
PositionType m_DistanceVectorA;
PositionType m_DistanceVectorB;
/** Double between 0-1.0 indicating the result of the metric comparison. */
double m_Result;
/** Boolean controlling output of teh calculation process (default is false)*/
bool m_ShowCalc;
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
#include "itkBinaryMedialNodeMetric.txx"
#endif
#endif
|