[vtkusers] vtkImageToStructuredPoints

Jon Luisi luisij at rpi.edu
Wed Jul 23 15:40:00 EDT 2008


Amy Squillacote wrote:
> No, you don't need to cast it. vtkImageData is a subclass of 
> vtkDataObject.
> - Amy
>
> Jon Luisi wrote:
>> For the VtkImageToStructuredPoints SetInput documentation calls for 
>> vtkImageData.
>> In code vtkImageAlgorithm::SetInput(vtkDataObject*)
>>
>> I am trying to add the input from a vtkImageReader reader->GetOutput()
>> Do I need to recast the vtkImageData from the reader to a 
>> vtkDataObject, and if so what is the best method?
>> Jon
>>
>> _______________________________________________
>> 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
>>
>>
>
When I try just connecting the input I get this error
error C2664: 'void vtkImageAlgorithm::SetInput(vtkDataObject *)' : 
cannot convert parameter 1 from 'vtkImageData *' to 'vtkDataObject *'
1>        Types pointed to are unrelated; conversion requires 
reinterpret_cast, C-style cast or function-style cast

do I need to change this line of code?
        vtkImageToStructuredPoints *i2sp = 
vtkImageToStructuredPoints::New();
        i2sp->SetInput(reader->GetOutput());




More information about the vtkusers mailing list