]> Creatis software - FrontAlgorithms.git/blobdiff - lib/fpa/VTK/ImageMPR.cxx
Skeletonization debugged
[FrontAlgorithms.git] / lib / fpa / VTK / ImageMPR.cxx
index 30033958d05e4cf6f3ac6c67d5704720a1fd42f2..8484a03cad504b948687ca9e6d4b5d610d8e241a 100644 (file)
@@ -48,6 +48,15 @@ public:
           } // fi
         }
         break;
+        case 'z':
+        case 'Z':
+        {
+          this->SeedWidget->ProcessEventsOff( );
+          this->WidgetX->InteractionOff( );
+          this->WidgetY->InteractionOff( );
+          this->WidgetZ->InteractionOff( );
+        }
+        break;
         default:
           break;
 
@@ -212,6 +221,22 @@ SetSize( unsigned int w, unsigned int h )
   this->m_Window->SetSize( w, h );
 }
 
+// -------------------------------------------------------------------------
+void fpa::VTK::ImageMPR::
+AddPolyData( vtkPolyData* pd, double opacity )
+{
+  unsigned int i = this->m_PolyDatas.size( );
+
+  this->m_PolyDatas.push_back( pd );
+  this->m_Mappers.push_back( vtkSmartPointer< vtkPolyDataMapper >::New( ) );
+  this->m_Actors.push_back( vtkSmartPointer< vtkActor >::New( ) );
+
+  this->m_Mappers[ i ]->SetInputData( pd );
+  this->m_Actors[ i ]->SetMapper( this->m_Mappers[ i ] );
+  this->m_Actors[ i ]->GetProperty( )->SetOpacity( opacity );
+  this->m_Renderer->AddActor( this->m_Actors[ i ] );
+}
+
 // -------------------------------------------------------------------------
 void fpa::VTK::ImageMPR::
 AddPolyData( vtkPolyData* pd, double r, double g, double b, double opacity )
@@ -278,4 +303,11 @@ Start( )
   this->m_Interactor->Start( );
 }
 
+// -------------------------------------------------------------------------
+void fpa::VTK::ImageMPR::
+Render( )
+{
+  this->m_Window->Render( );
+}
+
 // eof - $RCSfile$