[vtkusers] vtkImagePlaneWidget and image orientation

Marco Sambin m.sambin at gmail.com
Wed Mar 6 05:29:05 EST 2013


Hi Srikanth,

incidentally, I am exactly getting back to this issue now, after several
months dedicated to other portions of my project.

I have reviewed the source code of vtkImagePlaneWidget, and I have the
impression that at least the UpdatePlane() method does not take into
account the eventual ResliceTransform set on the vtkImageReslice associated
with the vtkImagePlaneWidget.

In particular, the following block of code inside UpdatePlane():

if ( this->RestrictPlaneToVolume )
{
...
}

in my opinion would need to take into consideration the ResliceTransform in
order to work correctly in cases when a non-identity ResliceTransform is
present. Also, the same applies to the computation of the spacingX and
spacingY variables at the end of the method.

Maybe someone from VTK team may comment on this?

Thanks in advance for any comment on this topic.
Best regards,

Marco


On Wed, Mar 6, 2013 at 3:44 AM, Srikanth om <srikanth8087 at gmail.com> wrote:

>
> Hello Marco, I have the same issue of transforming the vtkImagePlaneWidget
> (in reference to the following email). Could you tell me if you got any
> solution ?
> I would really appreciate your help.
>
> Thanks,
> Srikanth
>
>
> Hi all.
>
> I think I've made some progresses on this issue (and I will share them
> here), but I I still need some help.
>
> Basically, I've read more carefully the documentation about the
> SetResliceTransform() method of the vtkImageReslice class, and I
> learnt that the 4x4 matrix that I shall set here is the INVERSE of the
> DICOM transformation matrix, since this reslice transform is applied
> to the resampling grid before acquisition of the volume data.
>
> Everything works fine now as far as this transform is concerned, but
> the vtkImagePlaneWidget does not seem to be particularly conscious
> about this transform. In fact:
>
> 1 - If I simply call "PlaceWidget()", the bounds of the widget remain
> the ones of the original un-rotated volume (as if the reslice
> transform hadn't been applied). On the other side, if I call
> PlaceWidget(double[] bounds) with the correct bounds of my volume in
> the final world coordinates (detected programmatically by me from my
> own custom data source), I can correctly see my volume, with the
> appropriate orientation.
>
> 2 - Pressing the left mouse button in order to detect the data
> coordinates on the plane widget leads to a "Off Image" text overlay,
> even though what I can see in the 3D scene is that I am on the image.
>
> 3 - If I set RestrictPlaneToVolumeOn() on my vtkImagePlaneWidget(), it
> prevents me from moving on visible parts of my volume, since it seems
> to always restrict to the bounds of the original un-rotated input
> volume.
>
> Overall, the vtkImagePlaneWidget seems NOT to be conscious about the
> reslice transform. Is this possible?
>
> Do you have some suggestions / workarounds in order to make this
> widget work better when a reslice transform is applied?
>
> Thanks in advance and best regards,
>
> Marco Sambin
>  cheers,
> Srikanth
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130306/aad56cc1/attachment.htm>


More information about the vtkusers mailing list