--- /dev/null
+#!/bin/bash
+
+## ====================================
+## == Some base configuration values ==
+## ====================================
+
+cmake_min_version="3.0"
+qt_min_version="4.8"
+number_of_cores=`grep -c ^processor /proc/cpuinfo`
+number_of_threads=`expr $number_of_cores / 2`
+
+## =================================
+## == Compare two version strings ==
+## =================================
+
+function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
+
+## ==============================
+## == Try to locate base tools ==
+## ==============================
+
+gpp_exe=`which g++`
+if [ -z "gpp_exe" ]; then
+ echo "ERROR: \"g++\" program was not found."
+ echo "ERROR: Please install \"g++\""
+fi
+
+make_exe=`which make`
+if [ -z "$make_exe" ]; then
+ echo "ERROR: \"make\" program was not found."
+ echo "ERROR: Please install \"make\""
+fi
+
+## ===============
+## == Verify Qt ==
+## ===============
+
+read -p "Do you want to use Qt4.8? [y/N] " -n 1 -r
+echo
+if [[ $REPLY =~ ^[Yy]$ ]]; then
+ cont=true
+ qmake_exe=`which qmake`
+ while [ $cont == true ]; do
+ if [ -z "$qmake_exe" ]; then
+ read -e -p "Please provide a valid location for qmake: " tmp
+ eval tmp=$tmp
+ qmake_exe=`readlink -f $tmp`
+ fi
+ read -p "I am going to use \"$qmake_exe\" as the entry tool for Qt. Is this ok? [y/N] " -n 1 -r
+ echo
+ if [[ $REPLY =~ ^[Nn]$ ]]; then
+ qmake_exe=""
+ else
+ cont=false
+ fi
+ done
+ qt_version=`$qmake_exe -v | grep Using\ Qt\ version | sed 's/Using\ Qt\ version\ //g'`
+ if version_gt $qt_min_version $qt_version; then
+ echo "FATAL ERROR: your Qt version is $qt_version, but needed version should be at least $qt_min_version"
+ fi
+fi
+
+## ==================
+## == Verify cmake ==
+## ==================
+
+cmake_qt_options="--no-qt-gui"
+if [ -x "$qmake_exe" ]; then
+ cmake_qt_options="--qt-gui --qt-qmake=$qmake_exe"
+fi
+
+cont=true
+cmake_exe=`which cmake`
+while [ $cont == true ]; do
+ if [ -z "$cmake_exe" ]; then
+ read -e -p "Please provide a valid location for cmake: " tmp
+ eval tmp=$tmp
+ cmake_exe=`readlink -f $tmp`
+ fi
+ read -p "I am going to use \"$cmake_exe\". Is this ok? [y/N] " -n 1 -r
+ echo
+ if [[ $REPLY =~ ^[Nn]$ ]]; then
+ cmake_exe=""
+ else
+ cont=false
+ fi
+done
+if [ -z $cmake_exe ]; then
+ echo "FATAL ERROR: cmake is really needed to build cpPlugins."
+ exit 1
+fi
+
+cmake_mime=`file -bzk --mime-type $cmake_exe`
+if [ "$cmake_mime" != "application/x-executable" ]; then
+ echo "WARNING: I will try to compile cmake..."
+ if [[ -f $cmake_exe ]]; then
+ if [ "$cmake_mime" == "application/x-tar" ]; then
+ sub_mime=`file -b --mime-type $cmake_exe`
+ if [ $sub_mime == "application/gzip" ]; then
+ cmake_source_dir=`dirname $cmake_exe`/`basename $cmake_exe .tar.gz`
+ cmake_binary_dir=`dirname $cmake_exe`/`basename $cmake_exe .tar.gz`-build
+ echo -n "==> Extracting cmake sources... "
+ rm -rf $cmake_source_dir $cmake_binary_dir
+ mkdir -p $cmake_source_dir $cmake_binary_dir
+ tar xzf $cmake_exe -C $cmake_source_dir --strip-components=1
+ echo "done."
+ fi
+ fi
+ elif [[ -d $cmake_exe ]]; then
+ cmake_source_dir="$cmake_exe"
+ cmake_binary_dir="$cmake_exe"-build
+ else
+ echo "FATAL ERROR: $cmake_exe is not a valid file/directory"
+ exit 1
+ fi
+
+ read -e -p "==> Please provide instalation location for \"cmake\": " tmp
+ eval tmp=$tmp
+ cmake_prefix=`readlink -f $tmp`
+
+ echo "==> Configuring sources... "
+ cd $cmake_binary_dir
+ $cmake_source_dir/bootstrap --prefix=$cmake_prefix $cmake_qt_options
+ echo "==> Configuring sources... done."
+
+ echo "==> Compiling sources..."
+ cd $cmake_binary_dir
+ make -j$number_of_threads
+ echo "==> Compiling sources... done."
+
+ echo "==> Installing package..."
+ cd $cmake_binary_dir
+ make -j install
+ echo "==> Installing package... done."
+ cmake_exe=$cmake_binary_dir/bin/cmake
+fi
+cmake_version=`$cmake_exe --version | grep version | sed 's/cmake\ version\ //g'`
+
+if version_gt $cmake_min_version $cmake_version; then
+ echo "FATAL ERROR: your cmake version is $cmake_version, but needed version should be at least $cmake_min_version"
+fi
+
+## ===============
+## == Build VTK ==
+## ===============
+
+cont=true
+vtk_sources=""
+while [ $cont == true ]; do
+ if [ -z "$vtk_sources" ]; then
+ read -e -p "Please provide a valid location for VTK: " tmp
+ eval tmp=$tmp
+ vtk_sources=`readlink -f $tmp`
+ fi
+ read -p "I am going to use \"$vtk_sources\". Is this ok? [y/N] " -n 1 -r
+ echo
+ if [[ $REPLY =~ ^[Nn]$ ]]; then
+ vtk_sources=""
+ else
+ cont=false
+ fi
+done
+if [ -z $vtk_sources ]; then
+ echo "FATAL ERROR: VTK is really needed to build cpPlugins."
+ exit 1
+fi
+
+echo "Now, I will try to compile VTK..."
+vtk_mime=`file -bzk --mime-type $vtk_sources`
+if [[ -f $vtk_sources ]]; then
+ if [ "$vtk_mime" == "application/x-tar" ]; then
+ sub_mime=`file -b --mime-type $vtk_sources`
+ if [ $sub_mime == "application/gzip" ]; then
+ vtk_source_dir=`dirname $vtk_sources`/`basename $vtk_sources .tar.gz`
+ vtk_binary_dir=`dirname $vtk_sources`/`basename $vtk_sources .tar.gz`-build
+ echo -n "==> Extracting VTK sources... "
+ rm -rf $vtk_source_dir $vtk_binary_dir
+ mkdir -p $vtk_source_dir $vtk_binary_dir
+ tar xzf $vtk_sources -C $vtk_source_dir --strip-components=1
+ echo "done."
+ fi
+ fi
+elif [[ -d $vtk_sources ]]; then
+ vtk_source_dir="$vtk_sources"
+ vtk_binary_dir="$vtk_sources"-build
+else
+ echo "FATAL ERROR: $vtk_sources is not a valid file/directory"
+ exit 1
+fi
+
+read -e -p "==> Please provide instalation location for \"VTK\": " tmp
+eval tmp=$tmp
+vtk_prefix=`readlink -f $tmp`
+
+vtk_build_type=MinSizeRel
+
+echo "==> Configuring sources... "
+cd $vtk_binary_dir
+if [ -x "$qmake_exe" ]; then
+ $cmake_exe \
+ -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
+ -DBUILD_DOCUMENTATION:BOOL=OFF \
+ -DBUILD_EXAMPLES:BOOL=OFF \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -DBUILD_TESTING:BOOL=OFF \
+ -DQT_QMAKE_EXECUTABLE:PATH=$qmake_exe \
+ -DCMAKE_BUILD_TYPE:STRING=$vtk_build_type \
+ -DModule_vtkGUISupportQt:BOOL=ON \
+ -DModule_vtkGUISupportQtOpenGL:BOOL=ON \
+ -DModule_vtkGUISupportQtSQL:BOOL=OFF \
+ -DModule_vtkGUISupportQtWebkit:BOOL=OFF \
+ -DCMAKE_INSTALL_PREFIX:PATH=$vtk_prefix \
+ $vtk_source_dir
+else
+ $cmake_exe \
+ -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
+ -DBUILD_DOCUMENTATION:BOOL=OFF \
+ -DBUILD_EXAMPLES:BOOL=OFF \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -DBUILD_TESTING:BOOL=OFF \
+ -DCMAKE_BUILD_TYPE:STRING=$build_type \
+ -DCMAKE_INSTALL_PREFIX:PATH=$vtk_prefix \
+ $vtk_source_dir
+fi
+echo "==> Configuring sources... done."
+
+echo "==> Compiling sources..."
+cd $vtk_binary_dir
+make -j$number_of_threads
+echo "==> Compiling sources... done."
+
+echo "==> Installing package..."
+cd $vtk_binary_dir
+make -j install
+echo "==> Installing package... done."
+
+## ===============
+## == Build ITK ==
+## ===============
+
+cont=true
+itk_sources=""
+while [ $cont == true ]; do
+ if [ -z "$itk_sources" ]; then
+ read -e -p "Please provide a valid location for ITK: " tmp
+ eval tmp=$tmp
+ itk_sources=`readlink -f $tmp`
+ fi
+ read -p "I am going to use \"$itk_sources\". Is this ok? [y/N] " -n 1 -r
+ echo
+ if [[ $REPLY =~ ^[Nn]$ ]]; then
+ itk_sources=""
+ else
+ cont=false
+ fi
+done
+if [ -z $itk_sources ]; then
+ echo "FATAL ERROR: ITK is really needed to build cpPlugins."
+ exit 1
+fi
+
+echo "Now, I will try to compile ITK..."
+itk_mime=`file -bzk --mime-type $itk_sources`
+if [[ -f $itk_sources ]]; then
+ if [ "$itk_mime" == "application/x-tar" ]; then
+ sub_mime=`file -b --mime-type $itk_sources`
+ if [ $sub_mime == "application/gzip" ]; then
+ itk_source_dir=`dirname $itk_sources`/`basename $itk_sources .tar.gz`
+ itk_binary_dir=`dirname $itk_sources`/`basename $itk_sources .tar.gz`-build
+ echo -n "==> Extracting ITK sources... "
+ rm -rf $itk_source_dir $itk_binary_dir
+ mkdir -p $itk_source_dir $itk_binary_dir
+ tar xzf $itk_sources -C $itk_source_dir --strip-components=1
+ echo "done."
+ fi
+ fi
+elif [[ -d $itk_sources ]]; then
+ itk_source_dir="$itk_sources"
+ itk_binary_dir="$itk_sources"-build
+else
+ echo "FATAL ERROR: $itk_sources is not a valid file/directory"
+ exit 1
+fi
+
+read -e -p "==> Please provide instalation location for \"ITK\": " tmp
+eval tmp=$tmp
+itk_prefix=`readlink -f $tmp`
+
+itk_build_type=MinSizeRel
+
+echo "==> Configuring sources... "
+cd $itk_binary_dir
+$cmake_exe \
+ -DCMAKE_CXX_FLAGS:STRING=-std=c++11 \
+ -DBUILD_DOCUMENTATION:BOOL=OFF \
+ -DBUILD_EXAMPLES:BOOL=OFF \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -DBUILD_TESTING:BOOL=OFF \
+ -DCMAKE_BUILD_TYPE:STRING=$itk_build_type \
+ -DModule_ITKReview:BOOL=ON \
+ -DModule_ITKVtkGlue:BOOL=OFF \
+ -DModule_ParabolicMorphology:BOOL=ON \
+ -DCMAKE_INSTALL_PREFIX:PATH=$itk_prefix \
+ $itk_source_dir
+echo "==> Configuring sources... done."
+
+echo "==> Compiling sources..."
+cd $itk_binary_dir
+make -j$number_of_threads
+echo "==> Compiling sources... done."
+
+echo "==> Installing package..."
+cd $itk_binary_dir
+make -j install
+echo "==> Installing package... done."
+
+## eof - $RCSfile$
#ifndef __cpExtensions__Algorithms__SkeletonWriter__hxx__
#define __cpExtensions__Algorithms__SkeletonWriter__hxx__
+#include <fstream>
+
// -------------------------------------------------------------------------
template< class _TSkeleton >
const _TSkeleton* cpExtensions::Algorithms::SkeletonWriter< _TSkeleton >::
GenerateData( )
{
const TSkeleton* sk = this->GetInput( );
- std::stringstream out;
- out << TSkeleton::Dimension << std::endl;
-
- // Write
auto mIt = sk->BeginEdgesRows( );
+ auto rIt = mIt->second.begin( );
+ auto eIt = rIt->second.begin( );
+ auto path = *eIt;
+
+ // Write base information
+ std::stringstream out1, out2;
+ out1 << TSkeleton::Dimension << std::endl;
+ auto spa = path->GetSpacing( );
+ for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
+ out1 << spa[ d ] << " ";
+ out1 << std::endl;
+ auto dir = path->GetDirection( );
+ for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
+ for( unsigned int e = 0; e < TSkeleton::Dimension; ++e )
+ out1 << dir[ d ][ e ] << " ";
+ out1 << std::endl;
+ auto ori = path->GetOrigin( );
+ for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
+ out1 << ori[ d ] << " ";
+ out1 << std::endl;
+
+ // End points
+ auto end_points = sk->GetEndPoints( );
+ out1 << end_points.size( ) << std::endl;
+ for( auto point : end_points )
+ {
+ for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
+ out1 << point[ d ] << " ";
+ out1 << std::endl;
+
+ } // rof
+
+ // Bifurcations
+ auto bifurcations = sk->GetBifurcations( );
+ out1 << bifurcations.size( ) << std::endl;
+ for( auto point : bifurcations )
+ {
+ for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
+ out1 << point[ d ] << " ";
+ out1 << std::endl;
+
+ } // rof
+
+ // Write paths
+ unsigned long pathCount = 0;
+ mIt = sk->BeginEdgesRows( );
for( ; mIt != sk->EndEdgesRows( ); ++mIt )
{
auto rIt = mIt->second.begin( );
for( ; eIt != rIt->second.end( ); ++eIt )
{
auto path = *eIt;
+ pathCount++;
unsigned int size = path->GetSize( );
- auto spa = path->GetSpacing( );
- auto ori = path->GetOrigin( );
- auto dir = path->GetDirection( );
- out << size << std::endl;
- for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
- out << spa[ d ] << " ";
- out << std::endl;
- for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
- out << ori[ d ] << " ";
- out << std::endl;
- for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
- for( unsigned int e = 0; e < TSkeleton::Dimension; ++e )
- out << dir[ d ][ e ] << " ";
- out << std::endl;
-
+ out2 << size << std::endl;
for( unsigned int i = 0; i < path->GetSize( ); ++i )
{
auto v = path->GetVertex( i );
for( unsigned int d = 0; d < TSkeleton::Dimension; ++d )
- out << v[ d ] << " ";
+ out2 << v[ d ] << " ";
} // rof
- out << std::endl;
+ out2 << std::endl;
} // rof
} // rof
} // rof
- out << "0" << std::endl;
-
- /* TODO
- if( !( cpExtensions::Write( out.str( ), this->m_FileName ) ) )
- itkExceptionMacro(
- << "Unable to write skeleton to \""
- << this->m_FileName
- << "\""
- );
- */
+ out1 << pathCount << std::endl << out2.str( );
+
+ // Real write
+ std::ofstream file_stream( this->m_FileName.c_str( ), std::ofstream::binary );
+ if( !file_stream )
+ itkExceptionMacro(
+ << "Unable to write skeleton to \""
+ << this->m_FileName
+ << "\""
+ );
+ file_stream.write( out1.str( ).c_str( ), out1.str( ).size( ) );
}
#endif // __cpExtensions__Algorithms__SkeletonWriter__hxx__
#include <cpExtensions/DataStructures/Graph.h>
#include <cpExtensions/DataStructures/PolyLineParametricPath.h>
+#include <vector>
namespace cpExtensions
{
void AddBranch( TPath* path );
const TPath* GetBranch( const TIndex& a, const TIndex& b ) const;
+ std::vector< TIndex > GetEndPoints( ) const;
+ std::vector< TIndex > GetBifurcations( ) const;
+
protected:
Skeleton( );
virtual ~Skeleton( );
return( null_path );
}
+// -------------------------------------------------------------------------
+template< unsigned int _VDim >
+std::vector< typename cpExtensions::DataStructures::Skeleton< _VDim >::TIndex >
+cpExtensions::DataStructures::Skeleton< _VDim >::
+GetEndPoints( ) const
+{
+ std::vector< TIndex > res;
+ auto mIt = this->BeginEdgesRows( );
+ for( ; mIt != this->EndEdgesRows( ); ++mIt )
+ {
+ unsigned long count = mIt->second.size( );
+ if( count == 1 )
+ res.push_back( mIt->first );
+
+ } // rof
+ return( res );
+}
+
+// -------------------------------------------------------------------------
+template< unsigned int _VDim >
+std::vector< typename cpExtensions::DataStructures::Skeleton< _VDim >::TIndex >
+cpExtensions::DataStructures::Skeleton< _VDim >::
+GetBifurcations( ) const
+{
+ std::vector< TIndex > res;
+ auto mIt = this->BeginEdgesRows( );
+ for( ; mIt != this->EndEdgesRows( ); ++mIt )
+ {
+ unsigned long count = mIt->second.size( );
+ if( count > 1 )
+ res.push_back( mIt->first );
+
+ } // rof
+ return( res );
+}
+
// -------------------------------------------------------------------------
template< unsigned int _VDim >
cpExtensions::DataStructures::Skeleton< _VDim >::
cpPlugins_Compatibility_Macro;
public:
- virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
- virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
+ virtual void SetITK( itk::LightObject* o ) override;
+ virtual void SetVTK( vtkObjectBase* o ) override;
protected:
Image( );
virtual ~Image( );
- virtual void _UpdateITK( ) const cpPlugins_OVERRIDE;
- virtual void _UpdateVTK( ) const cpPlugins_OVERRIDE;
+ virtual void _UpdateITK( ) const override;
+ virtual void _UpdateVTK( ) const override;
template< class _TImage >
inline void _ITK_2_VTK_0( _TImage* image ) const;
cpPlugins_Compatibility_Macro;
public:
- virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
- virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
+ virtual void SetITK( itk::LightObject* o ) override;
+ virtual void SetVTK( vtkObjectBase* o ) override;
protected:
Mesh( );
cpPlugins_Compatibility_Macro;
public:
- virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
- virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
+ virtual void SetITK( itk::LightObject* o ) override;
+ virtual void SetVTK( vtkObjectBase* o ) override;
protected:
PolyLineParametricPath( );
cpPlugins_Compatibility_Macro;
public:
- virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
+ virtual void SetVTK( vtkObjectBase* o ) override;
protected:
Simple3DCurve( );
virtual ~Simple3DCurve( );
- virtual void _UpdateVTK( ) const cpPlugins_OVERRIDE;
+ virtual void _UpdateVTK( ) const override;
template< class _TCurve >
inline void _ITK_2_VTK( _TCurve* curve ) const;
cpPlugins_Compatibility_Macro;
public:
- virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
- virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
+ virtual void SetITK( itk::LightObject* o ) override;
+ virtual void SetVTK( vtkObjectBase* o ) override;
protected:
Skeleton( );
* Language related macros
* =========================================================================
*/
-#if __cplusplus >= 201103L
-# define cpPlugins_OVERRIDE override
-# define cpPlugins_DELETE_FUNCTION =delete
-# define cpPlugins_NULLPTR nullptr
-# define cpPlugins_NOEXCEPT noexcept
-# define cpPlugins_HAS_CXX11_STATIC_ASSERT
-# define cpPlugins_HAS_CXX11_RVREF
-#else // __cplusplus >= 201103L
-# define cpPlugins_OVERRIDE
-# define cpPlugins_DELETE_FUNCTION
-# define cpPlugins_NULLPTR NULL
-# define cpPlugins_NOEXCEPT throw()
-#endif // __cplusplus >= 201103L
+/* TODO
+ #if __cplusplus >= 201103L
+ # define override override
+ # define cpPlugins_DELETE_FUNCTION =delete
+ # define cpPlugins_NULLPTR nullptr
+ # define cpPlugins_NOEXCEPT noexcept
+ # define cpPlugins_HAS_CXX11_STATIC_ASSERT
+ # define cpPlugins_HAS_CXX11_RVREF
+ #else // __cplusplus >= 201103L
+ # define override
+ # define cpPlugins_DELETE_FUNCTION
+ # define cpPlugins_NULLPTR NULL
+ # define cpPlugins_NOEXCEPT throw()
+ #endif // __cplusplus >= 201103L
+*/
/*
* =========================================================================
#define cpPlugins_Id_Macro( _class, _category ) \
public: \
- virtual const char* GetClassName( ) const cpPlugins_OVERRIDE \
+ virtual const char* GetClassName( ) const override \
{ return( #_class ); } \
- virtual const char* GetClassCategory( ) const cpPlugins_OVERRIDE \
+ virtual const char* GetClassCategory( ) const override \
{ return( #_category ); }
#define cpPluginsObject( _cls, _scls, _cat ) \
itkNewMacro( Self ); \
itkTypeMacro( _cls, _scls ); \
public: \
- virtual const char* GetClassName( ) const cpPlugins_OVERRIDE \
+ virtual const char* GetClassName( ) const override \
{ return( #_cls ); } \
- virtual const char* GetClassCategory( ) const cpPlugins_OVERRIDE \
+ virtual const char* GetClassCategory( ) const override \
{ return( #_cat ); } \
protected: \
_cls( ); \
virtual ~_cls( ); \
- virtual void _GenerateData( ) cpPlugins_OVERRIDE; \
+ virtual void _GenerateData( ) override; \
private: \
_cls( const Self& ); \
Self& operator=( const Self& )
#define cpPlugins_Compatibility_Macro \
virtual bool IsCompatible( \
const DataObject* other \
- ) const cpPlugins_OVERRIDE \
+ ) const override \
{ \
return( dynamic_cast< const Self* >( other ) != NULL ); \
}
typedef void ( *TCreatorFunc )( itk::LightObject::Pointer& ptr, const std::string& c, const std::string& f );
typedef std::tuple< void*, TContentsFunc, TCreatorFunc > THandlers;
typedef std::map< std::string, THandlers > TLibraries;
- typedef std::map< std::string, std::map< std::string, std::string > >
- TFiltersToLibrariesReferences;
+ typedef std::map< std::string, std::map< std::string, std::string > > TFiltersToLibrariesReferences;
public:
Loader( );
const float& GetViewY( ) const;
void SetViewCoords( float x, float y );
- virtual void Modified( ) const cpPlugins_OVERRIDE;
+ virtual void Modified( ) const override;
virtual void SetITK( itk::LightObject* o );
virtual void SetVTK( vtkObjectBase* o );
SingleDataPort( bool required = true );
virtual ~SingleDataPort( );
- virtual void Add( DataObject* o ) cpPlugins_OVERRIDE;
- virtual DataObject* Get( unsigned int i = 0 ) cpPlugins_OVERRIDE;
- virtual const DataObject* Get( unsigned int i = 0 ) const cpPlugins_OVERRIDE;
- virtual unsigned int Size( ) const cpPlugins_OVERRIDE;
- virtual bool IsValid( ) const cpPlugins_OVERRIDE;
- virtual void Clear( ) cpPlugins_OVERRIDE;
+ virtual void Add( DataObject* o ) override;
+ virtual DataObject* Get( unsigned int i = 0 ) override;
+ virtual const DataObject* Get( unsigned int i = 0 ) const override;
+ virtual unsigned int Size( ) const override;
+ virtual bool IsValid( ) const override;
+ virtual void Clear( ) override;
protected:
DataObject::Pointer m_Data;
MultipleInputsPort( bool required = true );
virtual ~MultipleInputsPort( );
- virtual void Add( DataObject* o ) cpPlugins_OVERRIDE;
- virtual DataObject* Get( unsigned int i = 0 ) cpPlugins_OVERRIDE;
- virtual const DataObject* Get( unsigned int i = 0 ) const cpPlugins_OVERRIDE;
- virtual unsigned int Size( ) const cpPlugins_OVERRIDE;
- virtual bool IsValid( ) const cpPlugins_OVERRIDE;
- virtual void Clear( ) cpPlugins_OVERRIDE;
+ virtual void Add( DataObject* o ) override;
+ virtual DataObject* Get( unsigned int i = 0 ) override;
+ virtual const DataObject* Get( unsigned int i = 0 ) const override;
+ virtual unsigned int Size( ) const override;
+ virtual bool IsValid( ) const override;
+ virtual void Clear( ) override;
void Delete( unsigned int id );
void Disconnect( );
// Pipeline execution
- virtual void Modified( ) const cpPlugins_OVERRIDE;
+ virtual void Modified( ) const override;
virtual void Update( );
// Qt dialog creation
cpPlugins_Id_Macro( Widget, Object );
public:
- virtual void AddInteractor( vtkRenderWindowInteractor* i ) cpPlugins_OVERRIDE;
- virtual bool IsInteractive( ) cpPlugins_OVERRIDE;
+ virtual void AddInteractor( vtkRenderWindowInteractor* i ) override;
+ virtual bool IsInteractive( ) override;
virtual void EnabledOn( );
virtual void EnabledOff( );
public:
virtual void AddInput(
const std::string& n, cpPlugins::Pipeline::DataObject* o
- ) cpPlugins_OVERRIDE;
+ ) override;
virtual void SetInput(
const std::string& n, cpPlugins::Pipeline::DataObject* o
- ) cpPlugins_OVERRIDE;
+ ) override;
};
} // ecapseman
cpPluginsObject( ImageJSkeletonWriter, cpPlugins::BaseObjects::ProcessObject, IO );
public:
- virtual QDialog* CreateQDialog( ) cpPlugins_OVERRIDE;
+ virtual QDialog* CreateQDialog( ) override;
protected:
template< class _TSkeleton >
cpPluginsObject( DicomSeriesReader, ImageReader, IO );
public:
- virtual QDialog* CreateQDialog( ) cpPlugins_OVERRIDE;
+ virtual QDialog* CreateQDialog( ) override;
};
} // ecapseman
cpPluginsObject( ImageReader, cpPlugins::Pipeline::ProcessObject, IO );
public:
- virtual QDialog* CreateQDialog( ) cpPlugins_OVERRIDE;
+ virtual QDialog* CreateQDialog( ) override;
protected:
template< unsigned int _Dim >
cpPluginsObject( ImageWriter, cpPlugins::Pipeline::ProcessObject, IO );
public:
- virtual QDialog* CreateQDialog( ) cpPlugins_OVERRIDE;
+ virtual QDialog* CreateQDialog( ) override;
protected:
template< class _TImage >
virtual void CreateInterpolator(
itk::LightObject* image,
const std::string& precision_type
- ) cpPlugins_OVERRIDE;
+ ) override;
protected:
template< class _TImage >
cpPlugins_Id_Macro( InterpolateImageFunction, ImageInterpolators );
public:
- virtual void SetITK( itk::LightObject* o ) cpPlugins_OVERRIDE;
- virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
+ virtual void SetITK( itk::LightObject* o ) override;
+ virtual void SetVTK( vtkObjectBase* o ) override;
protected:
InterpolateImageFunction( );
) = 0;
protected:
- virtual void _GenerateData( ) cpPlugins_OVERRIDE;
+ virtual void _GenerateData( ) override;
private:
// Purposely not implemented.
virtual void CreateInterpolator(
itk::LightObject* image,
const std::string& precision_type
- ) cpPlugins_OVERRIDE;
+ ) override;
protected:
template< class _TImage >
cpPluginsObject( MeshReader, cpPlugins::Pipeline::ProcessObject, IO );
public:
- virtual QDialog* CreateQDialog( ) cpPlugins_OVERRIDE;
+ virtual QDialog* CreateQDialog( ) override;
};
} // ecapseman
cpPluginsObject( MeshWriter, cpPlugins::Pipeline::ProcessObject, IO );
public:
- virtual QDialog* CreateQDialog( ) cpPlugins_OVERRIDE;
+ virtual QDialog* CreateQDialog( ) override;
};
} // ecapseman
cpPluginsObject( LineWidget, cpPlugins::Pipeline::Widget, Widgets );
public:
- virtual void Clear( ) cpPlugins_OVERRIDE;
- virtual void SetEnabled( bool v ) cpPlugins_OVERRIDE;
- virtual bool GetEnabled( ) const cpPlugins_OVERRIDE;
+ virtual void Clear( ) override;
+ virtual void SetEnabled( bool v ) override;
+ virtual bool GetEnabled( ) const override;
protected:
typedef std::set< vtkProp* > TProps;
typedef cpExtensions::Visualization::WindowLevelImageActor TImageActor;
public:
- virtual void Clear( ) cpPlugins_OVERRIDE;
- virtual void SetEnabled( bool v ) cpPlugins_OVERRIDE;
- virtual bool GetEnabled( ) const cpPlugins_OVERRIDE;
+ virtual void Clear( ) override;
+ virtual void SetEnabled( bool v ) override;
+ virtual bool GetEnabled( ) const override;
protected:
/**
static TCallback* New( );
virtual void Execute(
vtkObject* caller, unsigned long id, void* data
- ) cpPlugins_OVERRIDE;
+ ) override;
void SetSeeds( vtkPolyData* seeds );
protected:
cpPluginsObject( SplineWidget, cpPlugins::Pipeline::Widget, Widgets );
public:
- virtual void Clear( ) cpPlugins_OVERRIDE;
- virtual void SetEnabled( bool v ) cpPlugins_OVERRIDE;
- virtual bool GetEnabled( ) const cpPlugins_OVERRIDE;
+ virtual void Clear( ) override;
+ virtual void SetEnabled( bool v ) override;
+ virtual bool GetEnabled( ) const override;
protected:
bool m_Configured;
);
public:
- virtual QDialog* CreateQDialog( ) cpPlugins_OVERRIDE;
+ virtual QDialog* CreateQDialog( ) override;
protected:
template< class _TPolyLineParametricPath >
);
public:
- virtual QDialog* CreateQDialog( ) cpPlugins_OVERRIDE;
+ virtual QDialog* CreateQDialog( ) override;
protected:
template< unsigned int _VDim >
);
public:
- virtual QDialog* CreateQDialog( ) cpPlugins_OVERRIDE;
+ virtual QDialog* CreateQDialog( ) override;
protected:
template< class _TSkeleton >