[vtkusers] Re: reading a stack of bmp files

Veerapuram Varadhan v.varadhan at californiadigital.com
Tue Apr 6 07:56:03 EDT 2004


Hi,

Instead of

bmp_d->SetFileName ("c:/foo");

use

bmp_d->SetFilePrefix ("c:/foo");

HTH.

Moreover, it seems you did a "reply" to my post, instead, kindly do a
"reply all" so that others in the list will also be able to help you.

V. Varadhan.

> hello sir,
>
> as directed by you, i have tried reading a series of bmp files, but i am
> unable to do so.
> here is the code that i have used
>
>   # For 512 x 512 images foo1 to foo100
>
>  vtkBMPReader* bmp_d = vtkBMPReader::New();
>  bmp_d->SetFileName ("c:/foo"); // base file prefix for a series
>  bmp_d->SetFilePattern ("%s%d.bmp");
>  bmpData->SetDataExtent (0,511,0,511,1,100);
>  vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
>  mapper->SetInput( (vtkPolyData*) bmp_d->GetOutput());
>  vtkRenderer* ren = vtkRenderer::New();
>  vtkRenderWindow* renwin = vtkRenderWindow::New();
>  renwin->AddRenderer (ren);
>  vtkActor* actor = vtkActor::New();
>  actor->SetMapper (mapper);
>  ren->AddActor (actor);
>  renwin->Render();
>
> Please suggest
>
> Thanks for your help in advance
> Megha
>
>
> Win an evening with the Indian cricket captain: Yahoo! India Promos.




More information about the vtkusers mailing list