--- /dev/null
+#include <Experiments/InsertNoiseIntoPoints.h>
+#include <cpInstances/Image.h>
+
+#include <random>
+#include <vtkImageData.h>
+#include <vtkPolyData.h>
+#error http://en.cppreference.com/w/cpp/numeric/random/uniform_real_distribution
+// -------------------------------------------------------------------------
+fpaPluginsExperiments::InsertNoiseIntoPoints::
+InsertNoiseIntoPoints( )
+ : Superclass( )
+{
+ typedef cpInstances::Image _TImage;
+ typedef cpPlugins::BaseObjects::DataObject _TData;
+
+ this->_ConfigureInput< _TData >( "Seeds", true, false );
+ this->_ConfigureInput< _TImage >( "DistanceMap", true, false );
+ this->_ConfigureOutput< _TData >( "Output" );
+ this->m_Parameters.ConfigureAsUint( "NumberOfSamples", 0 );
+}
+
+// -------------------------------------------------------------------------
+fpaPluginsExperiments::InsertNoiseIntoPoints::
+~InsertNoiseIntoPoints( )
+{
+}
+
+// -------------------------------------------------------------------------
+void fpaPluginsExperiments::InsertNoiseIntoPoints::
+_GenerateData( )
+{
+ auto dmap = this->GetInputData< vtkImageData >( "DistanceMap" );
+ auto seeds = this->GetInputData< vtkPolyData >( "Seeds" );
+ for( int i = 0; i < seeds->GetNumberOfPoints( ); ++i )
+ {
+ double buf[ 3 ], pcoords[ 3 ];
+ seeds->GetPoint( i, buf );
+ int ijk[ 3 ];
+ dmap->ComputeStructuredCoordinates( buf, ijk, pcoords );
+ double radius =
+ dmap->GetScalarComponentAsDouble( ijk[ 0 ], ijk[ 1 ], ijk[ 2 ], 0 );
+
+ } // rof
+
+ /* TODO
+ cpPlugins_Demangle_Image_RealPixels_AllDims_1( o, _GD0 )
+ this->_Error( "Invalid input image." );
+ */
+}
+
+// -------------------------------------------------------------------------
+/* TODO
+ template< class _TImage >
+ void fpaPluginsExperiments::InsertNoiseIntoPoints::
+ _GD0( _TImage* image )
+ {
+ typedef fpa::Image::InsertNoiseIntoPoints< _TImage > _TFilter;
+ auto filter = this->_CreateITK< _TFilter >( );
+ filter->SetInput( image );
+
+ if( seeds != NULL )
+ {
+ typename _TImage::PointType pnt;
+ typename _TImage::IndexType idx;
+ unsigned int dim =
+ ( _TImage::ImageDimension < 3 )? _TImage::ImageDimension: 3;
+
+ for( int i = 0; i < seeds->GetNumberOfPoints( ); ++i )
+ {
+ double buf[ 3 ];
+ seeds->GetPoint( i, buf );
+ pnt.Fill( 0 );
+ for( unsigned int d = 0; d < dim; ++d )
+ pnt[ d ] = buf[ d ];
+
+ if( image->TransformPhysicalPointToIndex( pnt, idx ) )
+ filter->AddSeed( idx, 0 );
+
+ } // rof
+
+ } // fi
+
+ filter->Update( );
+ this->GetOutput( "Skeleton" )->SetITK( filter->GetSkeleton( ) );
+ this->GetOutput( "Marks" )->SetITK( filter->GetMarks( ) );
+ }
+*/
+
+// eof - $RCSfile$
--- /dev/null
+#ifndef __fpaPluginsExperiments__InsertNoiseIntoPoints__h__
+#define __fpaPluginsExperiments__InsertNoiseIntoPoints__h__
+
+#include <fpaPluginsExperiments_Export.h>
+#include <cpPlugins/BaseObjects/ProcessObject.h>
+
+namespace fpaPluginsExperiments
+{
+ /**
+ */
+ class fpaPluginsExperiments_EXPORT InsertNoiseIntoPoints
+ : public cpPlugins::BaseObjects::ProcessObject
+ {
+ cpPluginsObject(
+ InsertNoiseIntoPoints,
+ cpPlugins::BaseObjects::ProcessObject,
+ fpaExperiments
+ );
+ };
+
+} // ecapseman
+
+#endif // __fpaPluginsExperiments__InsertNoiseIntoPoints__h__
+
+// eof - $RCSfile$