#include <vtkRenderer.h>
#include <vtkRendererCollection.h>
+#include <vtkPolyDataWriter.h>
+
+
// -------------------------------------------------------------------------
template< class F, class R >
void fpa::VTK::Image3DObserver< F, R >::
unsigned char alpha
)
{
- std::cout << idx << std::endl;
this->m_Stencil->SetScalarComponentFromDouble
( idx[ 0 ], idx[ 1 ], idx[ 2 ], 0, red );
this->m_Stencil->SetScalarComponentFromDouble
dynamic_cast< vtkUnsignedCharArray* >(
this->m_PolyData->GetPointData( )->GetScalars( )
);
- pd_data->SetTuple4( id, red, green, blue, alpha );
+ if( pd_data != NULL )
+ {
+ pd_data->SetTuple4( id, red, green, blue, alpha );
+
+ } // fi
this->m_Stencil->Modified( );
this->m_PolyData->Modified( );
this->m_PolyDataMapper->Modified( );
} // rof
this->m_PolyData->SetPoints( pd_points );
this->m_PolyData->SetVerts( pd_verts );
- this->m_PolyData->GetPointData( )->SetScalars( pd_data );
+ // this->m_PolyData->GetPointData( )->SetScalars( pd_data );
+
+
+ vtkSmartPointer< vtkPolyDataWriter > w =
+ vtkSmartPointer< vtkPolyDataWriter >::New( );
+ w->SetInputData( this->m_PolyData );
+ w->SetFileName( "fpa.vtk" );
+ w->Update( );
+
+ std::exit( 1 );
+
+
this->m_PolyDataMapper->SetInputData( this->m_PolyData );
this->m_PolyDataActor->SetMapper( this->m_PolyDataMapper );