[vtkusers] How get pixel data in VTK?

yenanqu at scs.fsu.edu yenanqu at scs.fsu.edu
Wed Apr 23 19:08:24 EDT 2008


Hi, Mark, I did have the data that is three component. Your example  
only shows how to get pixel data that is one component which I never  
got in my code before. Do you have any idea how to retrieve this three  
component data?
I have try bunch of methods, but none of them is working. any help  
will be greatly appreciated.

Yenan

Quoting Mark Wyszomierski <markww at gmail.com>:

> Hi,
>
> It's definitely possible to get the scalar value from a vtkImageData
> object. You need to know the type of data your object is stored in
> though, for example you'll have difficulty getting the scalar value if
> your data is three component RGB and you're trying to get a single
> pixel scalar pixel value.
>
> I have an example of getting the pixel value that the mouse moves over
> in an image here:
>
>   http://devsample.org/index.php?option=com_content&task=view&id=48&Itemid=27
>
> which may help.
>
> Mark
>
>
> On Thu, Mar 27, 2008 at 1:37 PM,  <yenanqu at scs.fsu.edu> wrote:
>> Hi, all,
>> I found bunch of the VTK methods to retrieve pixel data from vtk
>> object, such as
>> GetPixelData, GetRGBACharPixelData, etc, but none of them is working,
>> Does anyone know how to get pixel data from VTK object? Thanks in
>> advance.
>>
>> Yenan
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>> _______________________________________________
>> 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
>>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the vtkusers mailing list