From: Leonardo Flórez-Valencia Date: Wed, 26 Oct 2016 22:25:24 +0000 (-0500) Subject: ... X-Git-Tag: v0.1~76 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=49d2d7db538d60008b9a5701ea8f26bb19997a82;p=cpPlugins.git ... --- diff --git a/appli/CMakeLists.txt b/appli/CMakeLists.txt index cc05c08..46ade1e 100644 --- a/appli/CMakeLists.txt +++ b/appli/CMakeLists.txt @@ -1,7 +1,7 @@ SUBDIRS( bash examples - PipelineEditor + # PipelineEditor ) ## eof - $RCSfile$ diff --git a/appli/bash/CMakeLists.txt b/appli/bash/CMakeLists.txt index aa50398..c945e6a 100644 --- a/appli/bash/CMakeLists.txt +++ b/appli/bash/CMakeLists.txt @@ -1,59 +1,26 @@ -SET(_pfx "cpPlugins_bash_") -SET(_src_dir ${CMAKE_CURRENT_SOURCE_DIR}) -SET(_bin_dir ${CMAKE_CURRENT_BINARY_DIR}) - -## ======================== -## == Build sources list == -## ======================== - -FILE(GLOB _sources RELATIVE "${_src_dir}" "${_src_dir}/*.cxx") -FILE(GLOB _sources_cfg RELATIVE "${_src_dir}" "${_src_dir}/*.cxx.in") -FILE(GLOB _headers_cfg RELATIVE "${_src_dir}" "${_src_dir}/*.h.in") - -## ======================= -## == Configure sources == -## ======================= - -FOREACH(_cfg ${_headers_cfg}) - GET_FILENAME_COMPONENT(_ext ${_cfg} EXT) - STRING(LENGTH ${_ext} _ext_len) - STRING(SUBSTRING ${_ext} 1 ${_ext_len} _ext_name) - GET_FILENAME_COMPONENT(_real_ext ${_ext_name} NAME_WE) - GET_FILENAME_COMPONENT(_name ${_cfg} NAME_WE) - CONFIGURE_FILE( - ${_src_dir}/${_cfg} - ${_bin_dir}/${_name}.${_real_ext} @ONLY - ) -ENDFOREACH(_cfg) - -FOREACH(_cfg ${_sources_cfg}) - GET_FILENAME_COMPONENT(_ext ${_cfg} EXT) - STRING(LENGTH ${_ext} _ext_len) - STRING(SUBSTRING ${_ext} 1 ${_ext_len} _ext_name) - GET_FILENAME_COMPONENT(_real_ext ${_ext_name} NAME_WE) - GET_FILENAME_COMPONENT(_name ${_cfg} NAME_WE) - CONFIGURE_FILE( - ${_src_dir}/${_cfg} - ${_bin_dir}/${_name}.${_real_ext} @ONLY - ) - LIST(APPEND _sources ${_bin_dir}/${_name}.${_real_ext}) -ENDFOREACH(_cfg) - -## ========================== -## == Compile source files == -## ========================== - -FOREACH(_src ${_sources}) - GET_FILENAME_COMPONENT(_name ${_src} NAME_WE) - SET(_prog ${_pfx}${_name}) - ADD_EXECUTABLE(${_prog} ${_src}) - INSTALL( - TARGETS ${_prog} - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib/static +CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/Config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/Config.h + @ONLY + ) +INCLUDE_DIRECTORIES( + ${PROJECT_SOURCE_DIR}/appli + ${PROJECT_BINARY_DIR}/appli + ) + +SET( + _bash_APPS + CreateInstances + CreateDemanglers + CreatePlugins + HostCreator + ) +FOREACH(_app ${_bash_APPS}) + ADD_EXECUTABLE(cpPlugins_bash_${_app} ${_app}) + SET( + cpPlugins_bash_${_app}_APP cpPlugins_bash_${_app} + CACHE INTERNAL "bash program cpPlugins_bash_${_app}" ) - SET(${_prog}_APP ${_prog} CACHE INTERNAL "bash program ${_prog}") -ENDFOREACH(_src) +ENDFOREACH(_app) ## eof - $RCSfile$ diff --git a/appli/bash/HostCreator.cxx b/appli/bash/HostCreator.cxx index 455b54e..407fca7 100644 --- a/appli/bash/HostCreator.cxx +++ b/appli/bash/HostCreator.cxx @@ -3,7 +3,7 @@ #include #include #include -#include +#include // ------------------------------------------------------------------------- typedef std::pair< std::string, std::string > TPair; diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e149793..4d6f600 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -8,7 +8,9 @@ IF(USE_QT4) TARGET_LINK_LIBRARIES(cp_QCustomPlot ${QT_LIBRARIES}) ENDIF(USE_QT4) CompileLibFromDir(cpExtensions SHARED cpExtensions) -TARGET_LINK_LIBRARIES(cpExtensions ${QT_LIBRARIES} ${ITK_LIBRARIES} ${VTK_LIBRARIES}) +TARGET_LINK_LIBRARIES( + cpExtensions ${QT_LIBRARIES} ${ITK_LIBRARIES} ${VTK_LIBRARIES} + ) ## =============== ## == Instances == @@ -36,6 +38,13 @@ TARGET_LINK_LIBRARIES( ${cpPlugins_Instances} ) +## ========================= +## == Even more libraries == +## ========================= + +CompileLibFromDir(cpBaseQtApplication SHARED cpBaseQtApplication) +TARGET_LINK_LIBRARIES(cpBaseQtApplication cpPlugins) + ## =================================== ## == Libraries to dynamically load == ## =================================== diff --git a/lib/Instances/ImageIterators.i b/lib/Instances/ImageIterators.i index 5ff717d..f35474c 100644 --- a/lib/Instances/ImageIterators.i +++ b/lib/Instances/ImageIterators.i @@ -1,6 +1,6 @@ header #define ITK_MANUAL_INSTANTIATION -define iter=ImageRegionConstIterator;ImageRegionIterator;ImageScanlineConstIterator;ImageScanlineIterator +define iter=ImageRegionConstIterator;ImageRegionIterator;ImageScanlineConstIterator;ImageScanlineIterator;ImageConstIteratorWithIndex;ImageIteratorWithIndex;ImageRegionConstIteratorWithIndex;ImageRegionIteratorWithIndex tinclude itk#iter#:h|hxx diff --git a/lib/cpPlugins/DataObjects/BoundingBox.cxx b/lib/cpPlugins/DataObjects/BoundingBox.cxx index dfceb29..c10b8a2 100644 --- a/lib/cpPlugins/DataObjects/BoundingBox.cxx +++ b/lib/cpPlugins/DataObjects/BoundingBox.cxx @@ -84,38 +84,6 @@ Blend( Self* other ) this->Modified( ); } -// ------------------------------------------------------------------------- -template< class _TPoint > -void cpPlugins::DataObjects::BoundingBox:: -SetMinimum( const _TPoint& p ) -{ - this->_SetPoint( 0, p ); -} - -// ------------------------------------------------------------------------- -template< class _TPoint > -void cpPlugins::DataObjects::BoundingBox:: -SetMaximum( const _TPoint& p ) -{ - this->_SetPoint( 1, p ); -} - -// ------------------------------------------------------------------------- -template< class _TPoint > -_TPoint cpPlugins::DataObjects::BoundingBox:: -GetMinimum( ) const -{ - return( this->_GetPoint< _TPoint >( 0 ) ); -} - -// ------------------------------------------------------------------------- -template< class _TPoint > -_TPoint cpPlugins::DataObjects::BoundingBox:: -GetMaximum( ) const -{ - return( this->_GetPoint< _TPoint >( 1 ) ); -} - // ------------------------------------------------------------------------- cpPlugins::DataObjects::BoundingBox:: BoundingBox( ) @@ -155,32 +123,6 @@ _UpdateVTK( ) this->m_VTK = this->m_Outline->GetOutput( ); } -// ------------------------------------------------------------------------- -template< class _TPoint > -void cpPlugins::DataObjects::BoundingBox:: -_SetPoint( unsigned int m, const _TPoint& p ) -{ - this->m_Points[ m ].clear( ); - for( unsigned int d = 0; d < _TPoint::PointDimension; ++d ) - this->m_Points[ m ].push_back( double( p[ d ] ) ); - this->_UpdateVTK( ); - this->Modified( ); -} - -// ------------------------------------------------------------------------- -template< class _TPoint > -_TPoint cpPlugins::DataObjects::BoundingBox:: -_GetPoint( unsigned int m ) const -{ - unsigned int dim = this->m_Points[ m ].size( ); - dim = ( _TPoint::PointDimension < dim )? _TPoint::PointDimension: dim; - _TPoint p; - p.Fill( 0 ); - for( unsigned int d = 0; d < dim; ++d ) - p[ d ] = this->m_Points[ m ][ d ]; - return( p ); -} - // ------------------------------------------------------------------------- template< unsigned int _NDim > bool cpPlugins::DataObjects::BoundingBox:: diff --git a/lib/cpPlugins/DataObjects/BoundingBox.h b/lib/cpPlugins/DataObjects/BoundingBox.h index 2b5c9c8..11cf8c2 100644 --- a/lib/cpPlugins/DataObjects/BoundingBox.h +++ b/lib/cpPlugins/DataObjects/BoundingBox.h @@ -36,16 +36,28 @@ namespace cpPlugins void Blend( Self* other ); template< class _TPoint > - inline void SetMinimum( const _TPoint& p ); + inline void SetMinimum( const _TPoint& p ) + { + this->_SetPoint( 0, p ); + } template< class _TPoint > - inline void SetMaximum( const _TPoint& p ); + inline void SetMaximum( const _TPoint& p ) + { + this->_SetPoint( 1, p ); + } template< class _TPoint > - inline _TPoint GetMinimum( ) const; + inline _TPoint GetMinimum( ) const + { + return( this->_GetPoint< _TPoint >( 0 ) ); + } template< class _TPoint > - inline _TPoint GetMaximum( ) const; + inline _TPoint GetMaximum( ) const + { + return( this->_GetPoint< _TPoint >( 1 ) ); + } protected: BoundingBox( ); @@ -54,16 +66,33 @@ namespace cpPlugins void _UpdateVTK( ); template< class _TPoint > - inline void _SetPoint( unsigned int m, const _TPoint& p ); + inline void _SetPoint( unsigned int m, const _TPoint& p ) + { + this->m_Points[ m ].clear( ); + for( unsigned int d = 0; d < _TPoint::PointDimension; ++d ) + this->m_Points[ m ].push_back( double( p[ d ] ) ); + this->_UpdateVTK( ); + this->Modified( ); + } template< class _TPoint > - inline _TPoint _GetPoint( unsigned int m ) const; + inline _TPoint _GetPoint( unsigned int m ) const + { + unsigned int dim = this->m_Points[ m ].size( ); + dim = + ( _TPoint::PointDimension < dim )? _TPoint::PointDimension: dim; + _TPoint p; + p.Fill( 0 ); + for( unsigned int d = 0; d < dim; ++d ) + p[ d ] = this->m_Points[ m ][ d ]; + return( p ); + } template< unsigned int _NDim > - inline bool _ITKImage( itk::LightObject* o ); + inline bool _ITKImage( itk::LightObject* o ); template< class _TScalar, unsigned int _NDim > - inline bool _ITKPointSet( itk::LightObject* o ); + inline bool _ITKPointSet( itk::LightObject* o ); private: // Purposely not implemented diff --git a/lib/cpPlugins/DataObjects/Image.h b/lib/cpPlugins/DataObjects/Image.h index 3f87b75..54710e1 100644 --- a/lib/cpPlugins/DataObjects/Image.h +++ b/lib/cpPlugins/DataObjects/Image.h @@ -58,8 +58,6 @@ namespace cpPlugins } // ecapseman -#include - #endif // __cpPlugins__DataObjects__Image__h__ // eof - $RCSfile$ diff --git a/lib/cpPlugins/DataObjects/Mesh.h b/lib/cpPlugins/DataObjects/Mesh.h index 812fef0..b932bdf 100644 --- a/lib/cpPlugins/DataObjects/Mesh.h +++ b/lib/cpPlugins/DataObjects/Mesh.h @@ -45,7 +45,6 @@ namespace cpPlugins } // ecapseman -#include #include #endif // __cpPlugins__DataObjects__Mesh__h__ diff --git a/lib/tinyxml2/tinyxml2.h b/lib/tinyxml2/tinyxml2.h index 2647cd6..690f6d5 100644 --- a/lib/tinyxml2/tinyxml2.h +++ b/lib/tinyxml2/tinyxml2.h @@ -96,9 +96,9 @@ static const int TIXML2_MAJOR_VERSION = 3; static const int TIXML2_MINOR_VERSION = 0; static const int TIXML2_PATCH_VERSION = 0; -#include +#include #undef TINYXML2_LIB -#define TINYXML2_LIB cpPlugins_tinyxml2_EXPORT +#define TINYXML2_LIB cp_tinyxml2_EXPORT namespace tinyxml2 { diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index ac17cbc..b29bf7d 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -9,9 +9,9 @@ SET( #ImageArithmeticFilters #ImageBooleanFilters #ImageDistanceMaps - #ImageGenericFilters + ImageGenericFilters #ImageGradientFilters - #ImageMeshFilters + ImageMeshFilters ImageSources #ImageThresholdFilters IO diff --git a/plugins/IO/DicomSeriesReader.cxx b/plugins/IO/DicomSeriesReader.cxx index 1dd92c0..a93759d 100644 --- a/plugins/IO/DicomSeriesReader.cxx +++ b/plugins/IO/DicomSeriesReader.cxx @@ -1,11 +1,11 @@ -#include -#include +#include +#include #ifdef cpPlugins_QT4 #include #include -#include +#include // ------------------------------------------------------------------------- cpPluginsIO::DicomSeriesReaderQDialog:: diff --git a/plugins/IO/DicomSeriesReader.h b/plugins/IO/DicomSeriesReader.h index ec3dc1f..0a77ed9 100644 --- a/plugins/IO/DicomSeriesReader.h +++ b/plugins/IO/DicomSeriesReader.h @@ -1,7 +1,7 @@ #ifndef __CPPLUGINSIO__DICOMSERIESREADER__H__ #define __CPPLUGINSIO__DICOMSERIESREADER__H__ -#include "ImageReader.h" +#include namespace cpPluginsIO { diff --git a/plugins/IO/MeshWriter.cxx b/plugins/IO/MeshWriter.cxx index 23921e0..fac2dc9 100644 --- a/plugins/IO/MeshWriter.cxx +++ b/plugins/IO/MeshWriter.cxx @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/plugins/IO/MeshWriter.h b/plugins/IO/MeshWriter.h index 4339e2b..ed8f461 100644 --- a/plugins/IO/MeshWriter.h +++ b/plugins/IO/MeshWriter.h @@ -1,7 +1,7 @@ #ifndef __CPPLUGINSIO__MESHWRITER__H__ #define __CPPLUGINSIO__MESHWRITER__H__ -#include +#include #include namespace cpPluginsIO diff --git a/plugins/ImageGenericFilters/MinimumMaximumCalculator.cxx b/plugins/ImageGenericFilters/MinimumMaximumCalculator.cxx index 6bb5190..822f61f 100644 --- a/plugins/ImageGenericFilters/MinimumMaximumCalculator.cxx +++ b/plugins/ImageGenericFilters/MinimumMaximumCalculator.cxx @@ -1,9 +1,8 @@ -#include +#include #include #include #include -#include // ------------------------------------------------------------------------- cpPluginsImageGenericFilters::MinimumMaximumCalculator:: diff --git a/plugins/ImageGenericFilters/MinimumMaximumCalculator.h b/plugins/ImageGenericFilters/MinimumMaximumCalculator.h index bc18f97..695cb84 100644 --- a/plugins/ImageGenericFilters/MinimumMaximumCalculator.h +++ b/plugins/ImageGenericFilters/MinimumMaximumCalculator.h @@ -1,7 +1,7 @@ #ifndef __cpPluginsImageGenericFilters__MinimumMaximumCalculator__h__ #define __cpPluginsImageGenericFilters__MinimumMaximumCalculator__h__ -#include +#include #include namespace cpPluginsImageGenericFilters diff --git a/plugins/ImageGenericFilters/RegionOfInterestImageFilter.cxx b/plugins/ImageGenericFilters/RegionOfInterestImageFilter.cxx index 8b6b89d..b6bc546 100644 --- a/plugins/ImageGenericFilters/RegionOfInterestImageFilter.cxx +++ b/plugins/ImageGenericFilters/RegionOfInterestImageFilter.cxx @@ -1,10 +1,8 @@ -#include +#include #include #include #include -#include -#include // ------------------------------------------------------------------------- cpPluginsImageGenericFilters::RegionOfInterestImageFilter:: diff --git a/plugins/ImageGenericFilters/RegionOfInterestImageFilter.h b/plugins/ImageGenericFilters/RegionOfInterestImageFilter.h index 2f73ed4..1f2f2c5 100644 --- a/plugins/ImageGenericFilters/RegionOfInterestImageFilter.h +++ b/plugins/ImageGenericFilters/RegionOfInterestImageFilter.h @@ -1,7 +1,7 @@ #ifndef __cpPluginsImageGenericFilters__RegionOfInterestImageFilter__h__ #define __cpPluginsImageGenericFilters__RegionOfInterestImageFilter__h__ -#include +#include #include namespace cpPluginsImageGenericFilters diff --git a/plugins/ImageGenericFilters/RescaleIntensityImageFilter.cxx b/plugins/ImageGenericFilters/RescaleIntensityImageFilter.cxx index 01ccdbc..52a3635 100644 --- a/plugins/ImageGenericFilters/RescaleIntensityImageFilter.cxx +++ b/plugins/ImageGenericFilters/RescaleIntensityImageFilter.cxx @@ -1,10 +1,7 @@ -#include +#include #include #include -#include -#include -#include // ------------------------------------------------------------------------- cpPluginsImageGenericFilters::RescaleIntensityImageFilter:: diff --git a/plugins/ImageGenericFilters/RescaleIntensityImageFilter.h b/plugins/ImageGenericFilters/RescaleIntensityImageFilter.h index d04ee48..bfd2941 100644 --- a/plugins/ImageGenericFilters/RescaleIntensityImageFilter.h +++ b/plugins/ImageGenericFilters/RescaleIntensityImageFilter.h @@ -1,7 +1,7 @@ #ifndef __cpPluginsImageGenericFilters__RescaleIntensityImageFilter__h__ #define __cpPluginsImageGenericFilters__RescaleIntensityImageFilter__h__ -#include +#include #include namespace cpPluginsImageGenericFilters @@ -19,7 +19,7 @@ namespace cpPluginsImageGenericFilters protected: template< class _TImage > - inline void _GD0( _TImage* input ); + inline void _GD0( _TImage* input ); }; } // ecapseman diff --git a/plugins/ImageMeshFilters/ImageMeshFilters.i b/plugins/ImageMeshFilters/ImageMeshFilters.i new file mode 100644 index 0000000..d604096 --- /dev/null +++ b/plugins/ImageMeshFilters/ImageMeshFilters.i @@ -0,0 +1,9 @@ +header #define ITK_MANUAL_INSTANTIATION + +tinclude itkTriangleMeshToBinaryImageFilter:h|hxx +tinclude cpExtensions/Algorithms/RasterContourFilter:h|hxx + +instances cpExtensions::Algorithms::RasterContourFilter< itk::Image< #scalar_pixels#, 2 > > +instances itk::TriangleMeshToBinaryImageFilter< itk::Mesh< #real_types#, 3 >, itk::Image< #scalar_pixels#, 3 > > + +** eof - $RCSfile$ diff --git a/plugins/ImageMeshFilters/MarchingCubes.cxx b/plugins/ImageMeshFilters/MarchingCubes.cxx index 0d1e4e6..8273be7 100644 --- a/plugins/ImageMeshFilters/MarchingCubes.cxx +++ b/plugins/ImageMeshFilters/MarchingCubes.cxx @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/plugins/ImageMeshFilters/MarchingCubes.h b/plugins/ImageMeshFilters/MarchingCubes.h index b20a64f..267c393 100644 --- a/plugins/ImageMeshFilters/MarchingCubes.h +++ b/plugins/ImageMeshFilters/MarchingCubes.h @@ -1,7 +1,7 @@ #ifndef __CPPLUGINSIMAGEMESH__MARCHINGCUBES__H__ #define __CPPLUGINSIMAGEMESH__MARCHINGCUBES__H__ -#include +#include #include namespace cpPluginsImageMeshFilters diff --git a/plugins/ImageMeshFilters/RasterMeshFilter.cxx b/plugins/ImageMeshFilters/RasterMeshFilter.cxx index e9faaa7..20a6769 100644 --- a/plugins/ImageMeshFilters/RasterMeshFilter.cxx +++ b/plugins/ImageMeshFilters/RasterMeshFilter.cxx @@ -1,12 +1,9 @@ -#include +#include #include #include -#include #include #include -#include -#include // ------------------------------------------------------------------------- cpPluginsImageMeshFilters::RasterMeshFilter:: diff --git a/plugins/ImageMeshFilters/RasterMeshFilter.h b/plugins/ImageMeshFilters/RasterMeshFilter.h index 50f9859..b233c1b 100644 --- a/plugins/ImageMeshFilters/RasterMeshFilter.h +++ b/plugins/ImageMeshFilters/RasterMeshFilter.h @@ -1,7 +1,7 @@ #ifndef __cpPluginsImageMesh__RasterMeshFilter__h__ #define __cpPluginsImageMesh__RasterMeshFilter__h__ -#include +#include #include #include #include