[vtkusers] vtkImageReslice + Axes directions
Mohamed Ben Reguiga
breguiga_mh at yahoo.fr
Sat Apr 26 16:19:42 EDT 2008
Hello all,
my problem is quite simple I think and obvious for people familiar with the vtkImageReslice class, whitch is not my case.
In my project I've implemented the multiplanarreconstitution (MPR) from a stack of CT and MRI images.
for that I've done like fllows :
vtkStructredPoints * data = vtkStructredPoints::New();
....
vtkLookupTable *LkTbl= vtkLookupTable::New();
....
vtkImageMapToColors *sagitalColors = vtkImageMapToColor::New();
sagitalColors ->setInput(data);
sagitalColors setLookupTable(LkTbl);
vtkImageActor *actr = vtkImageActor ::New()
actr->setInput(sagitalcolors->GetOutpu);
actr->SetDisplayExtent( 15,15, 0, 511,0,300) //example to show the 15th slice of a stack of 300 images , each one has 512 pxls wdth and hght
render->addActor(actr);
rederWindow->render();
..
this method shows only perpendicular slices as written in documentation of the vtkImageActor.
Now I want to be able to give imges of not orthogonal slices (doing some deviation of nbDgrees arround one of the three axes X, Y or Z).
I've read that vtkImageReslice is able to make that, and I have to specify cosines of the axes (X, Y and Z) but I don't Know how to calculate the new cosines?
if I have a deviation of the X plan and the Y plan of 30° each one arround the Z axe, how can I calculate the new cosins of these two axes ???
(all the image used are DICOM images)
please help me,
thank you.
__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités
http://mail.yahoo.fr Yahoo! Mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080426/c4def0e4/attachment.htm>
More information about the vtkusers
mailing list