[vtkusers] Re: reading a stack of bmp files
Veerapuram Varadhan
v.varadhan at californiadigital.com
Wed Apr 7 03:19:03 EDT 2004
Hi,
vtkActor doesn't have a SetInput method. My apologies...
As Mathieu said you can use vtkImageViewer2 or vtkImageViewer directly for
a simple rendering or you can use vtkVolume and vtkVolumeMapper or just
the vtkImageActor.
vtkImageActor* imageActor = vtkImageActor::New();
imageActor->SetInput(bmp_d->GetOutput());
If you want to use vtkVolume and vtkVolumeMapper,
vtkVolumeMapper* volmapper = vtkVolumentMapper::New();
vtkVolume* volume = vtkVolume::New();
volmapper->SetInput (bmp_d->GetOutput());
volume->SetMapper (volmapper);
HTH,
V. Varadhan.
> hi
> i tried using actor->SetInput(bmp_d->GetOutput());
> but there is a compile time error saying that SetInput is not a member of
> vtkActor.
> I am using vtk4.2
>
> megha
>
> Veerapuram Varadhan <v.varadhan at californiadigital.com> wrote:
> 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:
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> Win an evening with the Indian cricket captain: Yahoo! India Promos.
More information about the vtkusers
mailing list