[vtkusers] How to change vtkImageData scalar type?

Francois Bertel francois.bertel at kitware.com
Wed Jul 14 13:02:41 EDT 2010


Hi,

I just added a warning to the documentation of vtkImageCast to prefer
the use of vtkImageShiftScale instead.

Regards.

On Wed, Jul 14, 2010 at 12:39 PM, Preeti Bindu <preetibindu at gmail.com> wrote:
> I had tried vtkImageCast but I guess its output was not compatible to my
> requirement and so used the shiftScale and got things working. :)
>
> On Wed, Jul 14, 2010 at 12:36 PM, Jothy <jothybasu at gmail.com> wrote:
>>
>> I don't think shift will do that, instead that's for translation I think.
>> I used vtkImageCast and I worked.
>>
>> Of course, you can do that with vtkImageShiftScale!
>>
>> Jothy
>>
>> On Wed, Jul 14, 2010 at 5:32 PM, Preeti Bindu <preetibindu at gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> Use vtkImageShiftScale to shift your data from signed to unsigned.
>>>
>>> Hope it helps,
>>>
>>> On Wed, Jul 14, 2010 at 11:59 AM, Jothy <jothybasu at gmail.com> wrote:
>>>>
>>>> Used vtkImageCast.
>>>>
>>>> jothy
>>>>
>>>> On Wed, Jul 14, 2010 at 4:53 PM, Jothy <jothybasu at gmail.com> wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I am trying to volume render a vtkImageData, but it throws an error
>>>>> stating only unsigned char/unsigned short can be rendered not float.
>>>>>
>>>>> How to convert the data type?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Jothy
>>>>
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>> Preeti Bindu
>>>
>>
>
>
>
> --
> Regards,
> Preeti Bindu
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



-- 
François Bertel, PhD  | Kitware Inc. Suite 204
1 (518) 371 3971 x113 | 28 Corporate Drive
                      | Clifton Park NY 12065, USA



More information about the vtkusers mailing list