Skip to content

Commit

Permalink
Change of include order to fix #82
Browse files Browse the repository at this point in the history
If statismo is used with an external ITK, the order of the headers need to be such that itk's itk_hdf5.h is included
first. If not, duplicate imports and/or duplicate symbols during linking can occur.
  • Loading branch information
marcelluethi committed Sep 1, 2015
1 parent 0473773 commit 5357bda
Show file tree
Hide file tree
Showing 29 changed files with 96 additions and 57 deletions.
7 changes: 4 additions & 3 deletions modules/ITK/examples/itkBuildDeformationModel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@
#include <errno.h>
#include <iostream>

#include <itkDirectory.h>
#include <itkImageFileReader.h>

#include "itkDataManager.h"
#include "itkPCAModelBuilder.h"
#include "itkStandardImageRepresenter.h"
#include "itkStatisticalModel.h"

#include <itkDirectory.h>
#include <itkImageFileReader.h>


/*
* This example shows the ITK Wrapping of statismo can be used to build a deformation model.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
#include <errno.h>
#include <iostream>

#include <itkDirectory.h>
#include <itkImageFileReader.h>

#include "itkDataManager.h"
#include "itkLowRankGPModelBuilder.h"
#include "itkStandardImageRepresenter.h"
#include "itkStatisticalModel.h"

#include <itkDirectory.h>
#include <itkImageFileReader.h>

#include "Kernels.h"
#include "KernelCombinators.h"

Expand Down
10 changes: 5 additions & 5 deletions modules/ITK/examples/itkBuildShapeModel.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
#include <errno.h>
#include <iostream>

#include <itkDirectory.h>
#include <itkMesh.h>
#include <itkMeshFileWriter.h>
#include <itkMeshFileReader.h>

#include "itkDataManager.h"
#include "itkPCAModelBuilder.h"
#include "itkStandardMeshRepresenter.h"
#include "itkStatisticalModel.h"

#include <itkDirectory.h>
#include <itkMesh.h>
#include <itkMeshFileWriter.h>
#include <itkMeshFileReader.h>

/*
* This example shows the ITK Wrapping of statismo can be used to build a shape model.
*/
Expand Down
12 changes: 7 additions & 5 deletions modules/ITK/examples/itkBuildShapeModel_75pcvar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,19 @@
#include <errno.h>
#include <iostream>

#include <itkDirectory.h>
#include <itkMesh.h>
#include <itkMeshFileWriter.h>
#include <itkMeshFileReader.h>

#include "itkDataManager.h"
#include "itkPCAModelBuilder.h"
#include "itkReducedVarianceModelBuilder.h"
#include "itkStandardMeshRepresenter.h"
#include "itkStatisticalModel.h"


#include <itkDirectory.h>
#include <itkMesh.h>
#include <itkMeshFileWriter.h>
#include <itkMeshFileReader.h>


/*
* This example shows the ITK Wrapping of statismo can be used to build a shape model.
*/
Expand Down
9 changes: 5 additions & 4 deletions modules/ITK/examples/itkDeformationModelFitting.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
* This example shows how the fitting of a statistical deformation model can be performed with statismo.
*/

#include "itkInterpolatingStatisticalDeformationModelTransform.h"
#include "itkStandardImageRepresenter.h"
#include "itkStatisticalModel.h"


#include <itkCommand.h>
#include <itkImageFileReader.h>
#include <itkImageRegistrationMethod.h>
Expand All @@ -47,10 +52,6 @@
#include <itkMeanSquaresImageToImageMetric.h>
#include <itkNormalizedCorrelationImageToImageMetric.h>

#include "itkInterpolatingStatisticalDeformationModelTransform.h"
#include "itkStandardImageRepresenter.h"
#include "itkStatisticalModel.h"

const unsigned Dimensions = 2;
typedef itk::Image<unsigned short int, Dimensions> ImageType;
typedef itk::Image< itk::Vector<float, ImageType::ImageDimension> , ImageType::ImageDimension > VectorImageType;
Expand Down
12 changes: 7 additions & 5 deletions modules/ITK/examples/itkLandmarkConstrainedShapeModelFitting.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
*
*/

#include "itkPosteriorModelBuilder.h"
#include "itkStandardMeshRepresenter.h"
#include "itkStatisticalModel.h"
#include "itkStatisticalShapeModelTransform.h"



