[vtkusers] Rotate vtkImage with vtkmatrix4x4
Jothy
jothybasu at gmail.com
Tue Mar 1 11:28:58 EST 2011
Thanks!
Now my images appeasr like the one shown in figure.
I need to rotate the image and dose about the ImagePositionPatient
upside-down.
I tried vtkImageFlip - it invalidates the dicom coordinate system and the
dose and image doesn't match.
I tried this
vtkMatrix4x4 *invert = vtkMatrix4x4::New();
invert->DeepCopy( imageReader->GetDirectionCosines());
invert->Invert();
vtkImageReslice *reslice = vtkImageReslice::New();
reslice->SetResliceAxes( invert );
reslice->SetInput(this->imageData);
reslice->Update();
But it doesn't rotate the image.How to rotate the image?
Thanks
Jothy
On Tue, Mar 1, 2011 at 4:07 PM, Jothy <jothybasu at gmail.com> wrote:
> But in this example FileLowerLeft is switched off.
>
> Thanks
>
> Jothy
>
>
> On Tue, Mar 1, 2011 at 3:50 PM, Mathieu Malaterre <
> mathieu.malaterre at gmail.com> wrote:
>
>> jothy, I think what you are looking for is already in gdcm, have a look
>> at:
>> gdcmreslice.cxx
>>
>> hth
>> On Tue, Mar 1, 2011 at 4:31 PM, Jothy <jothybasu at gmail.com> wrote:
>> > Hi all,
>> >
>> > I am trying to rotate vtkImageData using vtkMatrix4x4 about a point. is
>> > there any example on how to do this?
>> >
>> > 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
>> >
>> >
>>
>>
>>
>> --
>> Mathieu
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110301/45370325/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: untitled.JPG
Type: image/jpeg
Size: 81615 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110301/45370325/attachment.jpeg>
More information about the vtkusers
mailing list