IF(USE_QT4)
CompileLibFromDir(cpBaseQtApplication SHARED cpBaseQtApplication)
- TARGET_LINK_LIBRARIES(cpBaseQtApplication ${QT_LIBRARIES} cpPlugins)
+ TARGET_LINK_LIBRARIES(
+ cpBaseQtApplication
+ ${QT_LIBRARIES} cpExtensions cpPlugins
+ )
ENDIF(USE_QT4)
## eof - $RCSfile$
ImageSliceFilters
ImageSeparableFilters
ExtractImageFilters
+ ITKDifferenceImageFilters
+ ITKAnisotropicSmoothing
+ ITKLevelSetFilters
+ ITKImageFeatureFilters
PolyLineParametricPath
Simple3DCurve
Skeleton
TARGET_LINK_LIBRARIES(${_pfx}ImageInterpolators ${_pfx}Image)
TARGET_LINK_LIBRARIES(${_pfx}NeighborhoodImageIterators ${_pfx}Image)
TARGET_LINK_LIBRARIES(${_pfx}BaseImageFilters ${_pfx}ImageIterators)
-TARGET_LINK_LIBRARIES(${_pfx}ComplexImageFilters ${_pfx}ImageIterators)
+TARGET_LINK_LIBRARIES(
+ ${_pfx}ComplexImageFilters
+ ${_pfx}ImageIterators
+ ${_pfx}NeighborhoodImageIterators
+ )
TARGET_LINK_LIBRARIES(
${_pfx}ImagesIO
${_pfx}ScalarImages
${_pfx}BaseImageFilters
${_pfx}ComplexImageFilters
)
+TARGET_LINK_LIBRARIES(
+ ${_pfx}ITKImageFeatureFilters
+ ${_pfx}Image
+ ${_pfx}BaseImageFilters
+ ${_pfx}ComplexImageFilters
+ ${_pfx}NeighborhoodImageIterators
+ )
+TARGET_LINK_LIBRARIES(
+ ${_pfx}ITKDifferenceImageFilters
+ ${_pfx}Image
+ ${_pfx}BaseImageFilters
+ ${_pfx}ComplexImageFilters
+ )
+TARGET_LINK_LIBRARIES(
+ ${_pfx}ITKAnisotropicSmoothing
+ ${_pfx}ITKDifferenceImageFilters
+ )
+TARGET_LINK_LIBRARIES(
+ ${_pfx}ITKLevelSetFilters
+ ${_pfx}ITKAnisotropicSmoothing
+ ${_pfx}Image
+ ${_pfx}ImageIterators
+ ${_pfx}NeighborhoodImageIterators
+ ${_pfx}BaseImageFilters
+ ${_pfx}ImageInterpolators
+ ${_pfx}ExtractImageFilters
+ ${_pfx}ITKImageFeatureFilters
+ )
## ===================================================
## == Keep track of all created instances libraries ==
tinclude itk#filters#:h|hxx
tinclude itkImageAlgorithm:h|hxx
+tinclude itkNeighborhoodAlgorithm:h|hxx
+tinclude itkNeighborhoodOperatorImageFilter:h|hxx
+tinclude itkNeighborhoodInnerProduct:h|hxx
cinclude complex
cinclude itkImage.h
instances itk::#filters#< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< itk::CovariantVector< #real_types#, #process_dims# >, #process_dims# > >
instances itk::#filters#< itk::Image< itk::CovariantVector< #real_types#, #process_dims# >, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# > >
+instances itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< itk::Image< signed char, #process_dims# > >
+instances itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< itk::Image< #scalar_pixels#, #process_dims# > >
+instances itk::NeighborhoodInnerProduct< itk::Image< #scalar_pixels#, #process_dims# >, #in_reals#, #out_reals# >
+instances itk::NeighborhoodOperatorImageFilter< itk::Image< #in_scalars#, #process_dims# >, itk::Image< #out_scalars#, #process_dims# >, #real_types# >
+
minstances void #_export_# itk::ImageAlgorithm::DispatchedCopy< itk::Image< #scalar_pixels#, 3 >, itk::Image< #scalar_pixels#, 2 > >( itk::Image< #scalar_pixels#, 3 > const*, itk::Image< #scalar_pixels#, 2 >*, itk::Image< #scalar_pixels#, 3 >::RegionType const&, itk::Image< #scalar_pixels#, 2 >::RegionType const&, std::integral_constant< bool, false > )
minstances void #_export_# itk::ImageAlgorithm::DispatchedCopy< itk::Image< #scalar_pixels#, 2 >, itk::Image< #scalar_pixels#, 3 > >( itk::Image< #scalar_pixels#, 2 > const*, itk::Image< #scalar_pixels#, 3 >*, itk::Image< #scalar_pixels#, 2 >::RegionType const&, itk::Image< #scalar_pixels#, 3 >::RegionType const&, std::integral_constant< bool, false > )
header #define ITK_MANUAL_INSTANTIATION
define filters=RegionOfInterestImageFilter;ExtractImageFilter
+define i_scalars=#scalar_pixels#
+define o_scalars=#scalar_pixels#
tinclude itk#filters#:h|hxx
+tinclude itkShiftScaleImageFilter:h|hxx
instances itk::#filters#< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# > >
instances itk::ExtractImageFilter< itk::Image< #scalar_pixels#, 3 >, itk::Image< #scalar_pixels#, 2 > >
+instances itk::ShiftScaleImageFilter< itk::Image< #i_scalars#, #process_dims# >, itk::Image< #o_scalars#, #process_dims# > >
** eof - $RCSfile$
--- /dev/null
+header #define ITK_MANUAL_INSTANTIATION
+
+define functions=ScalarAnisotropicDiffusionFunction;GradientNDAnisotropicDiffusionFunction
+define filters=AnisotropicDiffusionImageFilter
+
+tinclude itk#functions#:h|hxx
+tinclude itk#filters#:h|hxx
+
+instances itk::#functions#< itk::Image< #real_types#, #process_dims# > >
+instances itk::#filters#< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #real_types#, #process_dims# > >
+
+** eof - $RCSfile$
--- /dev/null
+header #define ITK_MANUAL_INSTANTIATION
+
+define base=FiniteDifferenceImageFilter;DenseFiniteDifferenceImageFilter
+define functions=FiniteDifferenceFunction
+
+define i_reals=#real_types#
+define o_reals=#real_types#
+
+tinclude itk#functions#:h|hxx
+tinclude itk#base#:h|hxx
+
+instances itk::#functions#< itk::Image< #i_reals#, #process_dims# > >
+instances itk::#base#< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #i_reals#, #process_dims# > >
+
+** eof - $RCSfile$
--- /dev/null
+header #define ITK_MANUAL_INSTANTIATION
+
+define filters=LaplacianImageFilter
+define op=LaplacianOperator
+define i_reals=#real_types#
+define o_reals=#real_types#
+
+tinclude itk#op#:h|hxx
+tinclude itk#filters#:h|hxx
+
+instances itk::#op#< #i_reals#, #process_dims#, itk::NeighborhoodAllocator< #i_reals# > >
+instances itk::#filters#< itk::Image< #i_reals#, #process_dims# >, itk::Image< #o_reals#, #process_dims# > >
+
+** eof - $RCSfile$
--- /dev/null
+header #define ITK_MANUAL_INSTANTIATION
+
+define base=ZeroCrossingImageFilter;SparseFieldLevelSetImageFilter
+define filters=SegmentationLevelSetImageFilter;ThresholdSegmentationLevelSetImageFilter
+define functions=LevelSetFunction
+define ls_functions=SegmentationLevelSetFunction;ThresholdSegmentationLevelSetFunction
+
+define i_reals=#real_types#
+define o_reals=#real_types#
+
+tinclude itk#functions#:h|hxx
+tinclude itk#ls_functions#:h|hxx
+tinclude itk#base#:h|hxx
+tinclude itk#filters#:h|hxx
+tinclude itkSparseFieldLayer:h|hxx
+tinclude itkObjectStore:h|hxx
+
+cinclude itkLinearInterpolateImageFunction.hxx
+
+instances itk::SparseFieldLayer< itk::SparseFieldLevelSetNode< itk::Index< #process_dims# > > >
+instances itk::ObjectStore< itk::SparseFieldLevelSetNode< itk::Index< #process_dims# > > >
+
+instances itk::#functions#< itk::Image< #i_reals#, #process_dims# > >
+instances itk::#ls_functions#< itk::Image< #i_reals#, #process_dims# >, itk::Image< #o_reals#, #process_dims# > >
+instances itk::#base#< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #i_reals#, #process_dims# > >
+instances itk::#filters#< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #i_reals#, #process_dims# >, #o_reals# >
+
+** eof - $RCSfile$
header #define ITK_MANUAL_INSTANTIATION
+define v=FixedArray
define i_real=#real_types#
define o_real=#real_types#
define interp=Linear
tinclude itkImageFunction:h|hxx
tinclude itk#interp#InterpolateImageFunction:h|hxx
+tinclude itkVectorLinearInterpolateImageFunction:h|hxx
-NearestNeighbor
-
+cinclude itk#v#.h
cinclude itkImage.h
instances itk::ImageFunction< itk::Image< #scalar_pixels#, #process_dims# >, #i_real#, #o_real# >
instances itk::#interp#InterpolateImageFunction< itk::Image< #scalar_pixels#, #process_dims# >, #real_types# >
+instances itk::VectorLinearInterpolateImageFunction< itk::Image< itk::#v#< #i_real#, #process_dims# >, #process_dims# >, #o_real# >
+
** eof - $RCSfile$
cinclude itkOffset.h
instances itk::#it#< itk::Image< #scalar_pixels#, #process_dims# > >
+instances itk::#it#< itk::Image< signed #int_types#, #process_dims# > >
instances itk::#it#< itk::Image< std::complex< #real_types# >, #process_dims# > >
instances itk::#it#< itk::Image< itk::#color_pixels#< #scalar_pixels# >, #process_dims# > >
instances itk::#it#< itk::Image< itk::#vectors#< #real_types#, #process_dims# >, #process_dims# > >
define it=ConstNeighborhoodIterator;NeighborhoodIterator;ConstShapedNeighborhoodIterator;ShapedNeighborhoodIterator
define co=ZeroFluxNeumannBoundaryCondition
+define pi=#scalar_pixels#;signed char
+define op=Neighborhood;NeighborhoodOperator;DerivativeOperator
-tinclude itkNeighborhood:h|hxx
+tinclude itk#op#:h|hxx
tinclude itk#co#:h|hxx
tinclude itk#it#:h|hxx
cinclude itk#matrices#.h
cinclude itkOffset.h
-instances itk::NeighborhoodAllocator< #scalar_pixels# >
-instances itk::Neighborhood< #scalar_pixels#, #process_dims#, itk::NeighborhoodAllocator< #scalar_pixels# > >
-instances itk::#co#< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# > >
-instances itk::#it#< itk::Image< #scalar_pixels#, #process_dims# >, itk::#co#< itk::Image< #scalar_pixels#, #process_dims# >, itk::Image< #scalar_pixels#, #process_dims# > > >
+instances itk::NeighborhoodAllocator< #pi# >
+instances itk::#op#< #pi#, #process_dims#, itk::NeighborhoodAllocator< #pi# > >
+instances itk::#co#< itk::Image< #pi#, #process_dims# >, itk::Image< #pi#, #process_dims# > >
+instances itk::#it#< itk::Image< #pi#, #process_dims# >, itk::#co#< itk::Image< #pi#, #process_dims# >, itk::Image< #pi#, #process_dims# > > >
** eof - $RCSfile$
header #define ITK_MANUAL_INSTANTIATION
+define pi=#scalar_pixels#;signed char
define base_filters=ImageSource
define i2v=VTKImageExport;VTKImageImport;ImageToVTKImageFilter;VTKImageToImageFilter
tinclude itk#base_filters#:h|hxx
tinclude itk#i2v#:h|hxx
-instances itk::ImportImageContainer< unsigned long, #scalar_pixels# >
+instances itk::ImportImageContainer< unsigned long, #pi# >
instances itk::ImageRegion< #process_dims# >
instances itk::ImageBase< #process_dims# >
-instances itk::Image< #scalar_pixels#, #process_dims# >
-instances itk::#base_filters#< itk::Image< #scalar_pixels#, #process_dims# > >
-instances itk::#i2v#< itk::Image< #scalar_pixels#, #visual_dims# > >
+instances itk::Image< #pi#, #process_dims# >
+instances itk::#base_filters#< itk::Image< #pi#, #process_dims# > >
+instances itk::#i2v#< itk::Image< #pi#, #visual_dims# > >
minstances #_export_# std::ostream& itk::operator<< < #process_dims# >( std::ostream& a, itk::ImageRegion< #process_dims# > const& b )
header #define ITK_MANUAL_INSTANTIATION
+define v=FixedArray;#vectors#
define base_filters=ImageSource
define i2v=VTKImageExport;VTKImageImport;ImageToVTKImageFilter;VTKImageToImageFilter
tinclude itk#base_filters#:h|hxx
tinclude itk#i2v#:h|hxx
-cinclude itk#vectors#.h
+cinclude itk#v#.h
cinclude itk#diff_tensors#.h
cinclude itkOffset.h
-instances itk::ImportImageContainer< unsigned long, itk::#vectors#< #real_types#, #process_dims# > >
-instances itk::Image< itk::#vectors#< #real_types#, #process_dims# >, #process_dims# >
-instances itk::#base_filters#< itk::Image< itk::#vectors#< #real_types#, #process_dims# >, #process_dims# > >
-instances itk::#i2v#< itk::Image< itk::#vectors#< #real_types#, #visual_dims# >, #visual_dims# > >
+instances itk::ImportImageContainer< unsigned long, itk::#v#< #real_types#, #process_dims# > >
+instances itk::Image< itk::#v#< #real_types#, #process_dims# >, #process_dims# >
+instances itk::#base_filters#< itk::Image< itk::#v#< #real_types#, #process_dims# >, #process_dims# > >
+instances itk::#i2v#< itk::Image< itk::#v#< #real_types#, #visual_dims# >, #visual_dims# > >
instances itk::ImportImageContainer< unsigned long, itk::#diff_tensors#< #real_types# > >
instances itk::Image< itk::#diff_tensors#< #real_types# >, #process_dims# >
return( ok );
}
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Workspace::
+Connect(
+ TDataObject* input,
+ const std::string& destination_filter,
+ const std::string& destination_input
+ )
+{
+ // Get filters and check pertinence
+ if( input == NULL )
+ return( false );
+ TFilter* destination = this->GetFilter( destination_filter );
+ if( destination == NULL )
+ return( false );
+ if( !( destination->HasInput( destination_input ) ) )
+ return( false );
+
+ // Check if there is room for a new connection
+ bool ok = true;
+ if( destination->IsInputMultiple( destination_input ) )
+ {
+ for(
+ unsigned int i = 0;
+ i < destination->GetInputSize( destination_input );
+ ++i
+ )
+ if(
+ destination->GetInput( destination_input, i )->GetSource( ) ==
+ input->GetSource( )
+ )
+ ok = false;
+ }
+ else
+ ok = ( destination->GetInput( destination_input ) == NULL );
+ if( ok )
+ destination->AddInput(
+ destination_input,
+ input
+ );
+ return( ok );
+}
+
// -------------------------------------------------------------------------
bool cpPlugins::Interface::Workspace::
Disconnect(
typedef itk::SmartPointer< Self > Pointer;
typedef itk::SmartPointer< const Self > ConstPointer;
+ typedef cpPlugins::BaseObjects::DataObject TDataObject;
typedef cpPlugins::BaseObjects::ProcessObject TFilter;
typedef cpPlugins::BaseObjects::Widget TWidget;
typedef cpPlugins::Interface::Plugins TPlugins;
const std::string& destination_filter,
const std::string& destination_input
);
+ bool Connect(
+ TDataObject* input,
+ const std::string& destination_filter,
+ const std::string& destination_input
+ );
bool Disconnect(
const std::string& origin_filter,
const std::string& origin_output,
ITKSliceFilters
ITKSeparableFilters
ITKGenericFilters
+ ITKLevelSetFilters
ImageParaMorphologyFilters
ImageThresholdFilters
ImageGradientFilters
--- /dev/null
+#include <ITKLevelSetFilters/ThresholdSegmentationLevelSetImageFilter.h>
+#include <cpInstances/Image.h>
+
+#include <itkThresholdSegmentationLevelSetImageFilter.h>
+
+// -------------------------------------------------------------------------
+cpPluginsITKLevelSetFilters::ThresholdSegmentationLevelSetImageFilter::
+ThresholdSegmentationLevelSetImageFilter( )
+ : Superclass( )
+{
+ this->_ConfigureInput< cpInstances::Image >( "Input", true, false );
+ this->_ConfigureInput< cpInstances::Image >( "Feature", true, false );
+ this->_ConfigureOutput< cpInstances::Image >( "Output" );
+
+ this->m_Parameters.ConfigureAsReal( "PropagationScaling", 1 );
+ this->m_Parameters.ConfigureAsReal( "CurvatureScaling", 1 );
+ this->m_Parameters.ConfigureAsReal( "MaximumRMSError", 0.02 );
+ this->m_Parameters.ConfigureAsReal( "UpperThreshold", 1 );
+ this->m_Parameters.ConfigureAsReal( "LowerThreshold", 0 );
+ this->m_Parameters.ConfigureAsReal( "IsoSurfaceValue", 0 );
+ this->m_Parameters.ConfigureAsUint( "NumberOfIterations", 100 );
+}
+
+// -------------------------------------------------------------------------
+cpPluginsITKLevelSetFilters::ThresholdSegmentationLevelSetImageFilter::
+~ThresholdSegmentationLevelSetImageFilter( )
+{
+}
+
+// -------------------------------------------------------------------------
+void cpPluginsITKLevelSetFilters::ThresholdSegmentationLevelSetImageFilter::
+_GenerateData( )
+{
+ auto o = this->GetInputData( "Input" );
+ cpPlugins_Demangle_Image_ScalarPixels_AllDims_1( o, _GD0 )
+ this->_Error( "Invalid input image dimension." );
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+void cpPluginsITKLevelSetFilters::ThresholdSegmentationLevelSetImageFilter::
+_GD0( _TImage* image )
+{
+ auto f = this->GetInputData( "Feature" );
+ cpPlugins_Demangle_Image_RealPixels_2( f, _GD1, _TImage::ImageDimension, image )
+ this->_Error( "Invalid feature image." );
+}
+
+// -------------------------------------------------------------------------
+template< class _TFeature, class _TImage >
+void cpPluginsITKLevelSetFilters::ThresholdSegmentationLevelSetImageFilter::
+_GD1( _TFeature* feature, _TImage* image )
+{
+ typedef typename _TFeature::PixelType _TScalar;
+ typedef
+ itk::ThresholdSegmentationLevelSetImageFilter< _TImage, _TFeature, _TScalar >
+ _TFilter;
+
+ // Configure filter
+ _TFilter* filter = this->_CreateITK< _TFilter >( );
+ filter->SetInput( image );
+ filter->SetFeatureImage( feature );
+ filter->SetPropagationScaling( this->m_Parameters.GetReal( "PropagationScaling" ) );
+ filter->SetCurvatureScaling( this->m_Parameters.GetReal( "CurvatureScaling" ) );
+ filter->SetMaximumRMSError( this->m_Parameters.GetReal( "MaximumRMSError" ) );
+ filter->SetUpperThreshold( this->m_Parameters.GetReal( "UpperThreshold" ) );
+ filter->SetLowerThreshold( this->m_Parameters.GetReal( "LowerThreshold" ) );
+ filter->SetIsoSurfaceValue( this->m_Parameters.GetReal( "IsoSurfaceValue" ) );
+ filter->SetNumberOfIterations( this->m_Parameters.GetUint( "NumberOfIterations" ) );
+ filter->Update( );
+
+ // Connect output
+ this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) );
+}
+
+// eof - $RCSfile$
--- /dev/null
+#ifndef __cpPluginsITKLevelSetFilters__ThresholdSegmentationLevelSetImageFilter__h__
+#define __cpPluginsITKLevelSetFilters__ThresholdSegmentationLevelSetImageFilter__h__
+
+#include <cpPluginsITKLevelSetFilters_Export.h>
+#include <cpPlugins/BaseObjects/ProcessObject.h>
+
+namespace cpPluginsITKLevelSetFilters
+{
+ /**
+ */
+ class cpPluginsITKLevelSetFilters_EXPORT ThresholdSegmentationLevelSetImageFilter
+ : public cpPlugins::BaseObjects::ProcessObject
+ {
+ cpPluginsObject(
+ ThresholdSegmentationLevelSetImageFilter,
+ cpPlugins::BaseObjects::ProcessObject,
+ ImageLevelSetFilters
+ );
+
+ protected:
+ template< class _TImage >
+ inline void _GD0( _TImage* image );
+
+ template< class _TFeature, class _TImage >
+ inline void _GD1( _TFeature* feature, _TImage* image );
+ };
+
+} // ecapseman
+
+#endif // __cpPluginsITKLevelSetFilters__ThresholdSegmentationLevelSetImageFilter__h__
+
+// eof - $RCSfile$