#include <itkBinaryThresholdImageFilter.h>
#include <itkCannyEdgeDetectionImageFilter.h>
#include <itkCastImageFilter.h>
Expand All @@ -67,11 +74,6 @@
#include <itkSignedDanielssonDistanceMapImageFilter.h>
#include <itkTransformMeshFilter.h>

#include "itkPosteriorModelBuilder.h"
#include "itkStandardMeshRepresenter.h"
#include "itkStatisticalModel.h"
#include "itkStatisticalShapeModelTransform.h"

const unsigned Dimensions = 3;
typedef itk::PointSet<float, Dimensions > PointSetType;
typedef itk::Mesh<float, Dimensions > MeshType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@
#include <iomanip>
#include <string>

#include "itkDataManager.h"
#include "itkInterpolatingStatisticalDeformationModelTransform.h"
#include "itkLowRankGPModelBuilder.h"
#include "itkPosteriorModelBuilder.h"
#include "itkStandardImageRepresenter.h"
#include "itkStatisticalModel.h"


#include <itkCommand.h>
#include <itkDirectory.h>
#include <itkImage.h>
Expand All @@ -70,12 +78,6 @@
#include "Kernels.h"
#include "KernelCombinators.h"

#include "itkDataManager.h"
#include "itkInterpolatingStatisticalDeformationModelTransform.h"
#include "itkLowRankGPModelBuilder.h"
#include "itkPosteriorModelBuilder.h"
#include "itkStandardImageRepresenter.h"
#include "itkStatisticalModel.h"

/**
* A scalar valued gaussian kernel.
Expand Down
9 changes: 6 additions & 3 deletions modules/ITK/examples/itkShapeModelFitting.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,19 @@
/*
* This example shows how the fitting of a statistical shape model to a Mesh can be performed with Statismo and the itk Registration framework.
*/

#include "itkStandardMeshRepresenter.h"
#include "itkStatisticalModel.h"
#include "itkStatisticalShapeModelTransform.h"


#include <itkCommand.h>
#include <itkEuclideanDistancePointMetric.h>
#include <itkLevenbergMarquardtOptimizer.h>
#include <itkMesh.h>
#include <itkMeshFileReader.h>
#include <itkPointSetToPointSetRegistrationMethod.h>

#include "itkStandardMeshRepresenter.h"
#include "itkStatisticalModel.h"
#include "itkStatisticalShapeModelTransform.h"


const unsigned Dimensions = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
#include <iomanip>
#include <string>

#include "itkDataManager.h"
#include "itkInterpolatingStatisticalDeformationModelTransform.h"
#include "itkLowRankGPModelBuilder.h"
#include "itkStandardImageRepresenter.h"
#include "itkStatisticalModel.h"


#include "itkCommand.h"
#include "itkDirectory.h"
Expand All @@ -58,12 +64,6 @@
#include "Kernels.h"
#include "KernelCombinators.h"

#include "itkDataManager.h"
#include "itkInterpolatingStatisticalDeformationModelTransform.h"
#include "itkLowRankGPModelBuilder.h"
#include "itkStandardImageRepresenter.h"
#include "itkStatisticalModel.h"

#define GaussianSigma 70
#define GaussianScale 100
#define NumBasisFunctions 100
Expand Down
4 changes: 3 additions & 1 deletion modules/ITK/include/itkConditionalModelBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
#ifndef ITKMODELBUILDER_H_
#define ITKMODELBUILDER_H_

#include "statismoITKConfig.h"

#include <itkObject.h>
#include <itkObjectFactory.h>

#include "itkDataManager.h"
#include "itkStatisticalModel.h"
#include "ConditionalModelBuilder.h"
#include "statismoITKConfig.h"


