[vtkusers] Update extent does not lie within whole extent

Randy Heiland heiland at ncsa.uiuc.edu
Mon Sep 11 11:32:19 EDT 2000


Can someone explain why this pgm generates the error msgs that it does?  What
I'm doing - re-setting the VOI for a vtkExtractGrid seems straightforward.

thanks,
--Randy
ps. this reads the VTK_DATA/kitchen.vtk dataset.
--------------------------------------------------------------
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkStructuredGridReader.h"
#include "vtkExtractGrid.h"
#include "vtkDataSetMapper.h"
#include "vtkActor.h"


void main( int argc, char *argv[] )
{
  int voi[6];

  vtkRenderer *aren = vtkRenderer::New();
  vtkRenderWindow *renWin = vtkRenderWindow::New();
    renWin->AddRenderer(aren);

  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
    iren->SetRenderWindow(renWin);

  vtkStructuredGridReader *reader = vtkStructuredGridReader::New();
    //reader->DebugOn();
    char vtkdata[512];
    strcpy(vtkdata, getenv("VTK_DATA"));
    strcat(vtkdata, "/kitchen.vtk");
    cout << "vtkdata = " << vtkdata << endl;
    reader->SetFileName( vtkdata );
    reader->Update();

  vtkExtractGrid *tableFilter = vtkExtractGrid::New();
    tableFilter->SetInput(reader->GetOutput());
    tableFilter->Update();
    tableFilter->GetVOI(voi);
    cout << "(default)voi = " <<
voi[0]<<","<<voi[1]<<","<<voi[2]<<","<<voi[3]<<","<<voi[4]<<","<<voi[5] <<
endl;

  vtkDataSetMapper *tableMapper = vtkDataSetMapper::New();
    tableMapper->SetInput(tableFilter->GetOutput());
    tableMapper->ScalarVisibilityOff();

  vtkActor *tableActor = vtkActor::New();
    tableActor->SetMapper(tableMapper);

  aren->AddActor(tableActor);

  // -- Now, changing the VOI and Updating leads to ERROR msgs...
  tableFilter->SetVOI(11,15,10,12,0,8);
  tableFilter->Update();
/*-----------------
ERROR: In vtkDataObject.cxx, line 462
vtkStructuredGrid (0x100278f8): Update extent does not lie within whole extent

ERROR: In vtkDataObject.cxx, line 463
vtkStructuredGrid (0x100278f8): Update extent is: 0, 27, 0, 23, 0, 16

ERROR: In vtkDataObject.cxx, line 470
vtkStructuredGrid (0x100278f8): Whole extent is: 0, 4, 0, 2, 0, 8
  ...
--------------------*/

  renWin->SetSize(300,300);
  renWin->Render();

  // loop until key is pressed
  char a;
  cout << "Press any key followed by <Enter> to exit>> ";
  cin >> a;
}

-----------------------------------------------------
  resulting output:

ERROR: In vtkDataObject.cxx, line 462
vtkStructuredGrid (0x100278f8): Update extent does not lie within whole extent

ERROR: In vtkDataObject.cxx, line 463
vtkStructuredGrid (0x100278f8): Update extent is: 0, 27, 0, 23, 0, 16

ERROR: In vtkDataObject.cxx, line 470
vtkStructuredGrid (0x100278f8): Whole extent is: 0, 4, 0, 2, 0, 8

ERROR: In vtkDataObject.cxx, line 462
vtkStructuredGrid (0x100278f8): Update extent does not lie within whole extent

ERROR: In vtkDataObject.cxx, line 463
vtkStructuredGrid (0x100278f8): Update extent is: 0, 27, 0, 23, 0, 16

ERROR: In vtkDataObject.cxx, line 470
vtkStructuredGrid (0x100278f8): Whole extent is: 0, 4, 0, 2, 0, 8




More information about the vtkusers mailing list