[vtkusers] get pixel value from vtkimagedata regardless of its data type

Lin M majcjc at gmail.com
Wed Mar 4 10:42:04 EST 2015


OK It seems GetScalarComponentAsDouble is what I need. :-)

On Wed, Mar 4, 2015 at 10:38 AM, Lin M <majcjc at gmail.com> wrote:

> Hi guys,
>
> Is there a way to get scalar data from vtkimagedata regardless of the data
> type? Then I can always get the right value even though I don't know the
> original data type.
>
> I searched and vtkImageCast may change the entire data type which is not
> what I mostly wanted.
>
> Any ideas about that? Thank you very much!
>
> Best,
> Lin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150304/ba876497/attachment.html>


More information about the vtkusers mailing list