Skip to content

Commit d854fd1

Browse files
committed
BUG: Use ITK_TEMPLATE_EXPORT with templated classes
1 parent 0f0c94c commit d854fd1

7 files changed

+14
-14
lines changed

include/itkArrivalFunctionToPathFilter.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ namespace itk
3838
*
3939
*/
4040

41-
template <class TFilter>
42-
class ArrivalFunctionToPathCommand : public itk::Command
41+
template <typename TFilter>
42+
class ITK_TEMPLATE_EXPORT ArrivalFunctionToPathCommand : public itk::Command
4343
{
4444
public:
4545
ITK_DISALLOW_COPY_AND_ASSIGN(ArrivalFunctionToPathCommand);
@@ -137,9 +137,9 @@ class ArrivalFunctionToPathCommand : public itk::Command
137137
*
138138
* \ingroup MinimalPathExtraction
139139
*/
140-
template <class TInputImage,
141-
class TOutputPath = PolyLineParametricPath<TInputImage::ImageDimension> >
142-
class ITK_EXPORT ArrivalFunctionToPathFilter :
140+
template <typename TInputImage,
141+
typename TOutputPath = PolyLineParametricPath<TInputImage::ImageDimension> >
142+
class ITK_TEMPLATE_EXPORT ArrivalFunctionToPathFilter :
143143
public ImageToPathFilter<TInputImage,TOutputPath>
144144
{
145145
public:
@@ -220,7 +220,7 @@ class ITK_EXPORT ArrivalFunctionToPathFilter :
220220
void GenerateInputRequestedRegion() override;
221221

222222
/** Implemention of algorithm */
223-
void GenerateData(void) override;
223+
void GenerateData() override;
224224

225225
/** Get the arrival function from which to extract the path. */
226226
virtual unsigned int GetNumberOfPathsToExtract( ) const;

include/itkArrivalFunctionToPathFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ ArrivalFunctionToPathFilter<TInputImage,TOutputPath>
116116
template <typename TInputImage, typename TOutputPath>
117117
void
118118
ArrivalFunctionToPathFilter<TInputImage,TOutputPath>
119-
::GenerateData( void )
119+
::GenerateData( )
120120
{
121121
// Get the input
122122
InputImagePointer input = const_cast< InputImageType * >( this->GetInput() );

include/itkPhysicalCentralDifferenceImageFunction.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ namespace itk
3838
*
3939
* \ingroup MinimalPathExtraction
4040
*/
41-
template <
42-
class TInputImage,
43-
class TCoordRep = float >
44-
class ITK_EXPORT PhysicalCentralDifferenceImageFunction :
41+
template < typename TInputImage, typename TCoordRep = float >
42+
class ITK_TEMPLATE_EXPORT PhysicalCentralDifferenceImageFunction :
4543
public ImageFunction< TInputImage,
4644
CovariantVector<double, TInputImage::ImageDimension>,
4745
TCoordRep >

include/itkSingleImageCostFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace itk
4949
* \ingroup MinimalPathExtraction
5050
*/
5151
template <class TImage>
52-
class ITK_EXPORT SingleImageCostFunction :
52+
class ITK_TEMPLATE_EXPORT SingleImageCostFunction :
5353
public SingleValuedCostFunction
5454
{
5555
public:

include/itkSpeedFunctionPathInformation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace itk
4949
* \ingroup MinimalPathExtraction
5050
*/
5151
template <typename TPoint>
52-
class SpeedFunctionPathInformation :
52+
class ITK_TEMPLATE_EXPORT SpeedFunctionPathInformation :
5353
public LightObject
5454
{
5555
public:

include/itkSpeedFunctionToPathFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ namespace itk
6666
*/
6767
template <class TInputImage,
6868
class TOutputPath = PolyLineParametricPath<TInputImage::ImageDimension> >
69-
class ITK_EXPORT SpeedFunctionToPathFilter :
69+
class ITK_TEMPLATE_EXPORT SpeedFunctionToPathFilter :
7070
public ArrivalFunctionToPathFilter<TInputImage,TOutputPath>
7171
{
7272
public:

test/MinimalPathTest.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,8 @@ int Test_SpeedToPath_RegularStepGradientDescent_ND(int argc, char* argv[])
406406
pathFilter->Update( );
407407
time.Stop( );
408408
std::cout << std::setprecision(3) << "Path computed in: " << time.GetMean() << " seconds" << std::endl;
409+
std::cout << "Number of paths: " << pathFilter->GetNumberOfOutputs() << std::endl;
410+
std::cout << "Number of path 0 vertices: " << pathFilter->GetOutput(0)->GetVertexList()->Size() << std::endl;
409411

410412
// Allocate output image
411413
typename OutputImageType::Pointer output = OutputImageType::New();

0 commit comments

Comments
 (0)