[vtkusers] Image coords and image transformation

Fabian Torres fabian.trobles at gmail.com
Mon May 21 18:54:16 EDT 2012


Hi  Jothy

Thanks for your reply.

I have already checked the worldPointPicker class and it does not solve my
problem, cause it only give me the world coordinate, and as I said
previously I already know that. What I want to know is the index of the
pixel (to obtain the value of that pixel) that is located in that world
coordinate.

Manipulating the camera its not an option because I´m  working with a lot
of images and a lot of points and I´m not picking the point manually. So a
think that would not solve my problem.

Thanks for your advice,
If you, or somebody else, have some other suggestion I would be please to
hear about it.



On Mon, May 21, 2012 at 3:14 PM, Jothybasu Selvaraj <jothybasu at gmail.com>wrote:

> You could use vtkWorldPointPicker to do that. But I am afraid that it
> would give you the correct coordinate, since you are transforming your
> actor.
>
> Rather I would suggest you to manipulate the camera and use the
> worldPointPicker.
>
>
> Jothy
>
> On Mon, May 21, 2012 at 9:06 PM, Fabian Torres <fabian.trobles at gmail.com>wrote:
>
>> Hi.
>>
>> I would try to explain my problem the best I can.
>>
>> I have some ultrasound images that have certain position, orientation and
>> scale in a world space coordinate.
>>
>> To display each image in vtk scene I have used vtkTransform in the
>> vtkImageActor for each image:
>>
>> actor->SetInput(image);
>> actor->SetTransform(transform);
>>
>>
>> I´m able to display the images in the correct position and orientation in
>> the vtk scene. This has not been a problem.
>>
>> Now, the problem I have is that I want to access the vtkImageData from
>> its world space coordinate, not the image coords.
>>
>> Example if I want to access the pixel (0,0,0) image coords meaning the
>> first pixel of the imageData, and I know that this pixel is located in
>> the coordinate (100,130,89) in the world space. How can I access to the
>> data of this pixel using the world space coordinates?  Can I access
>> the imageData from the actor?
>>
>> --
>> Fabián Torres Robles
>> Maestria en Ciencias en Ingeniería Electrónica
>> Ingeniería en Sistemas Electrónicos
>> tel. 58081280, 0445534661338
>> e-mail fabian.trobles at gmail.com, dae.wong at gmail.com
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
>
> --
> Jothy
>
>


-- 
Fabián Torres Robles
Maestria en Ciencias en Ingeniería Electrónica
Ingeniería en Sistemas Electrónicos
tel. 58081280, 0445534661338
e-mail fabian.trobles at gmail.com, dae.wong at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120521/f0a7b67e/attachment.htm>


More information about the vtkusers mailing list