[vtkusers] vtkImageReslice and orientation

Emmanouil Moschidis moshman65 at yahoo.com
Thu Jul 19 14:37:26 EDT 2007


Hello 
due to a bug related to my DICOM viewer when I read a study I orient the slices axially. As a result when I try to reslice the volume I get sagital instead of axial slices, sagital instead of coronal and coronal instead of axial... (the original orientation of the study was sagittal and I made it axial)

so I thought I should just rotate the resliceAxes accordingly but it seems that is not the correct idea. This is what I am doing 

    vtkTransform *rotator=vtkTransform::New();
    rotator->PostMultiply();
    rotator->Translate( -(origin[0] + spacing[0]* coords[0]) , -(origin[1] + spacing[1]*coords[1]), -(origin[2] + spacing[2]*coords[2]) );
    rotator->RotateX(-90);
    rotator->RotateY(-90);
    rotator->Concatenate(coronalElements);
    rotator->Translate( (origin[0] + spacing[0]* coords[0]) , (origin[1] + spacing[1]*coords[1]), (origin[2] + spacing[2]*coords[2]) );
    rotator->Update();

    reslice->SetResliceAxes(rotator->GetMatrix());


Any Idea? Thanks

       
---------------------------------
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070719/9daf9a8b/attachment.htm>


More information about the vtkusers mailing list