GithubHelp home page GithubHelp logo

statismo / statismo Goto Github PK

View Code? Open in Web Editor NEW
262.0 262.0 98.0 35.98 MB

Framework for building Statistical Image And Shape Models

License: Other

CMake 5.46% C++ 79.28% Shell 0.61% C 5.54% Python 4.46% SWIG 4.65%

statismo's Introduction

This repository is no longer maintained. An up-to-date version of Statismo using modern C++ is provided in this fork.


Statismo - Flexible Shape Modeling Build Status

Statismo is a c++ framework for statistical shape modeling. It supports all shape modeling tasks, from model building to shape analysis. Although the main focus of statismo lies on shape modeling, it is designed such that it supports any kind of PCA based statistical model, including statistical deformation models and intensiy models. One of the main goals of statismo is to make the exchange of statistical shape models easy. This is achieved by using a well documented file format based on HDF5.

Getting Started and Documentation

The easiest way to explore statismo is by using the command line interface. The command line interface provides easy to use tools for the most common shape modelling task. Two example scenarios that show the use of the command line interface are documented here along with a detailed description for each command line tool.

To perform more complex tasks you can include statismo as a library in your own c++ application. The best way to get started is to check the main concepts on the Wiki page and then look at the example code (ITK Examples, VTK Examples) that are provided with statismo.These example programs are kept simple to illustrate the main principles and meant as a starting point for more complicated applications.

The mathematical principles underlying statismo are described in the paper Gaussian Process Morphable Models.

More detailed documentation and links to presentations can be found in the documentation section.

There is also the statismo-users google group for general questions and discussion regarding statismo and shape models in general.

Installing statismo:

Statismo comes with binary packages for Debian/Ubuntu and Mac (via homebrew). On all other platforms, statismo needs to be compiled from the sources (using CMake). You can find detailed build instructions on the statismo wiki.

Installation on Ubuntu and Debian

For Ubuntu 14.04, 14.10 and 15.04 you can install statismo using the following commands:

sudo add-apt-repository ppa:zarquon42/ppa
sudo apt-get update
sudo apt-get install statismo statismo-tools

and optionally to get docs and example data:

sudo apt-get install statismo-doc statismo-example-data
Installation on Mac via homebrew

To install statismo using hombrew simply issue the following commands

    $ brew tap homebrew/science
    $ brew install statismo 
    $ statismo-buid-gp-model -h

Updating an existing statismo installation can be achieved by issuing

    $ brew update && brew upgrade —all
    $ statismo-buid-gp-model -h

Tools

Statismo (shape) models are best viewed using the Statismo model viewer. Sometimes it is useful to look at the statismo file itself. Hdfview provides a graphical interface to explore the structure and data within a hdf5 file.

Support for other languages

Statismo is a C++ framework and at the current stage the only the C++ interface is supported and maintained on all platform. However, some work has already been done to make statismo available from other languages:

  • For Statismo's vtk module, experimental Python wrappers are available, which are known to work on Linux systems. These wrappers are internally used for our unit tests, which also serve as usage examples.
  • Statismo's VTK module can also be acccessed from R using Stefan Schlager's RvtkStatismo.

In principle it should also be easy to wrap the statismo ITK module by using ITK's WrapITK or SimpleITK. However, we currently have no working wrappers for ITK and do not have the resources to work on it. Any help is greatly appreciated.

History

Statismo has originally been developed in the context of the Co-Me research project as a collaboration between the University of Bern, the University of Basel and the ETH Zurich, with goal of the making it easy to exchange algorithms and shape models between different research groups. The original code has been written by

  • Marcel Luethi, University of Basel and
  • Remi Blanc, formerly at ETH Zurich.

In the meantime, many people have contributed to statismo, including

  • Thomas Albrecht
  • Tobias Gass
  • Arnaud Gelas
  • Thomas Gerig
  • Christoph Jud
  • Christoph Langguth
  • Frank Mueller
  • Stefan Schlager
  • Sandro Schönborn

The main development is currently done by the Graphics and Vision Research Group at the University of Basel.

Related Projects

  • Scalismo Scalismo is a library for image analysis and shape modelling for the Java Virtual Machine. It is written in Scala and based on the same underlying concepts as statismo (and partly developed by the same people).

  • Morpho An R toolset for Geometric Morphometrics and mesh processing, which can be used together with statismo using the package RvtkStatismo.

  • Deformetrica Deformetrica is a software, written in C++, for the statistical analysis of 2D and 3D shape data.

  • Spharm-PDM Toolbox is a shape correspondence software package using a parametric boundary description based on spherical harmonics.

