X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 11 Jul 2006 03:01 PM by  anon
How to rotate programmatically a volume object with IVOLUME?
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
11 Jul 2006 03:01 PM
    I have to programm a time series of 3D images, all of them with the same orientation, which is not the orientation that appears by default in IVOLUME. How can one rotate the volume programmatically?

    Deleted User



    New Member


    Posts:
    New Member


    --
    11 Jul 2006 03:01 PM
    I use an approach that makes sure to rotate the whole dataspace of the iTool on display. Below is an example based on the built-in IDL example data in file 'head.dat': PRO ex_ivolume_rotate_on_open ; Example data installed in every IDL file = FILEPATH('head.dat', SUBDIRECTORY = ['examples', 'data']) data = READ_BINARY(file, DATA_DIMS = [80, 100, 57]) ivolume, data ; Routine way to access iTools programatically idTool = itgetcurrent(TOOL=oTool) ; In rotating a view most users want to rotate the whole data space ; of the iTool visualization. The safest place to do this is in a ; data space superclass object called the IDLitVisDataspaceRoot. If ; you were to rotate just the IDLitVisVolume object, the axes would ; be left behind, and that would not look so good. temp = oTool->FindIdentifiers('*DATA SPACE',/VISUALIZATIONS) idDataSpace = temp[0] oDataSpace = oTool->GetByIdentifier(idDataSpace) oDataSpace->GetProperty, PARENT=oDataSpaceRoot ; Rotate the whole visualization 20 deg around the Z-axis. oDataSpaceRoot->Rotate, [0,0,1], 20 ; The syntax for method ROTATE is in Online Help for "IDLitVisualization". ; You won't see the above change, if you do not do this. oTool->RefreshCurrentWindow ; The above call will show the rotation, but it still does not render ; the IDLitVisVolume object (unless its AUTO_RENDER property is turned ; on). To render the volume in the display, do the following: temp = oTool->FindIdentifiers('*VOLUME',/VISUALIZATIONS) idVisVolume = temp[0] oVisVolume = oTool->GetByIdentifier(idVisVolume) oVisVolume->RenderVolume END
    You are not authorized to post a reply.