Skip to content
Snippets Groups Projects
Commit f23c7820 authored by Kasper Marstal's avatar Kasper Marstal
Browse files

WIP: Elastix ProcessObject Wrapper

This build fails because VectorContainer has a private default
constructor
parent 8716facf
No related branches found
No related tags found
No related merge requests found
# Module that exposes the old elastix as a component
set( MODULE ModuleElastix )
if( NOT EXISTS ${ELASTIX_USE_FILE} )
message( FATAL_ERROR "${MODULE} could not find ELASTIX_USE_FILE. Use the SuperBuild or manually point the ELASTIX_USE_FILE CMake variable to the UseElastix.cmake file in the root of your elastix build tree." )
endif()
include( ${ELASTIX_USE_FILE} )
# Export include files
set( ${MODULE}_INCLUDE_DIRS
${${MODULE}_SOURCE_DIR}/include
)
#ifndef ElastixComponent_h
#define ElastixComponent_h
#include "elxMacro.h"
#include "itkProcessObject.h"
#include "itkImageSource.h"
#include "itkImage.h"
#include "itkVectorContainer.h"
#include "boost/any.hpp"
namespace elx {
template< typename TOutputImage >
class ElastixComponent : public itk::ImageSource< TOutputImage >
{
public:
elxNewMacro( ElastixComponent, itk::ImageSource );
void SetFixedImage( void );
typedef unsigned int InputIdType;
typedef itk::VectorContainer< InputIdType, boost::any > InputContainerType;
private:
InputContainerType m_InputContainer;
};
} // namespace elx
#ifndef ITK_MANUAL_INSTANTIATION
#include "elxElastixComponent.hxx"
#endif
#endif // ElastixComponent_h
\ No newline at end of file
#ifndef ElastixComponent_hxx
#define ElastixComponent_hxx
namespace elx {
template< typename TOutputImage >
void
ElastixComponent< TOutputImage >
::SetFixedImage( void )
{
std::cout << "Hello World!" << std::endl;
}
} // namespace elx
#endif // ElastixComponent_hxx
\ No newline at end of file
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
# the elastix dashboard. # the elastix dashboard.
set( ElastixUnitTestFilenames set( ElastixUnitTestFilenames
elxExampleUnitTest.cxx
elxBlueprintTest.cxx elxBlueprintTest.cxx
elxElastixComponentTest.cxx
) )
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
......
...@@ -56,4 +56,4 @@ private: ...@@ -56,4 +56,4 @@ private:
}; };
#endif // #define __DataManager_h #endif // __DataManager_h
\ No newline at end of file \ No newline at end of file
#include "elxElastixComponent.h"
#include "gtest/gtest.h"
using namespace elx;
TEST( ElastixComponent, Instantiation )
{
typedef itk::Image< float, 2u > ImageType;
typedef ElastixComponent< ImageType > ElastixComponentType;
ElastixComponentType::Pointer elastix = ElastixComponentType::New();
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment