Procházet zdrojové kódy

Revert "Pipeline based rendering expects the pipeline out of date"

This reverts commit db0526ef70787323e3ab03f20f5980b7eb73b1fd.
There is no need to update the image data. This is done automatically by the
image mappers. Moreover, updating the imagedata can lead to errors when the
update extent is not up-to-date. The image mappers ensure the update extent to
be the same size than the whole extent.
Julien Finet před 14 roky
rodič
revize
9d9e29082f

+ 0 - 6
Libs/Visualization/VTK/Core/vtkLightBoxRendererManager.cpp

@@ -451,12 +451,6 @@ void vtkLightBoxRendererManager::SetImageData(vtkImageData* newImageData)
 }
 
 //----------------------------------------------------------------------------
-vtkImageData* vtkLightBoxRendererManager::GetImageData()const
-{
-  return this->Internal->ImageData;
-}
-
-//----------------------------------------------------------------------------
 vtkCamera* vtkLightBoxRendererManager::GetActiveCamera()
 {
   if (this->Internal->RenderWindowItemList.size() == 0)

+ 0 - 1
Libs/Visualization/VTK/Core/vtkLightBoxRendererManager.h

@@ -31,7 +31,6 @@ class CTK_VISUALIZATION_VTK_CORE_EXPORT vtkLightBoxRendererManager : public vtkO
 
   /// Set image data
   void SetImageData(vtkImageData* newImageData);
-  vtkImageData* GetImageData()const;
 
   /// Get active camera
   /// Note that the same camera is used with all the renderWindowItem

+ 0 - 1
Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.cpp

@@ -147,7 +147,6 @@ void ctkVTKAbstractView::forceRender()
     {
     return;
     }
-  this->preRender();
   d->RenderWindow->Render();
 }
 

+ 2 - 2
Libs/Visualization/VTK/Widgets/ctkVTKAbstractView.h

@@ -54,7 +54,7 @@ public slots:
   void scheduleRender();
 
   /// Force a render even if a render is already ocurring
-  virtual void forceRender();
+  void forceRender();
 
   /// Set background color
   virtual void setBackgroundColor(const QColor& newBackgroundColor) = 0;
@@ -97,7 +97,7 @@ public:
 protected:
   QScopedPointer<ctkVTKAbstractViewPrivate> d_ptr;
   ctkVTKAbstractView(ctkVTKAbstractViewPrivate* pimpl, QWidget* parent);
-  virtual void preRender(){};
+
 private:
   Q_DECLARE_PRIVATE(ctkVTKAbstractView);
   Q_DISABLE_COPY(ctkVTKAbstractView);

+ 0 - 13
Libs/Visualization/VTK/Widgets/ctkVTKSliceView.cpp

@@ -134,19 +134,6 @@ void ctkVTKSliceView::resetCamera()
 }
 
 //----------------------------------------------------------------------------
-void ctkVTKSliceView::preRender()
-{
-  Q_D(ctkVTKSliceView);
-  vtkImageData* imageData = d->LightBoxRendererManager->GetImageData();
-  if (imageData)
-    {
-    /// FIXME: Shouldn't be needed to update the pipeline here. During the
-    /// rendering, the actors should update the pipeline via the mappers.
-    imageData->Update();
-    }
-}
-
-//----------------------------------------------------------------------------
 void ctkVTKSliceView::setImageData(vtkImageData* newImageData)
 {
   Q_D(ctkVTKSliceView);

+ 1 - 1
Libs/Visualization/VTK/Widgets/ctkVTKSliceView.h

@@ -129,7 +129,7 @@ signals:
 
 protected:
   virtual void resizeEvent(QResizeEvent * event);
-  virtual void preRender();
+
 private:
   Q_DECLARE_PRIVATE(ctkVTKSliceView);
   Q_DISABLE_COPY(ctkVTKSliceView);