[vtkusers] why I can't see the 3D model?

Jeremy Winston winston at cat.rpi.edu
Mon Mar 17 09:47:10 EST 2003


zhuo Chen wrote:
> [...]
> Who can help me search the errors?Thank you!
> [...]
>         vtkJPEGReader *reader = vtkJPEGReader::New();
>         reader->SetDataByteOrderToLittleEndian();
>         reader->SetDataExtent(0,512,0,512,0,194);
                                  ^^^   ^^^
Try       reader->SetDataExtent(0,511,0,511,0,194);

>         vtkMarchingCubes *iso = vtkMarchingCubes::New();
>         iso->SetInput(reader->GetOutput());
>         iso->SetValue(0,500);

Are you sure your images contain scalars both above and
below 500?


>         ren1->AddLight(lgt);
>         renWin->SetSize(500,500);

Don't you want that to be 512 by 512, to accommodate all the data?

HTH,
-Jeremy



More information about the vtkusers mailing list