[vtkusers] Casting vtkPNGReader to vtkImageReader2

Amy Squillacote ahs at cfdrc.com
Wed Jun 18 09:55:28 EDT 2008


Hi John,

As Utkarsh told you yesterday, you cannot call SetInput or 
SetInputConnection on a reader in VTK. Is there some reason you must use 
the SetInput / SetInputConnection methods? Why not get the output of the 
reader and operate on that?

- Amy

John Eke wrote:
> Thanks Amy,
>
> I am trying to find a way to successfully call SetInput and 
> SetInputConnection on vtkPNGReader. I have a scenario where I am 
> reading a PNG file and displaying it, but external classes need access 
> to the image data, ie external processes need to be able to connect to 
> the pipeline via SetInput and SetInputConnection.
>
> Would you suggest I maybe save the image in some filter without any 
> transformations? that way the input and output image data remain the 
> same and I also have access to SetInput, SetInputConnection, GetOutput 
> and GetOutputPort
>
> Thanks
>
> Amy Squillacote wrote:
>> Hi John,
>>
>> What are you trying to do? vtkPNGReader is a direct subclass of 
>> vtkImageReader2.
>>
>> - Amy
>>
>> John Eke wrote:
>>> Hi,
>>>
>>> I have read an image using vtkPNGReader, I was wondering how I can 
>>> safely transfer all that information into vtkImageReader2
>>>
>>> - John
>>> _______________________________________________
>>> This is the private VTK discussion list.
>>> Please keep messages on-topic. Check the FAQ at: 
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
>
>

-- 
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805





More information about the vtkusers mailing list