namespace itk {

Expand Down
4 changes: 3 additions & 1 deletion modules/ITK/include/itkDataManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@
#include <boost/bind.hpp>
#include <boost/utility/result_of.hpp>

#include "statismoITKConfig.h"

#include <itkObject.h>
#include <itkObjectFactory.h>

#include "DataManager.h"
#include "statismoITKConfig.h"


namespace itk {

Expand Down
4 changes: 3 additions & 1 deletion modules/ITK/include/itkDataManagerWithSurrogates.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@
#include <boost/bind.hpp>
#include <boost/utility/result_of.hpp>

#include "statismoITKConfig.h"

#include <itkObject.h>
#include <itkObjectFactory.h>

#include "DataManagerWithSurrogates.h"
#include "statismoITKConfig.h"


namespace itk {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

#include <iostream>

#include "statismoITKConfig.h"
#include <itkImage.h>
#include <itkVector.h>
#include <itkVectorLinearInterpolateImageFunction.h>
Expand Down
4 changes: 3 additions & 1 deletion modules/ITK/include/itkLowRankGPModelBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#ifndef ITKLOWRANKMODELBUILDER_H_
#define ITKLOWRANKMODELBUILDER_H_

#include "statismoITKConfig.h"

#include <itkObject.h>
#include <itkObjectFactory.h>

Expand All @@ -46,7 +48,7 @@
#include "Kernels.h"
#include "LowRankGPModelBuilder.h"
#include "Representer.h"
#include "statismoITKConfig.h"


namespace itk {

Expand Down
4 changes: 3 additions & 1 deletion modules/ITK/include/itkPCAModelBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,16 @@
#ifndef ITKMODELBUILDER_H_
#define ITKMODELBUILDER_H_

#include "statismoITKConfig.h"

#include <itkObject.h>
#include <itkObjectFactory.h>

#include "itkDataManager.h"
#include "itkStatisticalModel.h"

#include "PCAModelBuilder.h"
#include "statismoITKConfig.h"


namespace itk {

Expand Down
2 changes: 2 additions & 0 deletions modules/ITK/include/itkPixelConversionTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#ifndef __ITK_TYPE_CONVERSION_TRAIT
#define __ITK_TYPE_CONVERSION_TRAIT

#include "statismoITKConfig.h"

#include <itkVector.h>

#include "Exceptions.h"
Expand Down
4 changes: 3 additions & 1 deletion modules/ITK/include/itkPosteriorModelBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
#ifndef ITK_POSTERIOR_MODELBUILDER_H_
#define ITK_POSTERIOR_MODELBUILDER_H_

#include "statismoITKConfig.h"

#include <itkObject.h>

#include "itkDataManager.h"
#include "itkStatisticalModel.h"

#include "PosteriorModelBuilder.h"
#include "statismoITKConfig.h"


namespace itk {

Expand Down
4 changes: 3 additions & 1 deletion modules/ITK/include/itkReducedVarianceModelBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
#ifndef ITK_PARTIALLY_FIXED_MODELBUILDER_H_
#define ITK_PARTIALLY_FIXED_MODELBUILDER_H_

#include "statismoITKConfig.h"

#include <itkObject.h>

#include "itkDataManager.h"
#include "itkStatisticalModel.h"

#include "ReducedVarianceModelBuilder.h"
#include "statismoITKConfig.h"

#include "StatismoUtils.h"

namespace itk {
Expand Down
1 change: 1 addition & 0 deletions modules/ITK/include/itkStandardImageRepresenter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@


#include <iostream>
#include "statismoITKConfig.h"

#include <itkImageDuplicator.h>
#include <itkImageIterator.h>
Expand Down
1 change: 1 addition & 0 deletions modules/ITK/include/itkStandardImageRepresenterTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#ifndef __itkStandardImageRepresenterTraits_h
#define __itkStandardImageRepresenterTraits_h

#include "statismoITKConfig.h"
#include "itkImage.h"
#include "itkVector.h"
#include "Representer.h"
Expand Down
4 changes: 2 additions & 2 deletions modules/ITK/include/itkStandardMeshRepresenter.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@

#include <boost/unordered_map.hpp>

#include "statismoITKConfig.h" // this needs to be the first include file

#include <itkMesh.h>
#include <itkObject.h>

#include "statismoITKConfig.h" // this needs to be the first include file

#include "CommonTypes.h"
#include "Exceptions.h"
#include "Representer.h"
Expand Down
2 changes: 2 additions & 0 deletions modules/ITK/include/itkStandardMeshRepresenter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#ifndef __itkStandardMeshRepresenter_hxx
#define __itkStandardMeshRepresenter_hxx

#include "statismoITKConfig.h" // this needs to be the first include file

#include "itkStandardMeshRepresenter.h"

#include <iostream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

#include <iostream>

#include "statismoITKConfig.h"
#include <itkImage.h>
#include <itkVector.h>

Expand Down

0 comments on commit 5357bda

Please sign in to comment.