header #define ITK_MANUAL_INSTANTIATION
+header #include <vnl/vnl_complex_traits.h>
+header VCL_DEFINE_SPECIALIZATION struct vnl_complex_traits< bool >
+header {
+header enum { isreal = true };
+header static bool conjugate( bool x ) { return( x ); }
+header static std::complex< bool > complexify( bool x ) { return( std::complex< bool >( x, false ) ); }
+header };
+tinclude itkArray2D:h|hxx
tinclude itkArray:h|hxx
tinclude itkFixedArray:h|hxx
tinclude itk#color_pixels#:h|hxx
tinclude itk#diff_tensors#:h|hxx
tinclude itkSymmetricEigenAnalysis:h|hxx
tinclude itkSimpleDataObjectDecorator:h|hxx
+tinclude itkVariableLengthVector:h|hxx
tinclude vnl/vnl_vector:h|hxx
+tinclude vnl/vnl_matrix:h|hxx
cinclude vnl/vnl_c_vector.hxx
instances vnl_vector< bool >
+instances vnl_matrix< bool >
+instances itk::Array2D< #scalar_pixels# >
instances itk::Array< #scalar_pixels# >
instances itk::FixedArray< #scalar_pixels#, #process_dims# >
instances itk::FixedArray< #scalar_pixels#, 8 >
instances itk::SymmetricEigenAnalysis< itk::Matrix< #real_types#, #process_dims#, #process_dims# >, itk::FixedArray< #real_types#, #process_dims# >, itk::Matrix< #real_types#, #process_dims#, #process_dims# > >
instances itk::SimpleDataObjectDecorator< #scalar_pixels# >
+instances itk::VariableLengthVector< #scalar_pixels# >
define my_vectors=FixedArray;Vector;Point
ImageNeighborhoodIterators
ImageFiltersBases
ImageComplexFilters
+ ImageInterpolators
BoundingBoxes
Meshes
Paths
+ Transforms
)
SET(_all_libs)
TARGET_LINK_LIBRARIES(cpInstances_ImageNeighborhoodIterators cpInstances_SimpleImages)
TARGET_LINK_LIBRARIES(cpInstances_ImageFiltersBases cpInstances_SimpleImages)
TARGET_LINK_LIBRARIES(cpInstances_ImageComplexFilters cpInstances_ImageFiltersBases cpInstances_ImageIterators)
+TARGET_LINK_LIBRARIES(cpInstances_ImageInterpolators cpInstances_BaseObjects)
TARGET_LINK_LIBRARIES(cpInstances_BoundingBoxes cpInstances_BaseObjects)
TARGET_LINK_LIBRARIES(cpInstances_Meshes cpInstances_BoundingBoxes)
TARGET_LINK_LIBRARIES(cpInstances_Paths cpInstances_BaseObjects ${VTK_LIBRARIES})
+TARGET_LINK_LIBRARIES(cpInstances_Transforms cpInstances_BaseObjects)
## eof - $RCSfilfe$
tinclude itkInPlaceImageFilter:h|hxx
tinclude itkRecursiveSeparableImageFilter:h|hxx
+instances itk::ImageToImageFilter< itk::Image< #scalar_pixels#, 3 >, itk::Image< #scalar_pixels#, 2 > >
+instances itk::ImageToImageFilter< itk::Image< #scalar_pixels#, 2 >, itk::Image< #scalar_pixels#, 3 > >
+instances itk::InPlaceImageFilter< itk::Image< #scalar_pixels#, 3 >, itk::Image< #scalar_pixels#, 2 > >
+instances itk::InPlaceImageFilter< itk::Image< #scalar_pixels#, 2 >, itk::Image< #scalar_pixels#, 3 > >
+
instances itk::ImageToImageFilter< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< itk::CovariantVector< #real_types#, #process_dims# >, #process_dims# > >
instances itk::ImageToImageFilter< itk::Image< itk::CovariantVector< #real_types#, #process_dims# >, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# > >
instances itk::RecursiveSeparableImageFilter< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #real_types#, #process_dims# > >
--- /dev/null
+header #define ITK_MANUAL_INSTANTIATION
+
+define i_real=#real_types#
+define o_real=#real_types#
+
+tinclude itkImageFunction:h|hxx
+tinclude itkLinearInterpolateImageFunction:h|hxx
+
+cinclude itkImage.h
+
+instances itk::ImageFunction< itk::Image< #scalar_pixels#, #process_dims# >, #i_real#, #o_real# >
+instances itk::LinearInterpolateImageFunction< itk::Image< #scalar_pixels#, #process_dims# >, #real_types# >
+
+** eof - $RCSfile$
--- /dev/null
+header #define ITK_MANUAL_INSTANTIATION
+
+define tr=AffineTransform
+
+tinclude itkOptimizerParameters:h|hxx
+tinclude itkTransform:h|hxx
+tinclude itkMatrixOffsetTransformBase:h|hxx
+tinclude itk#tr#:h|hxx
+tinclude itkDataObjectDecorator:h|hxx
+
+instances itk::OptimizerParameters< #real_types# >
+instances itk::MatrixOffsetTransformBase< #real_types#, #process_dims#, #process_dims# >
+instances itk::Transform< #real_types#, #process_dims#, #process_dims# >
+instances itk::#tr#< #real_types#, #process_dims# >
+instances itk::DataObjectDecorator< itk::Transform< #real_types#, #process_dims#, #process_dims# > >
+instances itk::DataObjectDecorator< itk::#tr#< #real_types#, #process_dims# > >
+
+** eof - $RCSfile$
#ifndef __cpExtensions__Algorithms__CPRImageFilter__h__
#define __cpExtensions__Algorithms__CPRImageFilter__h__
+#include <vector>
#include <itkImageToImageFilter.h>
+#include <itkJoinSeriesImageFilter.h>
#include <cpExtensions/Algorithms/IsoImageSlicer.h>
namespace cpExtensions
typedef _TCurve TCurve;
typedef typename TCurve::TScalar TScalar;
- typedef IsoImageSlicer< TImage, TScalar > TSlicer;
+ typedef IsoImageSlicer< TImage, TScalar > TSlicer;
typedef typename TSlicer::TInterpolateFunction TInterpolateFunction;
+ typedef typename TSlicer::TSliceImage TSliceImage;
+
+ typedef itk::JoinSeriesImageFilter< TSliceImage, TImage > TJoinFilter;
public:
itkNewMacro( Self );
protected:
double m_SliceRadius;
typename TInterpolateFunction::Pointer m_Interpolator;
+
+ std::vector< typename TSlicer::Pointer > m_Slicers;
+ typename TJoinFilter::Pointer m_Join;
};
} // ecapseman
#ifndef __cpExtensions__Algorithms__CPRImageFilter__hxx__
#define __cpExtensions__Algorithms__CPRImageFilter__hxx__
-#include <itkImageRegionIterator.h>
-#include <itkImageSliceIteratorWithIndex.h>
#include <itkMinimumMaximumImageCalculator.h>
// -------------------------------------------------------------------------
void cpExtensions::Algorithms::CPRImageFilter< _TImage, _TCurve >::
GenerateData( )
{
- typedef itk::MinimumMaximumImageCalculator< _TImage > _TMinMax;
- typedef itk::ImageSliceIteratorWithIndex< _TImage > _T3DIt;
- typedef itk::ImageRegionIterator< typename TSlicer::TSliceImage > _T2DIt;
+ typedef itk::MinimumMaximumImageCalculator< _TImage > _TMinMax;
auto input = this->GetInput( );
auto curve = this->GetCurve( );
minmax->SetImage( input );
minmax->Compute( );
- // Prepare slicer
- typename TSlicer::Pointer slicer = TSlicer::New( );
- slicer->SetInput( input );
- slicer->SetDefaultValue( minmax->GetMinimum( ) );
- slicer->SpacingFromMinimumOn( );
- if( this->m_Interpolator.IsNotNull( ) )
- slicer->SetInterpolator( this->m_Interpolator );
- slicer->SizeFromMaximumOff( );
- if( this->m_SliceRadius > double( 0 ) )
- {
- slicer->SizeFromMinimumOff( );
- slicer->SetSize( this->m_SliceRadius );
- }
- else
- slicer->SizeFromMinimumOn( );
-
- // Slice image
- _T3DIt oIt( output, output->GetRequestedRegion( ) );
- oIt.SetFirstDirection( 1 );
- oIt.SetSecondDirection( 2 );
- oIt.GoToBegin( );
+ // Main loop
+ this->m_Join = TJoinFilter::New( );
+ this->m_Slicers.clear( );
unsigned long N = curve->GetNumberOfPoints( );
+ double len = 0;
+ typename _TCurve::TPoint p, q;
for( unsigned long n = 0; n < N; ++n )
{
- slicer->SetTranslation( curve->GetPoint( n ) );
+ p = curve->GetPoint( n );
+ if( n > 0 )
+ len += p.EuclideanDistanceTo( q );
+ q = p;
+
+ // Prepare slicer
+ typename TSlicer::Pointer slicer = TSlicer::New( );
+ slicer->SetInput( input );
+ slicer->SetDefaultValue( minmax->GetMinimum( ) );
+ slicer->SpacingFromMinimumOn( );
+ if( this->m_Interpolator.IsNotNull( ) )
+ slicer->SetInterpolator( this->m_Interpolator );
+ slicer->SizeFromMaximumOff( );
+ if( this->m_SliceRadius > double( 0 ) )
+ {
+ slicer->SizeFromMinimumOff( );
+ slicer->SetSize( this->m_SliceRadius );
+ }
+ else
+ slicer->SizeFromMinimumOn( );
+ slicer->SetTranslation( p );
slicer->SetRotation( curve->GetFrame( n ) );
slicer->Update( );
- // Fill output image
- _T2DIt sIt(
- slicer->GetOutput( ), slicer->GetOutput( )->GetRequestedRegion( )
- );
- for( sIt.GoToBegin( ); !sIt.IsAtEnd( ); ++sIt )
- {
- oIt.Set( sIt.Get( ) );
- ++oIt;
- if( oIt.IsAtEndOfLine( ) )
- oIt.NextLine( );
- if( oIt.IsAtEndOfSlice( ) )
- oIt.NextSlice( );
-
- } // rof
+ this->m_Join->SetInput( n, slicer->GetOutput( ) );
+ this->m_Slicers.push_back( slicer );
} // rof
+ this->m_Join->SetSpacing( len / double( N ) );
+ this->m_Join->Update( );
+ this->GetOutput( )->Graft( this->m_Join->GetOutput( ) );
}
#endif // __cpExtensions__Algorithms__CPRImageFilter__hxx__
prev_no[ 1 ] = _TScalar( 1 );
for( unsigned int i = 0; i < N; ++i )
{
+ auto ntg = tg[ i ].GetNorm( );
+ if( double( ntg ) > double( 0 ) )
+ tg[ i ] /= ntg;
+
_TScalar ct = prev_tg * tg[ i ];
TVector a = itk::CrossProduct( prev_tg, tg[ i ] );
_TScalar st = a.GetNorm( );
( prev_no * ct ) +
( itk::CrossProduct( a, prev_no ) * st ) +
( a * ( ( a * prev_no ) * ( _TScalar( 1 ) - ct ) ) );
+ auto nno = no[ i ].GetNorm( );
+ if( double( nno ) > double( 0 ) )
+ no[ i ] /= nno;
+
bn[ i ] = itk::CrossProduct( tg[ i ], no[ i ] );
prev_tg = tg[ i ];
} // rof
this->m_Frames.push_back( m );
-
} // rof
this->m_FramesUpdated = true;
#include <cpExtensions/DataStructures/Simple3DCurve.h>
#include <cpExtensions/Visualization/Simple3DCurveToPolyData.h>
+#include <cpPlugins/DataObjects/Simple3DCurve_Demanglers.h>
+
// -------------------------------------------------------------------------
void cpPlugins::DataObjects::Simple3DCurve::
SetITK( itk::LightObject* o )
{
- typedef cpExtensions::DataStructures::Simple3DCurve< float > _TF;
- typedef cpExtensions::DataStructures::Simple3DCurve< double > _TD;
-
- this->Superclass::SetITK( o );
- auto lf = dynamic_cast< _TF* >( o );
- auto ld = dynamic_cast< _TD* >( o );
- if ( lf != NULL ) this->_ITK_2_VTK( lf );
- else if( ld != NULL ) this->_ITK_2_VTK( ld );
- else
+ cpPlugins_Demangle_Simple3DCurve_All_1( o, _ITK_2_VTK )
{
this->m_VTK = NULL;
this->m_ITKvVTK = NULL;
-
- } // fi
+ }
}
// -------------------------------------------------------------------------
--- /dev/null
+
+All cpExtensions::DataStructures::Simple3DCurve< #real_types# >
+
+** eof - $RCSfile$
cpPluginsImageDistanceMaps
cpPluginsImageThresholdFilters
)
+TARGET_LINK_LIBRARIES(
+ cpPluginsImageSliceFilters
+ cpPluginsImageGenericFilters
+ )
IF(ParabolicMorphology_LOADED)
TARGET_LINK_LIBRARIES(
cpPluginsImageParaMorphologyFilters
if( ct == itk::ImageIOBase::LONG ) success = this->_GD1< long, _Dim >( io );
if( ct == itk::ImageIOBase::ULONG ) success = this->_GD1< ulong, _Dim >( io );
#endif // cpPlugins_CONFIG_INTEGER_TYPES_long
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_float
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< float, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_float
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_double
if( ct == itk::ImageIOBase::DOUBLE ) success = this->_GD1< double, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_double
}
else if( pt == itk::ImageIOBase::RGB )
{
if( ct == itk::ImageIOBase::LONG ) success = this->_GD1< itk::RGBPixel< long >, _Dim >( io );
if( ct == itk::ImageIOBase::ULONG ) success = this->_GD1< itk::RGBPixel< ulong >, _Dim >( io );
# endif // cpPlugins_CONFIG_INTEGER_TYPES_long
-# ifdef cpPlugins_CONFIG_INTEGER_TYPES_float
+# ifdef cpPlugins_CONFIG_REAL_TYPES_float
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::RGBPixel< float >, _Dim >( io );
-# endif // cpPlugins_CONFIG_INTEGER_TYPES_float
-# ifdef cpPlugins_CONFIG_INTEGER_TYPES_double
+# endif // cpPlugins_CONFIG_REAL_TYPES_float
+# ifdef cpPlugins_CONFIG_REAL_TYPES_double
if( ct == itk::ImageIOBase::DOUBLE ) success = this->_GD1< itk::RGBPixel< double >, _Dim >( io );
-# endif // cpPlugins_CONFIG_INTEGER_TYPES_double
+# endif // cpPlugins_CONFIG_REAL_TYPES_double
#endif // cpPlugins_CONFIG_COLOR_PIXELS_RGBPixel
}
else if( pt == itk::ImageIOBase::RGBA )
if( ct == itk::ImageIOBase::LONG ) success = this->_GD1< itk::RGBAPixel< long >, _Dim >( io );
if( ct == itk::ImageIOBase::ULONG ) success = this->_GD1< itk::RGBAPixel< ulong >, _Dim >( io );
# endif // cpPlugins_CONFIG_INTEGER_TYPES_long
-# ifdef cpPlugins_CONFIG_INTEGER_TYPES_float
+# ifdef cpPlugins_CONFIG_REAL_TYPES_float
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::RGBAPixel< float >, _Dim >( io );
-# endif // cpPlugins_CONFIG_INTEGER_TYPES_float
-# ifdef cpPlugins_CONFIG_INTEGER_TYPES_double
+# endif // cpPlugins_CONFIG_REAL_TYPES_float
+# ifdef cpPlugins_CONFIG_REAL_TYPES_double
if( ct == itk::ImageIOBase::DOUBLE ) success = this->_GD1< itk::RGBAPixel< double >, _Dim >( io );
-# endif // cpPlugins_CONFIG_INTEGER_TYPES_double
+# endif // cpPlugins_CONFIG_REAL_TYPES_double
#endif // cpPlugins_CONFIG_COLOR_PIXELS_RGBAPixel
}
else if( pt == itk::ImageIOBase::COMPLEX )
{
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_float
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< std::complex< float >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_float
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_double
if( ct == itk::ImageIOBase::DOUBLE ) success = this->_GD1< std::complex< double >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_double
}
else if( pt == itk::ImageIOBase::COVARIANTVECTOR )
{
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_float
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::CovariantVector< float, _Dim >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_float
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_double
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::CovariantVector< double, _Dim >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_double
}
else if( pt == itk::ImageIOBase::POINT )
{
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_float
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::Point< float, _Dim >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_float
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_double
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::Point< double, _Dim >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_double
}
else if( pt == itk::ImageIOBase::VECTOR )
{
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_float
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::Vector< float, _Dim >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_float
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_double
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::Vector< double, _Dim >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_double
}
else if( pt == itk::ImageIOBase::SYMMETRICSECONDRANKTENSOR )
{
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_float
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::SymmetricSecondRankTensor< float, _Dim >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_float
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_double
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::SymmetricSecondRankTensor< double, _Dim >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_double
}
else if( pt == itk::ImageIOBase::DIFFUSIONTENSOR3D )
{
if( _Dim == 3 )
{
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_float
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::DiffusionTensor3D< float >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_float
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_double
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::DiffusionTensor3D< double >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_double
}
else
this->_Error( "DiffusionTensor3D dimension not supported." );
}
else if( pt == itk::ImageIOBase::MATRIX )
{
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_float
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::Matrix< float, _Dim, _Dim >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_float
-#ifdef cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_double
if( ct == itk::ImageIOBase::FLOAT ) success = this->_GD1< itk::Matrix< double, _Dim, _Dim >, _Dim >( io );
-#endif // cpPlugins_CONFIG_INTEGER_TYPES_double
+#endif // cpPlugins_CONFIG_REAL_TYPES_double
}
else if( pt == itk::ImageIOBase::OFFSET )
{
tinclude itkRegionOfInterestImageFilter:h|hxx
tinclude itkRescaleIntensityImageFilter:h|hxx
tinclude itkMinimumMaximumImageCalculator:h|hxx
+tinclude itkExtractImageFilter:h|hxx
cinclude itk#color_pixels#.h
cinclude itkImageAlgorithm.hxx
cinclude itkUnaryFunctorImageFilter.hxx
+instances itk::ExtractImageFilter< itk::Image< #scalar_pixels#, 3 >, itk::Image< #scalar_pixels#, 2 > >
instances itk::RegionOfInterestImageFilter< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# > >
instances itk::RegionOfInterestImageFilter< itk::Image< itk::#color_pixels#< #scalar_pixels# >, #process_dims# >, itk::Image< itk::#color_pixels#< #scalar_pixels# >, #process_dims# > >
--- /dev/null
+#include <ImageSliceFilters/CPRImageFilter.h>
+#include <cpPlugins/DataObjects/Image.h>
+#include <cpPlugins/DataObjects/Simple3DCurve.h>
+
+#include <cpPlugins/DataObjects/Image_Demanglers.h>
+#include <cpPlugins/DataObjects/Simple3DCurve_Demanglers.h>
+
+#include <itkImage.h>
+#include <cpExtensions/DataStructures/Simple3DCurve.h>
+#include <cpExtensions/Algorithms/CPRImageFilter.h>
+
+// -------------------------------------------------------------------------
+cpPluginsImageSliceFilters::CPRImageFilter::
+CPRImageFilter( )
+ : Superclass( )
+{
+ typedef cpPlugins::DataObjects::Image _TImage;
+ typedef cpPlugins::DataObjects::Simple3DCurve _TCurve;
+ this->_ConfigureInput< _TImage >( "Image", true, false );
+ this->_ConfigureInput< _TCurve >( "Curve", true, false );
+ this->_ConfigureOutput< _TImage >( "Output" );
+
+ this->m_Parameters.ConfigureAsReal( "SliceRadius", 1 );
+}
+
+// -------------------------------------------------------------------------
+cpPluginsImageSliceFilters::CPRImageFilter::
+~CPRImageFilter( )
+{
+}
+
+// -------------------------------------------------------------------------
+void cpPluginsImageSliceFilters::CPRImageFilter::
+_GenerateData( )
+{
+ auto o = this->GetInputData( "Image" );
+ cpPlugins_Demangle_Image_ScalarPixels_1( o, _GD0, 3 )
+ this->_Error( "Invalid input image." );
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+void cpPluginsImageSliceFilters::CPRImageFilter::
+_GD0( _TImage* image )
+{
+ auto o = this->GetInputData( "Curve" );
+ cpPlugins_Demangle_Simple3DCurve_All_2( o, _GD1, image )
+ this->_Error( "Invalid input curve." );
+}
+
+// -------------------------------------------------------------------------
+template< class _TCurve, class _TImage >
+void cpPluginsImageSliceFilters::CPRImageFilter::
+_GD1( _TCurve* curve, _TImage* image )
+{
+ typedef cpExtensions::Algorithms::CPRImageFilter< _TImage, _TCurve > _TFilter;
+
+ auto filter = this->_CreateITK< _TFilter >( );
+ filter->SetInput( image );
+ filter->SetCurve( curve );
+ filter->SetSliceRadius( this->m_Parameters.GetReal( "SliceRadius" ) );
+ filter->Update( );
+ this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) );
+}
+
+// eof - $RCSfile$
--- /dev/null
+#ifndef __cpPluginsImageSliceFilters__CPRImageFilter__h__
+#define __cpPluginsImageSliceFilters__CPRImageFilter__h__
+
+#include <cpPluginsImageSliceFilters_Export.h>
+#include <cpPlugins/BaseObjects/ProcessObject.h>
+
+namespace cpPluginsImageSliceFilters
+{
+ /**
+ */
+ class cpPluginsImageSliceFilters_EXPORT CPRImageFilter
+ : public cpPlugins::BaseObjects::ProcessObject
+ {
+ cpPluginsObject(
+ CPRImageFilter,
+ cpPlugins::BaseObjects::ProcessObject,
+ ImageSliceFilters
+ );
+
+ protected:
+ template< class _TImage >
+ inline void _GD0( _TImage* image );
+
+ template< class _TCurve, class _TImage >
+ inline void _GD1( _TCurve* curve, _TImage* image );
+ };
+
+} // ecapseman
+
+#endif // __cpPluginsImageSliceFilters__CPRImageFilter__h__
+
+// eof - $RCSfile$
+header #define ITK_MANUAL_INSTANTIATION
tinclude cpExtensions/Algorithms/CPRImageFilter:h|hxx
+tinclude cpExtensions/Algorithms/IsoImageSlicer:h|hxx
+tinclude itkResampleImageFilter:h|hxx
+tinclude itkJoinSeriesImageFilter:h|hxx
+
cinclude cpExtensions/DataStructures/Simple3DCurve.h
+cinclude itkImageAlgorithm.hxx
+
+instances itk::ResampleImageFilter< itk::Image< #scalar_pixels#, 3u >, itk::Image< #scalar_pixels#, 3u >, #real_types#, #real_types# >
+
+instances itk::JoinSeriesImageFilter< itk::Image< #scalar_types#, 2 >, itk::Image< #scalar_types#, 3 > >
+
+instances cpExtensions::Algorithms::BaseImageSlicer< itk::ResampleImageFilter< itk::Image< #scalar_pixels#, 3u >, itk::Image< #scalar_pixels#, 3u >, #real_types#, #real_types# >, itk::InterpolateImageFunction< itk::Image< #scalar_pixels#, 3u >, #real_types# > >
+
instances cpExtensions::Algorithms::CPRImageFilter< itk::Image< #scalar_pixels#, 3 >, cpExtensions::DataStructures::Simple3DCurve< #real_types# > >