License:

Statismo itself is licensed under the BSD license. It depends, however, on other open source projects, which are distributed under different licenses. Most notably, these are Eigen, Boost and HDF5 and, depending on the configuration, ITK and VTK.

statismo's People

Contributors

andreas-forster avatar arnaudgelas avatar clangguth avatar dzenanz avatar laurapascal avatar marcelluethi avatar normanius avatar rblanc avatar ruslankosarev avatar sschoenborn avatar tom-albrecht avatar zarquon42b avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

statismo's Issues

Domain is not properly set when a model with the VectorImageRepresenter is loaded

When a model, which was built using the VectorImageRepresenter is loaded, it does not restore the domain information. The reason is that the domain is created when SetReference is called on the representer. When Loading the model, this function is never called.
An easy fix is to call SetReference in VectorImageRepresenter::Load

Boost thread fails to compile on Ubuntu 14.04

Boost thread compilation fails on Ubuntu 14.04 (g++ 4.8.2) with the following error message:
./boost/atomic/atomic.hpp:202:16: error: ‘uintptr_t’ was not declared in this scope
typedef atomic<uintptr_t> atomic_uintptr_t;

Using boost 1.56 solves the problem.

itk tests don't compile with visual studio

I tried the superbuild with visual studio 2012 (64bit). After modifiying a few things for a succesful installation of boost, the examples compile but I still have problems with the projects
ITKHeaderTest1
ITKHeaderTest2
ITKHeaderTest3
ITKHeaderTest4

Error 6 error C2874: using-declaration causes a multiple declaration of 'boost::reference_wrapper' E:\dev\statismo0.10\superbuild\INSTALL\include\boost-1_55\boost\tr1\functional.hpp 31 ITKHeaderTest1
Error 10 error C2953: 'std::result_of' : class template has already been defined E:\dev\statismo0.10\superbuild\INSTALL\include\boost-1_55\boost\tr1\functional.hpp 54 ITKHeaderTest1
Error 13 error C2874: using-declaration causes a multiple declaration of 'boost::is_bind_expression' E:\dev\statismo0.10\superbuild\INSTALL\include\boost-1_55\boost\tr1\functional.hpp 79 ITKHeaderTest1
Error 14 error C2874: using-declaration causes a multiple declaration of 'boost::is_placeholder' E:\dev\statismo0.10\superbuild\INSTALL\include\boost-1_55\boost\tr1\functional.hpp 80 ITKHeaderTest1
Error 17 error C2874: using-declaration causes a multiple declaration of 'boost::bad_function_call' E:\dev\statismo0.10\superbuild\INSTALL\include\boost-1_55\boost\tr1\functional.hpp 110 ITKHeaderTest1

runtime errors on MacOS X

Tests which make use of hdf5 are failing on mac (DYLIB issue)

I guess some CMake refactoring needs to be done, to get rid of link_directories which should fix this issue...

ReducedVarianceModelBuilder: case scores are 0x0 matrix

Dear all,
I stumbled upon an issue in ReducedVarianceModelBuilder.txx line 59 ff.

a) computeScores is not regarded (not a big deal), but
b) if the scores are only a 0x0 matrix (e.g. after extending the model with a Gaussian Kernel) this leads to an assert error from Eigen because
in line 83:

ModelInfo Info(inputModel->GetModelInfo().GetScoresMatrix().topRows(numberOfPrincipalComponents), builderInfoList);

A fix for b) would be:

int scorerows = inputModel->GetModelInfo().GetScoresMatrix().rows();
  if (scorerows < numberOfPrincipalComponents)
    numberOfPrincipalComponents = scorerows;

Best Stefan

