CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+INCLUDE(cmake/fpa_Policies.cmake)
-## ============
-## = Policies =
-## ============
-
-SET(
- policies
- CMP0015
- CMP0020
- CMP0042
- )
-FOREACH(policy ${policies})
- IF(POLICY ${policy})
- CMAKE_POLICY(SET ${policy} NEW)
- ENDIF(POLICY ${policy})
-ENDFOREACH(policy)
-
-## ================
-## = Project name =
-## ================
+## ==================
+## == Project name ==
+## ==================
PROJECT(FrontAlgorithms)
SET(prj_MAJ_VER "0")
-SET(prj_MIN_VER "0")
-SET(prj_REL_VER "1")
+SET(prj_MIN_VER "1")
+SET(prj_REL_VER "0")
SET(prj_VER "${prj_MAJ_VER}.${prj_MIN_VER}.${prj_REL_VER}")
SET(prj_sVER "${prj_MAJ_VER}")
-## ===========
-## = Options =
-## ===========
-
-## OPTION(BUILD_EXAMPLES "Build examples" OFF)
-OPTION(BUILD_PLUGINS "Build plugins" OFF)
-
-## ============
-## = Packages =
-## ============
+## =====================
+## == Main dependency ==
+## =====================
-# NOTE: It seems that by default on Visual Studio Compiler supports c++11,
-# so it only need to be test on other O.S.
-IF(NOT MSVC)
- INCLUDE(CheckCXXCompilerFlag)
- CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
- CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
- IF(COMPILER_SUPPORTS_CXX11)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- ELSEIF(COMPILER_SUPPORTS_CXX0X)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- ELSE()
- MESSAGE(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
- ENDIF()
-ENDIF(NOT MSVC)
-
-# Prepare header to build shared libs (windows)
-INCLUDE(GenerateExportHeader)
-
-# Find cpPlugins
FIND_PACKAGE(cpPlugins REQUIRED)
-## ================================================
-## = Do not allow to build inside the source tree =
-## ================================================
-
-IF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
- MESSAGE(FATAL_ERROR "Building in the source tree is not allowed")
-ENDIF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
+## =============
+## == Options ==
+## =============
-## =====================================
-## = Where to put executables and libs =
-## =====================================
-
-SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
-SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
-MARK_AS_ADVANCED(
- CMAKE_BACKWARDS_COMPATIBILITY
- EXECUTABLE_OUTPUT_PATH
- LIBRARY_OUTPUT_PATH
- )
+OPTION(BUILD_PLUGINS "Build plugins" ON)
-## ==============================
-## = Subdirs containing headers =
-## ==============================
+## =========================
+## == Include directories ==
+## =========================
INCLUDE_DIRECTORIES(
${PROJECT_SOURCE_DIR}
${PROJECT_BINARY_DIR}/plugins
)
-## ===========================
-## = Subdirs containing code =
-## ===========================
+## =============================
+## == Subdirs containing code ==
+## =============================
SUBDIRS(
cmake
lib
- appli
+ plugins
+ # appli
)
-IF(BUILD_PLUGINS)
- SUBDIRS(
- plugins
- )
-ENDIF(BUILD_PLUGINS)
## eof - $RCSfile$
)
## ========================
-## -- Installation rules --
+## == Installation rules ==
## ========================
INSTALL(
# =========================
-# -- Include directories --
+# == Include directories ==
# =========================
INCLUDE_DIRECTORIES(
@PROJECT_SOURCE_DIR@/lib
@PROJECT_BINARY_DIR@/lib
+ @PROJECT_SOURCE_DIR@/lib/fpa_Instances
+ @PROJECT_BINARY_DIR@/lib/fpa_Instances
@CMAKE_INSTALL_PREFIX@/include
)
# =========================
-# -- Library directories --
+# == Library directories ==
# =========================
IF(MSVC)
ENDIF(MSVC)
# ===================
-# -- Library names --
+# == Library names ==
# ===================
SET(FrontAlgorithms_LIBRARY FrontAlgorithms)
--- /dev/null
+SET(
+ policies
+ CMP0015
+ CMP0020
+ CMP0042
+ )
+FOREACH(policy ${policies})
+ IF(POLICY ${policy})
+ CMAKE_POLICY(SET ${policy} NEW)
+ ENDIF(POLICY ${policy})
+ENDFOREACH(policy)
+
+## eof - $RCSfile$
-SET(lib_NAME fpa)
-
-## ================
-## = Source files =
-## ================
-
-CONFIGURE_FILE(
- fpa/Common.cxx.in
- ${PROJECT_BINARY_DIR}/lib/fpa/Common.cxx
- )
-
-FILE(GLOB ${lib_NAME}_HEADERS "fpa/*.h" "fpa/*.hxx")
-FILE(GLOB ${lib_NAME}_BASE_HEADERS "fpa/Base/*.h" "fpa/Base/*.hxx")
-FILE(GLOB ${lib_NAME}_IO_HEADERS "fpa/IO/*.h" "fpa/IO/*.hxx")
-FILE(GLOB ${lib_NAME}_IMAGE_HEADERS "fpa/Image/*.h" "fpa/Image/*.hxx")
-
-FILE(GLOB ${lib_NAME}_SOURCES "fpa/*.cxx")
-FILE(GLOB ${lib_NAME}_BASE_SOURCES "fpa/Base/*.cxx")
-FILE(GLOB ${lib_NAME}_IO_SOURCES "fpa/IO/*.cxx")
-FILE(GLOB ${lib_NAME}_IMAGE_SOURCES "fpa/Image/*.cxx")
-
-FILE(GLOB ${lib_NAME}_VTK_HEADERS "fpa/VTK/*.h" "fpa/VTK/*.hxx")
-FILE(GLOB ${lib_NAME}_VTK_SOURCES "fpa/VTK/*.cxx")
-
-SET(
- ${lib_NAME}_ALL_SOURCES
- ${PROJECT_BINARY_DIR}/lib/fpa/Common.cxx
- ${${lib_NAME}_SOURCES}
- ${${lib_NAME}_BASE_SOURCES}
- ${${lib_NAME}_IO_SOURCES}
- ${${lib_NAME}_IMAGE_SOURCES}
- ${${lib_NAME}_VTK_SOURCES}
- )
-
-## =============
-## = Libraries =
-## =============
-
-SET(
- ${lib_NAME}_LINK_LIBRARIES
- ${ITK_LIBRARIES}
- ${VTK_LIBRARIES}
- )
-
-## =====================
-## = Compilation rules =
-## =====================
-
-ADD_LIBRARY(
- ${lib_NAME}
- SHARED
- ${${lib_NAME}_ALL_SOURCES}
- )
-SET_TARGET_PROPERTIES(
- ${lib_NAME} PROPERTIES
- VERSION "${prj_VER}"
- SOVERSION "${prj_sVER}"
- )
-GENERATE_EXPORT_HEADER(
- ${lib_NAME}
- BASE_NAME ${lib_NAME}
- EXPORT_MACRO_NAME ${lib_NAME}_EXPORT
- EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/lib/fpa/${lib_NAME}_Export.h
- STATIC_DEFINE ${lib_NAME}_BUILT_AS_STATIC
- )
-TARGET_LINK_LIBRARIES(
- ${lib_NAME}
- ${${lib_NAME}_LINK_LIBRARIES}
- )
-
-## ========================
-## -- Installation rules --
-## ========================
-
-INSTALL(
- TARGETS ${lib_NAME}
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib/static
- )
-SET(
- local_install_dirs
- fpa
- )
-FOREACH(dir ${local_install_dirs})
- INSTALL(
- DIRECTORY ${dir}
- DESTINATION include
- FILES_MATCHING PATTERN "*.h"
+IF(BUILD_PLUGINS)
+ SUBDIRS(
+ fpa_Instances
)
- INSTALL(
- DIRECTORY ${dir}
- DESTINATION include
- FILES_MATCHING PATTERN "*.hxx"
- )
- INSTALL(
- DIRECTORY ${dir}
- DESTINATION include
- FILES_MATCHING PATTERN "*.hpp"
- )
-ENDFOREACH(dir)
-
-INSTALL(
- FILES
- ${PROJECT_BINARY_DIR}/lib/fpa/${lib_NAME}_Export.h
- DESTINATION include/fpa
- )
-
-SUBDIRS(
- fpa_Instances
- )
+ENDIF(BUILD_PLUGINS)
-## eof - $RCSfile$
+# ## eof - $RCSfile$
if( this->m_GrowingFunction.IsNotNull( ) )
return( this->m_GrowingFunction->Evaluate( v ) );
else
- return( false );
+ return( true );
}
// -------------------------------------------------------------------------
_InitResults( )
{
this->Superclass::_InitResults( );
- this->m_GrowingFunction->SetSpace( this->GetInput( ) );
+ if( this->m_GrowingFunction.IsNotNull( ) )
+ this->m_GrowingFunction->SetSpace( this->GetInput( ) );
this->GetOutput( )->FillBuffer( this->m_OutsideValue );
}
--- /dev/null
+#ifndef __FPA__VTK__IMAGE__OBSERVER2D__H__
+#define __FPA__VTK__IMAGE__OBSERVER2D__H__
+
+#include <set>
+#include <itkCommand.h>
+#include <vtkActor.h>
+#include <vtkImageActor.h>
+#include <vtkImageData.h>
+#include <vtkPolyData.h>
+#include <vtkSmartPointer.h>
+
+namespace fpa
+{
+ namespace VTK
+ {
+ namespace Image
+ {
+ /**
+ */
+ template< class F, class R >
+ class Observer2D
+ : public itk::Command
+ {
+ public:
+ typedef Observer2D Self;
+ typedef itk::Command Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
+
+ typedef F TFilter;
+ typedef R TRenderWindow;
+ typedef typename TFilter::TInputImage TImage;
+ typedef typename TFilter::TVertex TVertex;
+
+ typedef std::set< TVertex > TVertices;
+
+ public:
+ itkNewMacro( Self );
+ itkTypeMacro( Observer2D, itkCommand );
+
+ itkGetConstMacro( RenderPercentage, double );
+ itkSetMacro( RenderPercentage, double );
+
+ public:
+ void SetRenderWindow( R* rw );
+ void SetPixel(
+ typename TImage::IndexType idx,
+ unsigned char red,
+ unsigned char green,
+ unsigned char blue,
+ unsigned char alpha
+ );
+ void Render( );
+ void Execute( itk::Object* c, const itk::EventObject& e ) ITK_OVERRIDE
+ { this->Execute( ( const itk::Object* )( c ), e ); }
+ void Execute( const itk::Object* c, const itk::EventObject& e ) ITK_OVERRIDE;
+
+ protected:
+ Observer2D( );
+ virtual ~Observer2D( );
+
+ private:
+ Observer2D( const Self& ); // Not impl.
+ void operator=( const Self& ); // Not impl.
+
+ protected:
+ vtkSmartPointer< vtkImageData > m_Stencil;
+ vtkSmartPointer< vtkImageActor > m_StencilActor;
+
+ R* m_RenderWindow;
+ unsigned long m_Count;
+ unsigned long m_RenderCount;
+ double m_RenderPercentage;
+ };
+
+ } // ecapseman
+
+ } // ecapseman
+
+} // ecapseman
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include <fpa/VTK/Image/Observer2D.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
+
+#endif // __FPA__VTK__IMAGE__OBSERVER2D__H__
+
+// eof - $RCSfile$
-#ifndef __FPA__VTK__IMAGE2DOBSERVER__HXX__
-#define __FPA__VTK__IMAGE2DOBSERVER__HXX__
+#ifndef __FPA__VTK__IMAGE__OBSERVER2D__HXX__
+#define __FPA__VTK__IMAGE__OBSERVER2D__HXX__
#include <vtkCellArray.h>
#include <vtkPolyDataMapper.h>
// -------------------------------------------------------------------------
template< class F, class R >
-void fpa::VTK::Image2DObserver< F, R >::
+void fpa::VTK::Image::Observer2D< F, R >::
SetRenderWindow( R* rw )
{
this->m_RenderWindow = rw;
// -------------------------------------------------------------------------
template< class F, class R >
-void fpa::VTK::Image2DObserver< F, R >::
+void fpa::VTK::Image::Observer2D< F, R >::
SetPixel(
typename TImage::IndexType idx,
unsigned char red,
// -------------------------------------------------------------------------
template< class F, class R >
-void fpa::VTK::Image2DObserver< F, R >::
+void fpa::VTK::Image::Observer2D< F, R >::
Render( )
{
if( this->m_RenderWindow != NULL )
// -------------------------------------------------------------------------
template< class F, class R >
-void fpa::VTK::Image2DObserver< F, R >::
+void fpa::VTK::Image::Observer2D< F, R >::
Execute( const itk::Object* c, const itk::EventObject& e )
{
typedef typename F::TStartEvent _TStartEvent;
// -------------------------------------------------------------------------
template< class F, class R >
-fpa::VTK::Image2DObserver< F, R >::
-Image2DObserver( )
+fpa::VTK::Image::Observer2D< F, R >::
+Observer2D( )
: Superclass( ),
m_RenderWindow( NULL ),
m_RenderPercentage( double( 0.01 ) )
// -------------------------------------------------------------------------
template< class F, class R >
-fpa::VTK::Image2DObserver< F, R >::
-~Image2DObserver( )
+fpa::VTK::Image::Observer2D< F, R >::
+~Observer2D( )
{
}
-#endif // __FPA__VTK__IMAGE2DOBSERVER__HXX__
+#endif // __FPA__VTK__IMAGE__OBSERVER2D__HXX__
// eof - $RCSfile$
--- /dev/null
+#ifndef __FPA__VTK__IMAGE__OBSERVER3D__H__
+#define __FPA__VTK__IMAGE__OBSERVER3D__H__
+
+#include <map>
+
+#include <itkCommand.h>
+
+#include <vtkActor.h>
+#include <vtkPolyData.h>
+#include <vtkPolyDataMapper.h>
+#include <vtkSmartPointer.h>
+
+namespace fpa
+{
+ namespace VTK
+ {
+ namespace Image
+ {
+ /**
+ */
+ template< class F, class R >
+ class Observer3D
+ : public itk::Command
+ {
+ public:
+ typedef Observer3D Self;
+ typedef itk::Command Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
+
+ typedef F TFilter;
+ typedef R TRenderWindow;
+ typedef typename TFilter::TInputImage TImage;
+ typedef typename TFilter::TVertex TVertex;
+ typedef typename TFilter::TVertexCompare TVertexCompare;
+
+ typedef std::set< TVertex > TVertices;
+
+ public:
+ itkNewMacro( Self );
+ itkTypeMacro( Observer3D, itkCommand );
+
+ itkGetConstMacro( RenderPercentage, double );
+ itkSetMacro( RenderPercentage, double );
+
+ public:
+ void SetRenderWindow( R* rw );
+ void Render( );
+ void Execute( itk::Object* c, const itk::EventObject& e ) ITK_OVERRIDE
+ { this->Execute( ( const itk::Object* )( c ), e ); }
+ void Execute( const itk::Object* c, const itk::EventObject& e ) ITK_OVERRIDE;
+
+ protected:
+ Observer3D( );
+ virtual ~Observer3D( );
+
+ private:
+ Observer3D( const Self& ); // Not impl.
+ void operator=( const Self& ); // Not impl.
+
+ protected:
+ vtkSmartPointer< vtkPolyData > m_PolyData;
+ vtkSmartPointer< vtkPolyDataMapper > m_PolyDataMapper;
+ vtkSmartPointer< vtkActor > m_PolyDataActor;
+ std::map< TVertex, unsigned long, TVertexCompare > m_PointsToReplace;
+ std::map< TVertex, unsigned long, TVertexCompare > m_PointsInFront;
+
+ R* m_RenderWindow;
+ unsigned long m_Count;
+ unsigned long m_RenderCount;
+ double m_RenderPercentage;
+ };
+
+ } // ecapseman
+
+ } // ecapseman
+
+} // ecapseman
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#include <fpa/VTK/Observer3D.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
+
+#endif // __FPA__VTK__IMAGE__OBSERVER3D__H__
+
+// eof - $RCSfile$
-#ifndef __FPA__VTK__IMAGE3DOBSERVER__HXX__
-#define __FPA__VTK__IMAGE3DOBSERVER__HXX__
+#ifndef __FPA__VTK__IMAGE__OBSERVER3D__HXX__
+#define __FPA__VTK__IMAGE__OBSERVER3D__HXX__
#include <vtkCellArray.h>
#include <vtkPolyDataMapper.h>
// -------------------------------------------------------------------------
template< class F, class R >
-void fpa::VTK::Image3DObserver< F, R >::
+void fpa::VTK::Image::Observer3D< F, R >::
SetRenderWindow( R* rw )
{
this->m_RenderWindow = rw;
// -------------------------------------------------------------------------
template< class F, class R >
-void fpa::VTK::Image3DObserver< F, R >::
+void fpa::VTK::Image::Observer3D< F, R >::
Render( )
{
if( this->m_RenderWindow != NULL )
// -------------------------------------------------------------------------
template< class F, class R >
-void fpa::VTK::Image3DObserver< F, R >::
+void fpa::VTK::Image::Observer3D< F, R >::
Execute( const itk::Object* c, const itk::EventObject& e )
{
typedef typename F::TStartEvent _TStartEvent;
// -------------------------------------------------------------------------
template< class F, class R >
-fpa::VTK::Image3DObserver< F, R >::
-Image3DObserver( )
+fpa::VTK::Image::Observer3D< F, R >::
+Observer3D( )
: Superclass( ),
m_RenderWindow( NULL ),
m_RenderPercentage( double( 0.001 ) )
// -------------------------------------------------------------------------
template< class F, class R >
-fpa::VTK::Image3DObserver< F, R >::
-~Image3DObserver( )
+fpa::VTK::Image::Observer3D< F, R >::
+~Observer3D( )
{
}
-#endif // __FPA__VTK__IMAGE3DOBSERVER__HXX__
+#endif // __FPA__VTK__IMAGE__OBSERVER3D__HXX__
// eof - $RCSfile$
+++ /dev/null
-#ifndef __FPA__VTK__IMAGE2DOBSERVER__H__
-#define __FPA__VTK__IMAGE2DOBSERVER__H__
-
-#include <set>
-#include <itkCommand.h>
-#include <vtkActor.h>
-#include <vtkImageActor.h>
-#include <vtkImageData.h>
-#include <vtkPolyData.h>
-#include <vtkSmartPointer.h>
-
-namespace fpa
-{
- namespace VTK
- {
- /**
- */
- template< class F, class R >
- class Image2DObserver
- : public itk::Command
- {
- public:
- typedef Image2DObserver Self;
- typedef itk::Command Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- typedef F TFilter;
- typedef R TRenderWindow;
- typedef typename TFilter::TInputImage TImage;
- typedef typename TFilter::TVertex TVertex;
-
- typedef std::set< TVertex > TVertices;
-
- public:
- itkNewMacro( Self );
- itkTypeMacro( Image2DObserver, itkCommand );
-
- itkGetConstMacro( RenderPercentage, double );
- itkSetMacro( RenderPercentage, double );
-
- public:
- void SetRenderWindow( R* rw );
- void SetPixel(
- typename TImage::IndexType idx,
- unsigned char red,
- unsigned char green,
- unsigned char blue,
- unsigned char alpha
- );
- void Render( );
- void Execute( itk::Object* c, const itk::EventObject& e ) ITK_OVERRIDE
- { this->Execute( ( const itk::Object* )( c ), e ); }
- void Execute( const itk::Object* c, const itk::EventObject& e ) ITK_OVERRIDE;
-
- protected:
- Image2DObserver( );
- virtual ~Image2DObserver( );
-
- private:
- Image2DObserver( const Self& ); // Not impl.
- void operator=( const Self& ); // Not impl.
-
- protected:
- vtkSmartPointer< vtkImageData > m_Stencil;
- vtkSmartPointer< vtkImageActor > m_StencilActor;
-
- R* m_RenderWindow;
- unsigned long m_Count;
- unsigned long m_RenderCount;
- double m_RenderPercentage;
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#ifndef ITK_MANUAL_INSTANTIATION
-#include <fpa/VTK/Image2DObserver.hxx>
-#endif // ITK_MANUAL_INSTANTIATION
-
-#endif // __FPA__VTK__IMAGE2DOBSERVER__H__
-
-// eof - $RCSfile$
+++ /dev/null
-#ifndef __FPA__VTK__IMAGE3DOBSERVER__H__
-#define __FPA__VTK__IMAGE3DOBSERVER__H__
-
-#include <map>
-
-#include <itkCommand.h>
-
-#include <vtkActor.h>
-#include <vtkPolyData.h>
-#include <vtkPolyDataMapper.h>
-#include <vtkSmartPointer.h>
-
-namespace fpa
-{
- namespace VTK
- {
- /**
- */
- template< class F, class R >
- class Image3DObserver
- : public itk::Command
- {
- public:
- typedef Image3DObserver Self;
- typedef itk::Command Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- typedef F TFilter;
- typedef R TRenderWindow;
- typedef typename TFilter::TInputImage TImage;
- typedef typename TFilter::TVertex TVertex;
- typedef typename TFilter::TVertexCompare TVertexCompare;
-
- typedef std::set< TVertex > TVertices;
-
- public:
- itkNewMacro( Self );
- itkTypeMacro( Image3DObserver, itkCommand );
-
- itkGetConstMacro( RenderPercentage, double );
- itkSetMacro( RenderPercentage, double );
-
- public:
- void SetRenderWindow( R* rw );
- void Render( );
- void Execute( itk::Object* c, const itk::EventObject& e ) ITK_OVERRIDE
- { this->Execute( ( const itk::Object* )( c ), e ); }
- void Execute( const itk::Object* c, const itk::EventObject& e ) ITK_OVERRIDE;
-
- protected:
- Image3DObserver( );
- virtual ~Image3DObserver( );
-
- private:
- Image3DObserver( const Self& ); // Not impl.
- void operator=( const Self& ); // Not impl.
-
- protected:
- vtkSmartPointer< vtkPolyData > m_PolyData;
- vtkSmartPointer< vtkPolyDataMapper > m_PolyDataMapper;
- vtkSmartPointer< vtkActor > m_PolyDataActor;
- std::map< TVertex, unsigned long, TVertexCompare > m_PointsToReplace;
- std::map< TVertex, unsigned long, TVertexCompare > m_PointsInFront;
-
- R* m_RenderWindow;
- unsigned long m_Count;
- unsigned long m_RenderCount;
- double m_RenderPercentage;
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#ifndef ITK_MANUAL_INSTANTIATION
-#include <fpa/VTK/Image3DObserver.hxx>
-#endif // ITK_MANUAL_INSTANTIATION
-
-#endif // __FPA__VTK__IMAGE3DOBSERVER__H__
-
-// eof - $RCSfile$
--- /dev/null
+d #dims=2;3
+d #floats=float;double
+d #mst=fpa::Image::MinimumSpanningTree
+d #path=ExtractPathFromMinimumSpanningTree
+d #ebc=ExtractEndPointsAndBifurcationsFromMinimumSpanningTree
+
+f fpa_Instances/Instances.h
+
+t fpa/Base/#path.h
+t fpa/Base/#ebc.h
+t fpa/Image/#ebc.h
+
+c fpa::Base::#path< #mst< #dims > >
+c fpa::Base::#ebc< #mst< #dims > >
+c fpa::Image::#ebc< itk::Image< #floats, #dims >, #mst< #dims > >
+
+* eof - $RCSfile$
-FILE(
- GLOB libs_DEFS RELATIVE
- "${CMAKE_CURRENT_SOURCE_DIR}"
- "${CMAKE_CURRENT_SOURCE_DIR}/*.i"
- )
+## =================================
+## == Compile instances libraries ==
+## =================================
+
+SET(pfx "fpa_")
+SET(arg ${pfx} ${prj_VER} ${prj_sVER})
-SET(aux_ALL_INSTANCES)
-FOREACH(i ${libs_DEFS})
- GET_FILENAME_COMPONENT(l_DEF ${i} NAME_WE)
- SET(i_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${l_DEF}.i")
- SET(h_FILE "${CMAKE_CURRENT_BINARY_DIR}/${l_DEF}.h")
- SET(s_FILE "${CMAKE_CURRENT_BINARY_DIR}/${l_DEF}.cxx")
- SET(o_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${l_DEF}_extra.cxx")
- SET(l_NAME "fpa_${l_DEF}")
- SET(aux_ALL_INSTANCES ${aux_ALL_INSTANCES} ${l_NAME})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${h_FILE} ${s_FILE}
- DEPENDS ${cpPlugins_CreateInstances} ${i_FILE}
- COMMAND ${cpPlugins_CreateInstances} ${i_FILE} ${l_NAME} ${h_FILE} ${s_FILE}
- )
- IF(EXISTS ${o_FILE})
- ADD_LIBRARY(${l_NAME} SHARED ${s_FILE} ${o_FILE})
- ELSE(EXISTS ${o_FILE})
- ADD_LIBRARY(${l_NAME} SHARED ${s_FILE})
- ENDIF(EXISTS ${o_FILE})
- SET_TARGET_PROPERTIES(
- ${l_NAME} PROPERTIES
- VERSION "${prj_VER}"
- SOVERSION "${prj_sVER}"
- )
- GENERATE_EXPORT_HEADER(
- ${l_NAME}
- BASE_NAME ${l_NAME}
- EXPORT_MACRO_NAME ${l_NAME}_EXPORT
- EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/${l_NAME}_Export.h
- STATIC_DEFINE ${l_NAME}_BUILT_AS_STATIC
- )
-ENDFOREACH(i)
+cpPlugins_WrapInstances(Instances ${arg} ${cpPlugins_LIBRARIES})
+cpPlugins_WrapInstances(Functors ${arg} ${pfx}Instances)
+cpPlugins_WrapInstances(Filters ${arg} ${pfx}Instances)
+cpPlugins_WrapInstances(Backtracking ${arg} ${pfx}Instances)
+cpPlugins_WrapInstances(Observers ${arg} ${pfx}Filters)
SET(
- fpa_ALL_INSTANCES
- ${aux_ALL_INSTANCES}
- CACHE STRING "All instances libraries."
+ fpa_LIBRARIES
+ ${pfx}Instances
+ ${pfx}Functors
+ ${pfx}Filters
+ ${pfx}Backtracking
+ ${pfx}Observers
+ CACHE INTERNAL "All valid instances." FORCE
)
-## Target links
-TARGET_LINK_LIBRARIES(fpa_Instances ${cpPlugins_LIBRARIES} ${ITK_LIBRARIES} ${VTK_LIBRARIES})
-TARGET_LINK_LIBRARIES(fpa_Filters fpa_Instances)
-TARGET_LINK_LIBRARIES(fpa_Observers fpa_Filters)
-
-# TARGET_LINK_LIBRARIES(fpa_Transforms ${ITK_LIBRARIES} fpa_Base)
-# TARGET_LINK_LIBRARIES(fpa_Paths fpa_Base)
-# TARGET_LINK_LIBRARIES(fpa_Mesh fpa_Base)
-# TARGET_LINK_LIBRARIES(fpa_Image fpa_Base)
-# TARGET_LINK_LIBRARIES(fpa_ImageIterators ${ITK_LIBRARIES} fpa_Image)
-# TARGET_LINK_LIBRARIES(fpa_ImageFiltersBase fpa_Image)
-# TARGET_LINK_LIBRARIES(fpa_InPlaceImageFiltersBase fpa_ImageFiltersBase)
-# TARGET_LINK_LIBRARIES(fpa_ImageITK2VTK fpa_ImageFiltersBase ${VTK_LIBRARIES})
-# TARGET_LINK_LIBRARIES(fpa_ThresholdFilters fpa_InPlaceImageFiltersBase fpa_ImageIterators)
-# TARGET_LINK_LIBRARIES(fpa_DistanceMapFilters fpa_ThresholdFilters)
-# TARGET_LINK_LIBRARIES(fpa_ResamplingFilters fpa_ImageFiltersBase fpa_ImageIterators fpa_Transforms)
-# TARGET_LINK_LIBRARIES(fpa_GaussianImageFilters fpa_ImageFiltersBase fpa_ImageIterators)
-# TARGET_LINK_LIBRARIES(fpa_ImageIO fpa_ImageFiltersBase fpa_ImageIterators)
-
-# INSTALL(
-# TARGETS ${l_NAME}
-# RUNTIME DESTINATION bin
-# LIBRARY DESTINATION lib
-# ARCHIVE DESTINATION lib/static
-# )
-# INSTALL(
-# FILES
-# ${lib_HEADERS}
-# DESTINATION include/${lib_DIR}
-# )
-
## eof - $RCSfile$
f fpa_Instances/Instances.h
-t fpa/Image/RegionGrow.h
-t fpa/Image/Dijkstra.h
-t fpa/Image/Algorithm.h
t fpa/Base/Algorithm.h
t fpa/Base/RegionGrow.h
t fpa/Base/Dijkstra.h
+t fpa/Image/Algorithm.h
+t fpa/Image/RegionGrow.h
+t fpa/Image/Dijkstra.h
+
d #dims=2;3
d #int=char;short;int;long
d #uint=unsigned #int
d #float=float;double
d #pixels=#int;#uint;#float
+d #b=fpa::Base
+d #i=fpa::Image
+d #mst=MinimumSpanningTree
+d #rg_ins=#pixels
+d #rg_outs=unsigned short;unsigned char
+d #d_ins=#pixels
+d #d_outs=#float
+d #inputs=#pixels
+d #outputs=#pixels
+
+* =====================
+* == Base algorithms ==
+* =====================
+
+c #b::Algorithm< itk::Index< #dims >, #inputs, #outputs, itk::Image< #inputs, #dims >, itk::Functor::IndexLexicographicCompare< #dims >, itk::ImageToImageFilter< itk::Image< #inputs, #dims >, itk::Image< #outputs, #dims > > >
+
+c #i::Algorithm< itk::Image< #rg_ins, #dims >, itk::Image< #rg_outs, #dims >, fpa::Base::RegionGrow< itk::Index< #dims >, #rg_ins, #rg_outs, itk::Image< #rg_ins, #dims >, itk::Functor::IndexLexicographicCompare< #dims >, itk::ImageToImageFilter< itk::Image< #rg_ins, #dims >, itk::Image< #rg_outs, #dims > > > >
+
+* ======================
+* == Image algorithms ==
+* ======================
+
+c #i::RegionGrow< itk::Image< #rg_ins, #dims >, itk::Image< #rg_outs, #dims > >
+c #i::Dijkstra< itk::Image< #d_ins, #dims >, itk::Image< #d_outs, #dims > >
-c fpa::Image::RegionGrow< itk::Image< #pixels, #dims >, itk::Image< #uint, #dims > >
-c fpa::Image::Dijkstra< itk::Image< #pixels, #dims >, itk::Image< #float, #dims > >
+* eof - $RCSfile$
--- /dev/null
+d #functors=GulsunTekMedialness;FluxMedialness;MFluxMedialness
+d #filter=cpExtensions::Algorithms::ImageFunctionFilter
+d #vectors=itk::CovariantVector
+d #k=itk::Image
+
+f fpa_Instances/Instances.h
+
+t itkImageFunction.h
+t fpa/Image/Functors/#functors.h
+t fpa/Image/Functors/GradientImageFunctionBase.h
+t cpExtensions/Algorithms/ImageFunctionFilter.h
+
+d #dims=2;3
+d #int=char;short;int;long
+d #uint=unsigned #int
+d #float=float;double
+d #pixels=#int;#uint;#float
+d #b=fpa::Base
+d #i=fpa::Image
+d #mst=MinimumSpanningTree
+d #rg_ins=#pixels
+d #rg_outs=unsigned short;unsigned char
+d #d_ins=#pixels
+d #d_outs=#float
+d #inputs=#pixels
+d #outputs=#pixels
+
+c #i::Functors::#functors< #k< #vectors< #float, #dims >, #dims > >
+c #filter< #k< #vectors< #float, #dims >, #dims >, #k< #float, #dims >, #i::Functors::#functors< #k< #vectors< #float, #dims >, #dims > > >
+
+* eof - $RCSfile$
f cpPlugins_Instances/ScalarImagesBaseFilters.h
-t fpa/Image/MinimumSpanningTree.h
t fpa/Base/MinimumSpanningTree.h
-t fpa/Base/RegionGrow.h
-t fpa/Base/Dijkstra.h
-t fpa/Base/Algorithm.h
-t itkImportImageContainer.h
+t fpa/Image/MinimumSpanningTree.h
+t fpa/IO/MinimumSpanningTreeReader.h
+t fpa/IO/MinimumSpanningTreeWriter.h
+
t itkImage.h
+t itkImportImageContainer.h
+t itkImageRegionConstIteratorWithIndex.h
+t itkImageConstIteratorWithIndex.h
d #dims=2;3
d #int=char;short;int;long
d #uint=unsigned #int
d #float=float;double
d #pixels=#int;#uint;#float
+d #b=fpa::Base
+d #i=fpa::Image
+d #mst=MinimumSpanningTree
+d #rg_ins=#pixels
+d #rg_outs=unsigned short;unsigned char
+d #d_ins=#pixels
+d #d_outs=#float
+d #inputs=#pixels
+d #outputs=#pixels
+
+* ================
+* == Base types ==
+* ================
+
+c itk::ImportImageContainer< unsigned long, #i::{#mst}Data< #dims > >
+c itk::Image< #i::{#mst}Data< #dims >, #dims >
+c #b::#mst< itk::Image< #i::{#mst}Data< #dims >, #dims >, itk::Index< #dims > >
+c #i::#mst@{Data;{}}< #dims >
+
+c itk::ImageConstIteratorWithIndex< #i::#mst< #dims > >
+c itk::ImageRegionConstIteratorWithIndex< #i::#mst< #dims > >
+c fpa::IO::MinimumSpanningTree@{Reader;Writer}< #i::#mst< #dims > >
-c itk::ImportImageContainer< unsigned long, fpa::Image::MinimumSpanningTreeData< #dims > >
-c itk::Image< fpa::Image::MinimumSpanningTreeData< #dims >, #dims >
-c fpa::Base::MinimumSpanningTree< itk::Image< fpa::Image::MinimumSpanningTreeData< #dims >, #dims >, itk::Index< #dims > >
-c fpa::Image::MinimumSpanningTree< #dims >
-c fpa::Base::Algorithm< itk::Index< #dims >, #pixels, #pixels, itk::Image< #pixels, #dims >, itk::Functor::IndexLexicographicCompare< #dims >, itk::ImageToImageFilter< itk::Image< #pixels, #dims >, itk::Image< #pixels, #dims > > >
-c fpa::Base::Dijkstra< itk::Index< #dims >, #pixels, #float, itk::Image< #pixels, #dims >, itk::Functor::IndexLexicographicCompare< #dims >, fpa::Image::MinimumSpanningTree< #dims >, itk::ImageToImageFilter< itk::Image< #pixels, #dims >, itk::Image< #float, #dims> > >
-c fpa::Base::RegionGrow< itk::Index< #dims >, #pixels, #uint, itk::Image< #pixels, #dims >, itk::Functor::IndexLexicographicCompare< #dims >, itk::ImageToImageFilter< itk::Image< #pixels, #dims >, itk::Image< #uint, #dims > > >
+* eof - $RCSfile$
-f fpa_Instances/Filters.h
-
-i vtkRenderWindow.h
-
-t fpa/VTK/Image2DObserver.h
-t fpa/VTK/Image3DObserver.h
-
d #dims=2;3
d #int=char;short;int;long
d #uint=unsigned #int
d #float=float;double
d #pixels=#int;#uint;#float
+d #rg_ins=#pixels
+d #rg_outs=unsigned short;unsigned char
+d #d_ins=#pixels
+d #d_outs=#float
+d #cls=fpa::VTK::Image::Observer
+d #i=fpa::Image
+d #k=itk::Image
+
+f fpa_Instances/Filters.h
+
+i vtkRenderWindow.h
+
+t fpa/VTK/Image/Observer2D.h
+t fpa/VTK/Image/Observer3D.h
+
+c {#cls}{#dims}D< #i::RegionGrow< #k< #rg_ins, #dims >, #k< #rg_outs, #dims > >, vtkRenderWindow >
+c {#cls}{#dims}D< #i::Dijkstra< #k< #d_ins, #dims >, #k< #d_outs, #dims > >, vtkRenderWindow >
-c @{fpa::VTK::Image2DObserver;fpa::VTK::Image3DObserver}< fpa::Image::RegionGrow< itk::Image< #pixels, #dims >, itk::Image< #uint, #dims > >, vtkRenderWindow >
-c @{fpa::VTK::Image2DObserver;fpa::VTK::Image3DObserver}< fpa::Image::Dijkstra< itk::Image< #pixels, #dims >, itk::Image< #float, #dims > >, vtkRenderWindow >
+* eof - $RCSfile$
-SUBDIRS(
- fpa
- )
+IF(BUILD_PLUGINS)
+ SUBDIRS(
+ fpa
+ )
+ENDIF(BUILD_PLUGINS)
## eof - $RCSfile$
#include "BaseImageFilter.h"
#include <cpPlugins/Image.h>
-//#include <itkSimpleDataObjectDecorator.hxx>
// -------------------------------------------------------------------------
bool fpaPlugins::BaseImageFilter::
#ifndef __FPAPLUGINS__BASEIMAGEFILTER__HXX__
#define __FPAPLUGINS__BASEIMAGEFILTER__HXX__
+#include <cpExtensions/DataStructures/ImageIndexesContainer.h>
#include <fpa_Instances/Observers.h>
-#include <itkSimpleDataObjectDecorator.h>
-/* TODO
- #include <cpPlugins/Image.h>
- #include <fpa/VTK/Image2DObserver.h>
- #include <fpa/VTK/Image3DObserver.h>
- #include <vtkRenderWindowInteractor.h>
-
- #include <fpa/VTK/Image2DObserver.hxx>
- #include <fpa/VTK/Image3DObserver.hxx>
-*/
// -------------------------------------------------------------------------
template< class _TFilter >
_TFilter* fpaPlugins::BaseImageFilter::
_ConfigureFilter( )
{
- typedef typename _TFilter::TInputImage _TImage;
- typedef typename _TImage::IndexType _TIndex;
- typedef itk::Point< double, _TImage::ImageDimension > _TPoint;
- typedef itk::SimpleDataObjectDecorator< std::vector< _TPoint > > _TPoints;
- typedef itk::SimpleDataObjectDecorator< std::vector< _TIndex > > _TIndexes;
+ typedef typename _TFilter::TInputImage _TImage;
+ static const unsigned int Dim = _TImage::ImageDimension;
+ typedef
+ cpExtensions::DataStructures::ImageIndexesContainer< Dim >
+ _TIndexes;
auto image = this->GetInputData( "Input" )->GetITK< _TImage >( );
if( image == NULL )
return( NULL );
- auto points = this->GetInputData( "Seeds" )->GetITK< _TPoints >( );
auto indexes = this->GetInputData( "Seeds" )->GetITK< _TIndexes >( );
// Create filter and connect input
// Assign seeds
filter->ClearSeeds( );
- if( points != NULL )
- {
- for(
- auto pIt = points->Get( ).begin( );
- pIt != points->Get( ).end( );
- ++pIt
- )
- {
- _TIndex idx;
- if( image->TransformPhysicalPointToIndex( *pIt, idx ) )
- filter->AddSeed( idx, 0 );
-
- } // rof
- }
- else if( indexes != NULL )
+ if( indexes != NULL )
{
- for(
- auto iIt = indexes->Get( ).begin( );
- iIt != indexes->Get( ).end( );
- ++iIt
- )
+ auto iIt = indexes->Get( ).begin( );
+ for( ; iIt != indexes->Get( ).end( ); ++iIt )
filter->AddSeed( *iIt, 0 );
} // fi
_ConfigureDebugger( _TFilter* filter )
{
typedef typename _TFilter::TInputImage _TImage;
- typedef fpa::VTK::Image2DObserver< _TFilter, vtkRenderWindow > _2D;
- typedef fpa::VTK::Image3DObserver< _TFilter, vtkRenderWindow > _3D;
+ typedef fpa::VTK::Image::Observer2D< _TFilter, vtkRenderWindow > _2D;
+ typedef fpa::VTK::Image::Observer3D< _TFilter, vtkRenderWindow > _3D;
this->m_Observers.clear( );
if( this->m_Parameters.GetBool( "VisualDebug" ) )
SET(lib_NAME fpaPlugins)
-SET(lib_DIR fpa)
-
-## ===============
-## = Source code =
-## ===============
-
SET(
- base_HEADERS_H
- ${CMAKE_CURRENT_SOURCE_DIR}/BaseImageFilter.h
- ${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTree.h
- )
-
-SET(
- filters_HEADERS_H
- #${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTreeReader.h
- #${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTreeWriter.h
+ lib_HEADERS
+ ${CMAKE_CURRENT_SOURCE_DIR}/GradientBaseImageFunctionSource.h
${CMAKE_CURRENT_SOURCE_DIR}/ImageRegionGrow.h
${CMAKE_CURRENT_SOURCE_DIR}/ImageDijkstra.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTreeReader.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTreeWriter.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/RegionGrowThresholdFunction.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/InvertCostFunction.h
${CMAKE_CURRENT_SOURCE_DIR}/ExtractPathFromMinimumSpanningTree.h
${CMAKE_CURRENT_SOURCE_DIR}/ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.h
- #${CMAKE_CURRENT_SOURCE_DIR}/RegionGrowThresholdFunction.h
- ${CMAKE_CURRENT_SOURCE_DIR}/InvertCostFunction.h
- #${CMAKE_CURRENT_SOURCE_DIR}/GradientBaseImageFunctionSource.h
- )
-
-SET(
- base_HEADERS_HXX
- ${CMAKE_CURRENT_SOURCE_DIR}/BaseImageFilter.hxx
- )
-
-SET(
- base_SOURCES_CXX
- ${CMAKE_CURRENT_SOURCE_DIR}/BaseImageFilter.cxx
- ${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTree.cxx
)
-
SET(
- filters_SOURCES_CXX
- #${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTreeReader.cxx
- #${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTreeWriter.cxx
+ lib_SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/GradientBaseImageFunctionSource.cxx
${CMAKE_CURRENT_SOURCE_DIR}/ImageRegionGrow.cxx
${CMAKE_CURRENT_SOURCE_DIR}/ImageDijkstra.cxx
+ ${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTreeReader.cxx
+ ${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTreeWriter.cxx
+ ${CMAKE_CURRENT_SOURCE_DIR}/RegionGrowThresholdFunction.cxx
+ ${CMAKE_CURRENT_SOURCE_DIR}/InvertCostFunction.cxx
${CMAKE_CURRENT_SOURCE_DIR}/ExtractPathFromMinimumSpanningTree.cxx
${CMAKE_CURRENT_SOURCE_DIR}/ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.cxx
- #${CMAKE_CURRENT_SOURCE_DIR}/RegionGrowThresholdFunction.cxx
- ${CMAKE_CURRENT_SOURCE_DIR}/InvertCostFunction.cxx
- #${CMAKE_CURRENT_SOURCE_DIR}/GradientBaseImageFunctionSource.cxx
)
-
SET(
- target_LIBRARIES
- ${fpa_ALL_INSTANCES}
- ${cpExtensions_LIBRARY}
+ lib_OTHER_SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/BaseImageFilter.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/BaseImageFilter.hxx
+ ${CMAKE_CURRENT_SOURCE_DIR}/BaseImageFilter.cxx
+ ${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTree.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/MinimumSpanningTree.cxx
)
+SET(lib_QT4_HEADERS "")
-## =====================
-## = Compilation rules =
-## =====================
-
-ADD_CUSTOM_COMMAND(
- OUTPUT ${lib_NAME}_Host.cxx
- DEPENDS ${cpPlugins_HostCreator} ${filters_HEADERS_H}
- COMMAND ${cpPlugins_HostCreator} ${lib_NAME}_Host.cxx ${filters_HEADERS_H}
- )
-ADD_LIBRARY(
- ${lib_NAME}
- SHARED
- ${lib_NAME}_Host.cxx
- ${base_SOURCES_CXX}
- ${filters_SOURCES_CXX}
- )
-SET_TARGET_PROPERTIES(
- ${lib_NAME} PROPERTIES
- VERSION "${prj_VER}"
- SOVERSION "${prj_sVER}"
- )
-GENERATE_EXPORT_HEADER(
- ${lib_NAME}
- BASE_NAME ${lib_NAME}
- EXPORT_MACRO_NAME ${lib_NAME}_EXPORT
- EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/plugins/${lib_DIR}/${lib_NAME}_Export.h
- STATIC_DEFINE ${lib_NAME}_BUILT_AS_STATIC
+cpPlugins_WrapPlugins(
+ ${lib_NAME} ${prj_VER} ${prj_sVER}
+ "${lib_HEADERS}"
+ "${lib_SOURCES}"
+ "${lib_OTHER_SOURCES}"
+ "${lib_QT4_HEADERS}"
+ ${cpExtensions_LIBRARY}
+ ${fpa_LIBRARIES}
)
-TARGET_LINK_LIBRARIES(${lib_NAME} ${target_LIBRARIES})
## ========================
## -- Installation rules --
## ========================
-INSTALL(
- TARGETS ${lib_NAME}
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib/static
- )
+#INSTALL(
+# TARGETS ${lib_NAME}
+# RUNTIME DESTINATION bin
+# LIBRARY DESTINATION lib
+# ARCHIVE DESTINATION lib/static
+# )
## eof - $RCSfile$
#include "ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.h"
+#include <fpa_Instances/Backtracking.h>
#include <cpPlugins/Image.h>
#include <cpPlugins/ImageIndexesContainer.h>
-#include <fpa_Instances/Instances.h>
-#include <itkSimpleDataObjectDecorator.hxx>
-#include <fpa/Image/ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.h>
-#include <fpa/Base/ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.hxx>
-#include <fpa/Image/ExtractEndPointsAndBifurcationsFromMinimumSpanningTree.hxx>
// -------------------------------------------------------------------------
fpaPlugins::ExtractEndPointsAndBifurcationsFromMinimumSpanningTree::
#include "ExtractPathFromMinimumSpanningTree.h"
-#include <fpa_Instances/Instances.h>
-
-#include <itkDataObject.h>
-#include <itkIndex.h>
-#include <itkSimpleDataObjectDecorator.hxx>
-#include <itkVectorContainer.hxx>
-#include <itkParametricPath.hxx>
-#include <cpPlugins_Instances/Paths.h>
#include <cpPlugins/Path.h>
-#include <fpa/Base/ExtractPathFromMinimumSpanningTree.h>
-#include <fpa/Base/ExtractPathFromMinimumSpanningTree.hxx>
+#include <cpExtensions/DataStructures/ImageIndexesContainer.h>
+#include <fpa_Instances/Backtracking.h>
// -------------------------------------------------------------------------
fpaPlugins::ExtractPathFromMinimumSpanningTree::
std::string fpaPlugins::ExtractPathFromMinimumSpanningTree::
_GD0( _TMST* mst )
{
- typedef fpa::Base::ExtractPathFromMinimumSpanningTree< _TMST > _TFilter;
- typedef typename _TMST::TVertex _TVertex;
- typedef itk::SimpleDataObjectDecorator< std::vector< _TVertex > > _TVertices;
+ typedef fpa::Base::ExtractPathFromMinimumSpanningTree< _TMST > _TFilter;
+ typedef
+ cpExtensions::DataStructures::ImageIndexesContainer< _TMST::Dimension >
+ _TVertices;
if( mst == NULL )
return(
"fpaPlugins::ExtractPathFromMinimumSpanningTree: No valid input tree."
#include "GradientBaseImageFunctionSource.h"
+
#include <cpPlugins/Image.h>
-#include <fpa/Image/Functors/GulsunTekMedialness.h>
-#include <fpa/Image/Functors/FluxMedialness.h>
-#include <fpa/Image/Functors/MFluxMedialness.h>
-#include <cpExtensions/Algorithms/ImageFunctionFilter.h>
-#include <fpa/Image/Functors/GulsunTekMedialness.hxx>
-#include <fpa/Image/Functors/FluxMedialness.hxx>
-#include <fpa/Image/Functors/MFluxMedialness.hxx>
-#include <fpa/Image/Functors/GradientImageFunctionBase.hxx>
-#include <cpExtensions/Algorithms/ImageFunctionFilter.hxx>
-#include <itkImageConstIteratorWithIndex.hxx>
-#include <itkImageIteratorWithIndex.hxx>
-#include <itkImageToImageFilter.hxx>
-#include <itkImageFunction.hxx>
-#include <itkImageRegionConstIteratorWithIndex.hxx>
+#include <fpa_Instances/Functors.h>
// -------------------------------------------------------------------------
fpaPlugins::GradientBaseImageFunctionSource::
#include <cpPlugins/Image.h>
#include <fpa_Instances/Filters.h>
-#include <fpa/Image/Functors/RegionGrowAllBelongsFunction.h>
-
-#include <fpa/Base/Algorithm.hxx>
-#include <fpa/Base/Dijkstra.hxx>
-#include <fpa/Image/Algorithm.hxx>
-#include <fpa/Image/Dijkstra.hxx>
-#include <fpa/VTK/Image2DObserver.hxx>
-#include <fpa/VTK/Image3DObserver.hxx>
// -------------------------------------------------------------------------
fpaPlugins::ImageDijkstra::
std::string fpaPlugins::ImageDijkstra::
_GD0( _TImage* image )
{
- typedef fpa::Image::Dijkstra< _TImage, _TImage > _TFilter;
- typedef typename _TFilter::TResult _TCost;
- typedef itk::FunctionBase< _TCost, _TCost > _TCostFunctor;
- typedef typename _TFilter::TMinimumSpanningTree _TMST;
+ typedef float _TPixel;
+ typedef itk::Image< _TPixel, _TImage::ImageDimension > _TOutImage;
+ typedef fpa::Image::Dijkstra< _TImage, _TOutImage > _TFilter;
+ typedef typename _TFilter::TResult _TCost;
+ typedef itk::FunctionBase< _TCost, _TCost > _TCostFunctor;
+ typedef typename _TFilter::TMinimumSpanningTree _TMST;
if( image == NULL )
return( "fpaPlugins::ImageDijkstra: Invalid image type." );
#include <cpPlugins/Image.h>
#include <fpa_Instances/Filters.h>
-#include <fpa/Image/Functors/RegionGrowAllBelongsFunction.h>
-
-#include <fpa/Base/Algorithm.hxx>
-#include <fpa/Base/RegionGrow.hxx>
-#include <fpa/Image/Algorithm.hxx>
-#include <fpa/Image/RegionGrow.hxx>
-#include <fpa/VTK/Image2DObserver.hxx>
-#include <fpa/VTK/Image3DObserver.hxx>
// -------------------------------------------------------------------------
fpaPlugins::ImageRegionGrow::
std::string fpaPlugins::ImageRegionGrow::
_GD0( _TImage* image )
{
- typedef fpa::Image::RegionGrow< _TImage, _TImage > _TFilter;
- typedef typename _TFilter::TGrowingFunction _TGrowFunctor;
- typedef typename _TFilter::TResult _TResult;
+ typedef unsigned short _TPixel;
+ typedef itk::Image< _TPixel, _TImage::ImageDimension > _TOutImage;
+ typedef fpa::Image::RegionGrow< _TImage, _TOutImage > _TFilter;
+ typedef typename _TFilter::TGrowingFunction _TGrowFunctor;
+ typedef typename _TFilter::TResult _TResult;
if( image == NULL )
return( "fpaPlugins::ImageRegionGrow: Invalid image type." );
- // Get functor (if any)
+ // Create filter
+ _TFilter* filter = this->_ConfigureFilter< _TFilter >( );
+
typename _TGrowFunctor::Pointer functor;
auto wrap_functor = this->GetInputData( "GrowFunctor" );
if( wrap_functor != NULL )
functor = wrap_functor->GetITK< _TGrowFunctor >( );
if( functor.IsNull( ) )
- functor =
- fpa::Image::Functors::RegionGrowAllBelongsFunction< _TImage >::New( );
-
- // Create filter
- _TFilter* filter = this->_ConfigureFilter< _TFilter >( );
- filter->SetGrowingFunction( functor );
+ filter->SetGrowingFunction( functor );
filter->SetInsideValue(
_TResult( this->m_Parameters.GetUint( "InsideValue" ) )
);
#include "MinimumSpanningTreeReader.h"
#include "MinimumSpanningTree.h"
-#include <fpa/IO/MinimumSpanningTreeReader.h>
-#include <fpa/IO/MinimumSpanningTreeReader.hxx>
+#include <fpa_Instances/Instances.h>
// -------------------------------------------------------------------------
fpaPlugins::MinimumSpanningTreeReader::
#include "MinimumSpanningTreeWriter.h"
#include "MinimumSpanningTree.h"
-#include <fpa/IO/MinimumSpanningTreeWriter.h>
-#include <fpa/IO/MinimumSpanningTreeWriter.hxx>
+#include <fpa_Instances/Instances.h>
// -------------------------------------------------------------------------
fpaPlugins::MinimumSpanningTreeWriter::