[vtkusers] Re: reading a stack of bmp files

Veerapuram Varadhan v.varadhan at californiadigital.com
Tue Apr 6 08:26:13 EDT 2004


Hi,

I don't really feel any need for the vtkPolyDataMapper in your code below.

Guys correct me if i am wrong. :)

You can directly use actor->SetInput (bmp_d->GetOutput());

HTH,

V. Varadhan.

> 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.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list