[vtkusers] vtk memory issue, support needed

David Gobbi david.gobbi at gmail.com
Fri Jul 30 09:01:24 EDT 2010


On Fri, Jul 30, 2010 at 12:52 AM, Raúl Ferriz <raul at torresyvalero.com> wrote:
>
> El 29/07/2010 17:29, David Gobbi escribió:
>
> Thanks for pointing to this!
>
> I have duplicated vtkImageViewer2 classes as vtkImageViewer3 and removed
> this lines, really I have commented out lines on
> vtkImageViewer3::InstallPipeline(), the lines that installs callbacks for
> WindowLevel :
>
>    if (!this->InteractorStyle)
>      {
>      this->InteractorStyle = vtkInteractorStyleImage::New();
>      //vtkImageViewer_ebuCallback *cbk = vtkImageViewer_ebuCallback::New();
>      //cbk->IV = this;
>      //this->InteractorStyle->AddObserver(
>      //  vtkCommand::WindowLevelEvent, cbk);
>      //this->InteractorStyle->AddObserver(
>      //  vtkCommand::StartWindowLevelEvent, cbk);
>      //this->InteractorStyle->AddObserver(
>      //  vtkCommand::ResetWindowLevelEvent, cbk);
>      //cbk->Delete();
>      }
>
>
> so now on my code never an Update or UpdateWholeExtent is called anymore.
> But when my program reach last line on vtkImageViewer3::Render():
>
>        if (this->RenderWindow)
>        {
>                this->RenderWindow->Render();  //<-- Here the whole dicom is
> loaded
>        }
>
> Throws exception of not enought memory. I have even forced to set Slice = 1,
> to ensure a call to UpdateDisplayExtent().
> Should I report this as a bug on vtkGDCMImageReader ?


Yeah, you can do that, but first make a simple program that does
nothing but call Update() on the GDCMReader after setting the
UpdateExtent to a single slice.

   David



More information about the vtkusers mailing list