EDIT: of course it is a 0x0 matrix. (I got confused because it is saved in hdf5 as 1x1 matrix of value = 0. But the issue is the same.

itkMeshRepresenter

It currently does not check if the training data has the same number of points as the reference. The expected behavior would be to that it throws an exception.

Performance improvements for B-Spline kernels

The B-Spline kernels should be implemented for each dimensionality separatly (using e.g. the dimensionality as a compile time parameter and explicit template specialization).
This would lead to performance improvements as well as making the code more clear.

Refactoring/Redesign scalar / matrix valued kernels

The base-classes for scalar/matrix valued kernels have currently a few limitations:

  1. The base classes are parametrized by the PointType only. For generic implementations of kernels (i.e. those where the concrete type of PointType is not known), the actual dataset type over which the kernel is applied should be known, such that operations onpoints can be performed using the representer.
  2. The Kernel combinators are only implemented for MatrixValued kernels. It would be handy to have them also for ScalarValuedKernels
  3. The Kernel combinators are difficult to use since they require explicit pointers. Maybe the use of smart pointers would allow for a more flexible and user friendly way to combine kernels

HDF5 and itkHDF5

Hi guys,

boost now compiles, but now I have a new HDF5 related problem. I am using my own ITK version, and it finds all the HDF5 symbols as already defined in ithhdf5.
I am currently trying to compile with USE_SYSTEM_ITK OFF, but that can hardly be the solution considering the time and space it needs to compile itk.
I hope we can solve this one, too.

Tom

5> 3>------ Build started: Project: itkBuildDeformationModel, Configuration: Release x64 ------
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: char const * __cdecl H5::Exception::getCDetailMsg(void)const " (?getCDetailMsg@Exception@H5@@QEBAPEBDXZ) already defined in itkhdf5_cpp-4.2.lib(H5Exception.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: __cdecl H5::DataSpace::DataSpace(enum H5S_class_t)" (??0DataSpace@H5@@qeaa@W4H5S_class_t@@@z) already defined in itkhdf5_cpp-4.2.lib(H5DataSpace.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: __cdecl H5::DataSpace::DataSpace(int,unsigned __int64 const *,unsigned __int64 const *)" (??0DataSpace@H5@@qeaa@HPEB_K0@Z) already defined in itkhdf5_cpp-4.2.lib(H5DataSpace.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: int __cdecl H5::DataSpace::getSimpleExtentDims(unsigned __int64 *,unsigned __int64 *)const " (?getSimpleExtentDims@DataSpace@H5@@QEBAHPEA_K0@Z) already defined in itkhdf5_cpp-4.2.lib(H5DataSpace.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: virtual __cdecl H5::DataSpace::~DataSpace(void)" (??1DataSpace@H5@@UEAA@XZ) already defined in itkhdf5_cpp-4.2.lib(H5DataSpace.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: class H5::StrType __cdecl H5::AbstractDs::getStrType(void)const " (?getStrType@AbstractDs@H5@@qeba?AVStrType@2@XZ) already defined in itkhdf5_cpp-4.2.lib(H5AbstractDs.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: class H5::Group __cdecl H5::CommonFG::createGroup(char const *,unsigned __int64)const " (?createGroup@CommonFG@H5@@qeba?AVGroup@2@PEBD_K@Z) already defined in itkhdf5_cpp-4.2.lib(H5CommonFG.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: class H5::Group __cdecl H5::CommonFG::openGroup(char const *)const " (?openGroup@CommonFG@H5@@qeba?AVGroup@2@PEBD@Z) already defined in itkhdf5_cpp-4.2.lib(H5CommonFG.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: class H5::DataSet __cdecl H5::CommonFG::createDataSet(char const *,class H5::DataType const &,class H5::DataSpace const &,class H5::DSetCreatPropList const &)const " (?createDataSet@CommonFG@H5@@qeba?AVDataSet@2@PEBDAEBVDataType@2@AEBVDataSpace@2@AEBVDSetCreatPropList@2@@z) already defined in itkhdf5_cpp-4.2.lib(H5CommonFG.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: class H5::DataSet __cdecl H5::CommonFG::openDataSet(char const *)const " (?openDataSet@CommonFG@H5@@qeba?AVDataSet@2@PEBD@Z) already defined in itkhdf5_cpp-4.2.lib(H5CommonFG.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: unsigned __int64 __cdecl H5::CommonFG::getNumObjs(void)const " (?getNumObjs@CommonFG@H5@@QEBA_KXZ) already defined in itkhdf5_cpp-4.2.lib(H5CommonFG.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl H5::CommonFG::getObjnameByIdx(unsigned __int64)const " (?getObjnameByIdx@CommonFG@H5@@qeba?AV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@_K@Z) already defined in itkhdf5_cpp-4.2.lib(H5CommonFG.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: __cdecl H5::StrType::StrType(class H5::PredType const &,unsigned __int64 const &)" (??0StrType@H5@@qeaa@AEBVPredType@1@AEB_K@Z) already defined in itkhdf5_cpp-4.2.lib(H5StrType.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: virtual __cdecl H5::StrType::~StrType(void)" (??1StrType@H5@@UEAA@XZ) already defined in itkhdf5_cpp-4.2.lib(H5StrType.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: virtual class H5::DataSpace __cdecl H5::DataSet::getSpace(void)const " (?getSpace@DataSet@H5@@ueba?AVDataSpace@2@XZ) already defined in itkhdf5_cpp-4.2.lib(H5DataSet.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: void __cdecl H5::DataSet::read(void *,class H5::DataType const &,class H5::DataSpace const &,class H5::DataSpace const &,class H5::DSetMemXferPropList const &)const " (?read@DataSet@H5@@QEBAXPEAXAEBVDataType@2@AEBVDataSpace@2@2AEBVDSetMemXferPropList@2@@z) already defined in itkhdf5_cpp-4.2.lib(H5DataSet.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: void __cdecl H5::DataSet::read(class std::basic_string<char,struct std::char_traits,class std::allocator > &,class H5::DataType const &,class H5::DataSpace const &,class H5::DataSpace const &,class H5::DSetMemXferPropList const &)const " (?read@DataSet@H5@@QEBAXAEAV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@AEBVDataType@2@AEBVDataSpace@2@2AEBVDSetMemXferPropList@2@@z) already defined in itkhdf5_cpp-4.2.lib(H5DataSet.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: void __cdecl H5::DataSet::write(void const *,class H5::DataType const &,class H5::DataSpace const &,class H5::DataSpace const &,class H5::DSetMemXferPropList const &)const " (?write@DataSet@H5@@QEBAXPEBXAEBVDataType@2@AEBVDataSpace@2@2AEBVDSetMemXferPropList@2@@z) already defined in itkhdf5_cpp-4.2.lib(H5DataSet.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: void __cdecl H5::DataSet::write(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class H5::DataType const &,class H5::DataSpace const &,class H5::DataSpace const &,class H5::DSetMemXferPropList const &)const " (?write@DataSet@H5@@QEBAXAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@AEBVDataType@2@AEBVDataSpace@2@2AEBVDSetMemXferPropList@2@@z) already defined in itkhdf5_cpp-4.2.lib(H5DataSet.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: virtual __cdecl H5::DataSet::~DataSet(void)" (??1DataSet@H5@@UEAA@XZ) already defined in itkhdf5_cpp-4.2.lib(H5DataSet.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: virtual void __cdecl H5::Group::close(void)" (?close@Group@H5@@UEAAXXZ) already defined in itkhdf5_cpp-4.2.lib(H5Group.obj)
5>
5>2>hdf5_cpp.lib(hdf5_cpp.dll) : error LNK2005: "public: virtual __cdecl H5::Group::~Group(void)" (??1Group@H5@@UEAA@XZ) already defined in itkhdf5_cpp-4.2.lib(H5Group.obj)

Header files are not getting installed in develop branch if BUILD_TESTING=OFF

Hi all,
I just tried to build and install (on Ubuntu 14.04) from develop branch and it seems that the header files are not installed, if BUILD_TESTING=OFF. Is this intentional? I guess not as the Fedora spec files selects this option.

commands issued:

git checkout develop
cd build
cmake ../ -DBUILD_TESTING=OFF
make 
make install

And here is what make install tells me:

....
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/cmake/statismo/statismoConfig.cmake
-- Installing: /usr/local/lib/cmake/statismo/statismoConfigVersion.cmake
-- Installing: /usr/local/lib/cmake/statismo/statismoTargets.cmake
-- Installing: /usr/local/lib/cmake/statismo/statismoTargets-noconfig.cmake
-- Installing: /usr/local/share/doc/statismo/ReadMe.md
-- Installing: /usr/local/share/doc/statismo/LICENSE
-- Installing: /usr/local/lib/libstatismo_core.so.0.10.1
-- Up-to-date: /usr/local/lib/libstatismo_core.so.0.10
-- Up-to-date: /usr/local/lib/libstatismo_core.so
-- Installing: /usr/local/lib/libstatismo_VTK.so.0.10.1
-- Up-to-date: /usr/local/lib/libstatismo_VTK.so.0.10
-- Up-to-date: /usr/local/lib/libstatismo_VTK.so
-- Removed runtime path from "/usr/local/lib/libstatismo_VTK.so.0.10.1"

Statismo 0.10.0: Error in FindBoost

I just tried to compile the new statismo release. I use the SuperBuild boost, not the system boost and get this strange error:

5> Performing configure step for 'Statismo'
5> CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:646 (file):
5> file STRINGS file
5> "C:/Projects/statismo-SuperBuild/INSTALL/include/boost-1_55/boost/version.hpp"
5> cannot be read.
5> Call Stack (most recent call first):
5> CMakeLists.txt:83 (find_package)
5>
5>
5> CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1111 (message):
5> Unable to find the requested Boost libraries.
5>
5> Boost version: 0.0.0
5>
5> Boost include path:
5> C:/Projects/statismo-SuperBuild/INSTALL/include/boost-1_55
5>
5> Detected version of Boost is too old. Requested version was 1.50 (or
5> newer).
5> Call Stack (most recent call first):
5> CMakeLists.txt:83 (find_package)
5>

Obviously, cmake found boost 1.55, but did not read the version number correctly.

Make standard kernels available to the developers

Commonly used kernels, such as the Gaussian kernel, a B-Spline kernel or the Multiscale kernel should be made available in statismo (core).

This should be attempted after a refactoring of the kernels is done (see #200)

Prevention of deletion of a ModelBuilder through a base class pointer

I would recommend to add an empty nonvirtual and protected destructor to the ModelBuilder base class to prevent the deletion through a base class pointer.

ModelBuilder *m = PCAModelBuilder::Create();
delete m;

would only call the destructor of ModelBuilder but not the one of PCAModelBuilder. I think, it even leads to undefined behaviour.

Cheers

tmpname warning

Building with g++ on linux gives the following warning:

.../BUILD/statismo-0.10.1/modules/core/include/StatismoUtils.h:142:
> warning: the use of `tmpnam' is dangerous, better use `mkstemp'

Though statismo's use of the tmpnam method should be safe, this warning is still annoying.

Statistmo format and itkStandardImageRepresenter does not handle TransformMatrix

Some medical image formats, such as mha or nifti allow for the specification of a transformMatrix (or direction matrix). If an image with an explicit transformMatrix (which is not the identity) is used as a reference for building an image or deformation model, this information is lost. The resulting samples from the model will not be in the same spatial position as the specified reference.

The bug can be easily reproduced by loading an .mha image whose TransformMatrix is not the identity.

A solution to this problem requires a change in the statismo file format as well as the different representers.

linking error vtk/hdf5

/usr/local/opt/ccache/libexec/c++ -g -arch x86_64 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/vtkBasicSamplingExample.dir/BasicSamplingExample.cxx.o -o ../../bin/vtkBasicSamplingExample -L/Users/arnaud/GITROOT/statismo/build/3rdParty/HDF5/lib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkCommon.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkFiltering.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkImaging.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkGraphics.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkGenericFiltering.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkIO.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkRendering.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkVolumeRendering.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkHybrid.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkWidgets.5.10.1.dylib -lhdf5 -lhdf5_cpp /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkVolumeRendering.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkHybrid.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkRendering.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkImaging.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkGraphics.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkIO.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkFiltering.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtkCommon.5.10.1.dylib /Users/arnaud/GITROOT/VTK5/Debug/bin/libvtksys.5.10.1.dylib -lm -lobjc -Wl,-rpath,/Users/arnaud/GITROOT/statismo/build/3rdParty/HDF5/lib
Undefined symbols for architecture x86_64:
"_vtk__H5check_version", referenced from:
statismo::StatisticalModel::Load(std::string const&, unsigned int) in BasicSamplingExample.cxx.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/vtkBasicSamplingExample] Error 1
make[1]: *** [Examples/VTK/CMakeFiles/vtkBasicSamplingExample.dir/all] Error 2
make: *** [all] Error 2

make install does not correctly install the header files

Called from the StatismoBuild directory, make install only installs the binaries, but not the header files or the statismo-config.cmake file. These would be needed such that statismo can be used use a library from external applications.

Furthermore, when using the superbuild, make install is not available. How is the installation ususally handled when a superbuild is performed?

delete new allocated vector

Hey statismo-developers,

I'm currently diggin into the code and was wondering, if there might be a memory leak in:

LowRankGPModelBuilder.h: 114

StatisticalModelType* BuildNewZeroMeanModel(
        const MatrixValuedKernelType& kernel, unsigned numComponents,
        unsigned numPointsForNystrom = 500) const { // ...
    typename RepresenterType::DatasetConstPointerType zeroMean =
            m_representer->SampleVectorToSample(zeroVec);
    return BuildNewModel(zeroMean, kernel, numComponents,
            numPointsForNystrom);
}

Shouldn't zeroMean be deleted after the model was build? Please excuse if I'm wrong, I've not checked the code deeply...

Unfortunately, I can't test nor provide a patch/commit right now, I haven't compiled the code yet.

I'm on commit (dfebf8e) after a fresh merge of origin/master.

Cheers
Martin

HDF5 does not build on windows with Visual Studio 2010 professional

Workaround:
Download HDF5 1.8.10 here
Check HDF5_SE_EXTERNAL in Cmake and specify the path to the newly installed hdf5 libraries.

Settings:
HDF5_CPP_LIBRARY: C:/Program Files/HDF_Group/HDF5/1.8.10/lib/hdf5_cppdll.lib
HDF_INCLUDE_DIR: C:/Program Files/HDF_Group/HDF5/1.8.10/include
HDF5_INCLUDE_DIR_CPP: C:/Program Files/HDF_Group/HDF5/1.8.10/include/cpp
HDF5_LIBRRAY: C:/Program Files/HDF_Group/HDF5/1.8.10/lib/hdf5dll.lib

dangerous warning about SpatiallyVaryingKernel

statismo/modules/VTK/examples/vtkSpatiallyVaryingGPModelExample.cxx:153:39: warning: no viable constructor copying variable of type 'SpatiallyVaryingKernel<RepresenterType::DatasetType>'; C++98 requires a copy constructor when binding a reference to a temporary [-Wbind-to-temporary-copy]
        const MatrixValuedKernelType& temperedKernel = SpatiallyVaryingKernel<RepresenterType::DatasetType>(representer, gk, temperingFun , numberOfComponents,  numberOfComponents * 2, true);
                                      ^                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
statismo/modules/core/include/KernelCombinators.h:194:7: note: candidate constructor (the implicit copy constructor) not viable: expects an l-value for 1st argument
class SpatiallyVaryingKernel : public MatrixValuedKernel<typename Representer<T>::PointType> {

undefined references to vtk io classes

hey statismo guys

I'm trying to build Statismo using superbuild:

CMAKE_BUILD_TYPE release
CMAKE_INSTALL_PREFIX path-to/Statismo/install
EIGEN3_INCLUDE_DIR path-to/eigen-3.2.2/install/include/eigen3
HDF5_DIR path-to/hdf5-1.8.13/install/share/cmake/hdf5
ITK_DIR path-to/ITK/install/lib/cmake/ITK-4.7
USE_GIT_PROTOCOL ON
USE_SYSTEM_Boost ON
USE_SYSTEM_Eigen ON
USE_SYSTEM_HDF5 ON
USE_SYSTEM_ITK ON
USE_SYSTEM_VTK ON
VTK_DIR path-to/VTK/install/lib/cmake/vtk-6.2

By doing so, I'm receiving a link error during linkage of the vtk tests:

Linking CXX executable ../../../bin/PosteriorModelBuilderTest
CMakeFiles/PosteriorModelBuilderTest.dir/PosteriorModelBuilderTest.cxx.o: In function loadPolyData(std::string const&)': PosteriorModelBuilderTest.cxx:(.text+0x4bb7): undefined reference tovtkPolyDataReader::New()'
PosteriorModelBuilderTest.cxx:(.text+0x4bf0): undefined reference to vtkPolyDataReader::GetOutput()' CMakeFiles/PosteriorModelBuilderTest.dir/PosteriorModelBuilderTest.cxx.o: In functionwritePolyData(vtkPolyData_, std::string const&)':
PosteriorModelBuilderTest.cxx:(.text+0x4c2d): undefined reference to vtkPolyDataWriter::New()' ../src/libstatismo_VTK.so.0.10.1: undefined reference tovtkXMLUnstructuredGridWriter::New()'
../src/libstatismo_VTK.so.0.10.1: undefined reference to vtkXMLUnstructuredGridReader::New()' ../src/libstatismo_VTK.so.0.10.1: undefined reference tovtkXMLWriter::SetInputData(vtkDataObject_)'
../src/libstatismo_VTK.so.0.10.1: undefined reference to `vtkXMLUnstructuredGridReader::GetOutput()'
collect2: error: ld returned 1 exit status
make[5]: *** [bin/PosteriorModelBuilderTest] Error 1
make[4]: *** [modules/VTK/tests/CMakeFiles/PosteriorModelBuilderTest.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [Statismo-prefix/src/Statismo-stamp/Statismo-build] Error 2
make[1]: *** [CMakeFiles/Statismo.dir/all] Error 2
make: *** [all] Error 2

In the CMakeLists files, it seams every thing ok. Maybe it has to do with the changed vtk module structure? Has anyone had such a problem before? Any ideas?

Cheers

linking error on mac

Linking CXX executable ../../bin/itkLowRankGaussianProcessImageToImageRegistration
/usr/local/opt/ccache/libexec/c++ -g -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/itkLowRankGaussianProcessImageToImageRegistration.dir/lowRankGaussianProcessImageToImageRegistration.cpp.o -o ../../bin/itkLowRankGaussianProcessImageToImageRegistration -L/Users/arnaud/GITROOT/statismo/build/3rdParty/HDF5/lib -L/usr/local/lib/hdf5 /Users/arnaud/GITROOT/ITK/Debug/lib/libitkdouble-conversion-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitksys-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkvnl_algo-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkvnl-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkv3p_netlib-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKCommon-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkNetlibSlatec-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKStatistics-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOImageBase-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKMesh-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkzlib-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKMetaIO-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKSpatialObjects-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKPath-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKLabelMap-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKQuadEdgeMesh-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKOptimizers-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKPolynomials-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKBiasCorrection-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKBioCell-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKDICOMParser-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKEXPAT-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOXML-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOSpatialObjects-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKFEM-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkopenjpeg-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkgdcmDICT-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkgdcmMSFF-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKznz-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKniftiio-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKgiftiio-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkhdf5_cpp-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkhdf5-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOBMP-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOBioRad-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOCSV-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOGDCM-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOIPL-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOGE-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOGIPL-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOHDF5-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkjpeg-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOJPEG-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitktiff-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOTIFF-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOLSM-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOMesh-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOMeta-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIONIFTI-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKNrrdIO-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIONRRD-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkpng-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOPNG-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOSiemens-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOStimulate-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOTransformBase-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOTransformHDF5-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOTransformInsightLegacy-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOTransformMatlab-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOVTK-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKKLMRegionGrowing-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKVTK-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKWatersheds-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKReview-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKVideoCore-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKVideoIO-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKgiftiio-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKLabelMap-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKQuadEdgeMesh-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKBiasCorrection-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKPolynomials-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKBioCell-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOSpatialObjects-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOXML-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKFEM-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKOptimizers-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOBMP-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOBioRad-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOGDCM-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkgdcmMSFF-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkopenjpeg-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkgdcmDICT-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkgdcmIOD-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKEXPAT-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkgdcmDSED-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkgdcmCommon-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOGIPL-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOJPEG-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOTIFF-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitktiff-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkjpeg-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOMeta-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKMetaIO-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIONIFTI-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKniftiio-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKznz-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIONRRD-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKNrrdIO-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOPNG-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkpng-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOSiemens-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOGE-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOIPL-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOStimulate-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOTransformHDF5-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkhdf5_cpp-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkhdf5-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkzlib-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOTransformInsightLegacy-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOTransformMatlab-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOTransformBase-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOVTK-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKKLMRegionGrowing-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKVTK-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKWatersheds-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKSpatialObjects-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKMesh-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKPath-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKStatistics-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkNetlibSlatec-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKIOImageBase-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKVideoCore-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKCommon-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkdouble-conversion-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitksys-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libITKVNLInstantiation-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkvnl_algo-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkv3p_lsqr-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkvnl-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkvcl-4.5.1.dylib /Users/arnaud/GITROOT/ITK/Debug/lib/libitkv3p_netlib-4.5.1.dylib -lm -lm -Wl,-rpath,/Users/arnaud/GITROOT/statismo/build/3rdParty/HDF5/lib -Wl,-rpath,/usr/local/lib/hdf5
ld: warning: directory not found for option '-L/usr/local/lib/hdf5'
[ 60%] Built target itkLowRankGaussianProcessImageToImageRegistration
make: *** [all] Error 2

vtk Python wrapping

vtkPythonCore is not linked for the vtkPython wrapping. This leads to an undefined symbol when importing statismo. This is only an issue for vtk > 5.6.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.