#include <vtkCamera.h>
#include <vtkImageData.h>
#include <vtkImageProperty.h>
+#include <vtkPlane.h>
#include <vtkProperty.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
this->_ConfigureInput( orientation );
}
+// -------------------------------------------------------------------------
+vtkImageData* cpExtensions::Visualization::ImageSliceActors::
+GetInputData( )
+{
+ if( this->m_Mapper.GetPointer( ) != NULL )
+ return( this->m_Mapper->GetInput( ) );
+ else
+ return( NULL );
+}
+
+// -------------------------------------------------------------------------
+void cpExtensions::Visualization::ImageSliceActors::
+AddMesh( vtkPolyData* mesh )
+{
+ SourceActor< vtkCutter > a;
+ a.Create( );
+ a.Source->SetInputData( mesh );
+ a.Source->SetCutFunction( this->m_Mapper->GetSlicePlane( ) );
+ a.Source->SetValue( 0, 0 );
+ a.Source->GenerateTrianglesOff( );
+ a.Source->Update( );
+ a.Modified( );
+ this->m_Meshes[ mesh ] = a;
+ this->AddItem( a.Actor );
+
+ auto ren = this->m_Style->GetCurrentRenderer( );
+ if( ren != NULL )
+ if( ren->HasViewProp( this->m_Actor ) )
+ ren->AddViewProp( a.Actor );
+}
+
// -------------------------------------------------------------------------
void cpExtensions::Visualization::ImageSliceActors::
AssociateSlice( Self* slice )
);
#else // defined(WIN32)
std::sprintf(
- this->m_TextBuffer, "Axis: %c (%d)\nPixel %s",
+ this->m_TextBuffer, "Axis: %c (%ld)\nPixel %s",
axis, slice, str.str( ).c_str( )
);
#endif // defined(WIN32)