-#include <plugins/ImageMeshFilters/RasterMeshFilter.h>
+#include <ImageMeshFilters/RasterMeshFilter.h>
#include <cpPlugins/DataObjects/BoundingBox.h>
#include <cpPlugins/DataObjects/Mesh.h>
-#include <cpPlugins_ImageIterators.h>
#include <itkTriangleMeshToBinaryImageFilter.h>
#include <cpExtensions/Algorithms/RasterContourFilter.h>
-#include <itkTriangleMeshToBinaryImageFilter.hxx>
-#include <cpExtensions/Algorithms/RasterContourFilter.hxx>
// -------------------------------------------------------------------------
cpPluginsImageMeshFilters::RasterMeshFilter::
this->_ConfigureInput< _TDataObject >( "Template", false, false );
this->_ConfigureOutput< _TImage >( "Output" );
- this->m_Parameters.ConfigureAsUint( "InsideValue" );
- this->m_Parameters.ConfigureAsUint( "OutsideValue" );
- this->m_Parameters.ConfigureAsUint( "MinimumSize" );
-
- this->m_Parameters.SetUint( "InsideValue", 1 );
- this->m_Parameters.SetUint( "OutsideValue", 0 );
- this->m_Parameters.SetUint( "MinimumSize", 100 );
+ this->m_Parameters.ConfigureAsUint( "InsideValue", 1 );
+ this->m_Parameters.ConfigureAsUint( "OutsideValue", 0 );
+ this->m_Parameters.ConfigureAsUint( "MinimumSize", 100 );
}
// -------------------------------------------------------------------------
_TPixel outside = _TPixel( this->m_Parameters.GetUint( "OutsideValue" ) );
auto filter = this->_CreateITK< _TFilter >( );
- filter->AddPoints( mesh->GetPoints( ) );
+ filter->ClearPoints( );
+ double pnt[ 3 ];
+ for( long i = 0; i < mesh->GetNumberOfPoints( ); ++i )
+ {
+ mesh->GetPoint( i, pnt );
+ filter->AddPoint( pnt[ 0 ], pnt[ 1 ] );
+
+ } // rof
filter->SetTemplate( in_im );
filter->SetInsideValue( inside );
filter->SetOutsideValue( outside );