Skip to content

Commit 9769dd1

Browse files
committed
Merge pull request #6 from LucasGandel/PythonWrapping
NEW: Python Wrapping for MinimalPathExtraction
2 parents 55de39d + f777886 commit 9769dd1

14 files changed

+411
-270
lines changed

include/itkImageToPathFilter.h

Lines changed: 0 additions & 88 deletions
This file was deleted.

include/itkImageToPathFilter.hxx

Lines changed: 0 additions & 115 deletions
This file was deleted.
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
/*=========================================================================
2+
3+
* Copyright Insight Software Consortium
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0.txt
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
17+
18+
* Program: Insight Segmentation & Registration Toolkit
19+
* Module: $RCSfile: itkSpeedFunctionPathInformation.h,v $
20+
* Language: C++
21+
* Date: $Date$
22+
* Version: $Revision$
23+
24+
* Copyright (c) Insight Software Consortium. All rights reserved.
25+
* See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
26+
27+
* This software is distributed WITHOUT ANY WARRANTY; without even
28+
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
29+
* PURPOSE. See the above copyright notices for more information.
30+
31+
=========================================================================*/
32+
#ifndef itkSpeedFunctionPathInformation_h
33+
#define itkSpeedFunctionPathInformation_h
34+
35+
#include "itkLightObject.h"
36+
37+
38+
namespace itk
39+
{
40+
/** \class SpeedFunctionPathInformation
41+
* \brief PathInfo class for encapsulating information about a path
42+
* for a SpeedFunctionToPathFilter Object.
43+
* The points are stored as follows: end, start, way0, way1, ..., wayN.
44+
* Fronts are propagated in reverse order: wayN, ..., way1, way0, start.
45+
* (NOTE: a front is never propagated from end).
46+
*
47+
* The user must provide at least one PathInfo object using
48+
* SpeedFunctionToPathFilter::AddPathInfo().
49+
* If multiple PathInfo objects are added,
50+
* multiple paths are extracted and saved to separate filter outputs.
51+
*
52+
* \author Dan Mueller,
53+
* Queensland University of Technology, dan.muel[at]gmail.com
54+
*
55+
* \sa LightObject
56+
*
57+
* \ingroup MinimalPathExtraction
58+
*/
59+
60+
template <typename TPoint>
61+
class SpeedFunctionPathInformation :
62+
public LightObject
63+
{
64+
public:
65+
/** Standard class typedefs. */
66+
typedef SpeedFunctionPathInformation Self;
67+
typedef LightObject Superclass;
68+
typedef SmartPointer<Self> Pointer;
69+
typedef SmartPointer<const Self> ConstPointer;
70+
71+
/** Run-time type information (and related methods). */
72+
itkTypeMacro(SpeedFunctionPathInformation, LightObject);
73+
74+
/** Method for creation through the object factory. */
75+
itkNewMacro(Self);
76+
77+
/** Some point typedefs. */
78+
typedef TPoint PointType;
79+
80+
void ClearInfo();
81+
82+
void SetStartPoint( const PointType & start );
83+
84+
void SetEndPoint( const PointType & end );
85+
86+
void AddWayPoint( const PointType & way );
87+
88+
unsigned int GetNumberOfPoints( ) const;
89+
90+
const PointType & GetStartPoint( ) const;
91+
92+
const PointType & GetEndPoint( ) const;
93+
94+
const PointType & GetWayPoint( SizeValueType i ) const;
95+
96+
bool HasNextFront( ) const;
97+
98+
const PointType & GetCurrentFrontAndAdvance( );
99+
100+
const PointType & PeekCurrentFront( ) const;
101+
102+
const PointType & PeekNextFront( ) const;
103+
104+
const PointType & PeekPreviousFront( ) const;
105+
106+
107+
protected:
108+
SpeedFunctionPathInformation( );
109+
virtual ~SpeedFunctionPathInformation( );
110+
virtual void PrintSelf( std::ostream& os, Indent indent ) const;
111+
112+
std::vector< PointType > m_Info;
113+
SizeValueType m_Front;
114+
115+
116+
private:
117+
SpeedFunctionPathInformation( const Self& ); //purposely not implemented
118+
void operator=( const Self& ); //purposely not implemented
119+
};
120+
121+
122+
} // end namespace itk
123+
124+
#ifndef ITK_MANUAL_INSTANTIATION
125+
#include "itkSpeedFunctionPathInformation.hxx"
126+
#endif
127+
128+
#endif

0 commit comments

Comments
 (0)