<DIV id=RTEContent> <DIV>thanks a lot for ur reply..gr. Hugo</DIV> <DIV>This code will be useful so much for me in another level..</DIV> <DIV>But actually for now i need to represent only a projection not max intensity..</DIV> <DIV>mean that i want to get the front, side and top views..</DIV> <DIV> </DIV> <DIV>for example.. I am representing a 3D image for a human head.. so i want to view his face and profile in 2D planes..</DIV> <DIV> </DIV> <DIV>so do u know a suitable solution</DIV> <DIV> </DIV> <DIV>regards</DIV> <DIV> </DIV> <DIV><BR><BR><B><I>Hugo Gratama van Andel <h.a.gratamavanandel@amc.uva.nl></I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="BORDER-LEFT: #1010ff 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px">Hello LM,<BR><BR>If you mean Maximum Intensity Projection I have some code that might <BR>help you. It is derived from some example TCL-scripts and it gives you a <BR>renderwindow in which you can interact with the data
and so choose the <BR>direction of the MIP. Finding code for capturing the 2D output of the <BR>window should be easy. I used the code below on some CT-images <BR>(raw-imagedata), you should set all the dimensions yourself.<BR>gr. Hugo<BR><BR>------mip.tcl--------<BR>package require vtk<BR>package require vtkinteraction<BR><BR># Create the renderer, the render window, and the interactor. The<BR># renderer draws into the render window, the interactor enables<BR># keyboard-based interaction with the scene.<BR>vtkRenderer aRenderer<BR>vtkRenderWindow renWin<BR>renWin AddRenderer aRenderer<BR>vtkRenderWindowInteractor iren<BR><BR>vtkInteractorStyleTrackballCamera aTrackBallCamera<BR>iren SetInteractorStyle aTrackBallCamera<BR>iren SetRenderWindow renWin<BR><BR>vtkImageReader reader<BR>reader SetDataByteOrderToLittleEndian<BR>reader SetDataScalarTypeToUnsignedShort<BR>reader SetDataExtent 0 511 0 511 0 373<BR>reader SetDataSpacing 0.29 0.29 0.5<BR>reader SetFileDimensionality 3<BR>reader
SetFileName "C:/temp/patient.raw"<BR><BR># Adding the volume renderer (ray caster)<BR>vtkPiecewiseFunction opacityTransferFunction<BR>opacityTransferFunction AddPoint 1100 0<BR>opacityTransferFunction AddPoint 1500 1.0<BR><BR>vtkColorTransferFunction colorTransferFunction<BR>colorTransferFunction AddRGBPoint 0.0 0.0 0.0 0.0<BR>colorTransferFunction AddRGBPoint 255.0 1.0 1.0 1.0<BR><BR>vtkVolumeProperty volumeProperty<BR>volumeProperty SetColor colorTransferFunction<BR>volumeProperty SetScalarOpacity opacityTransferFunction<BR><BR>vtkVolumeRayCastMIPFunction MIP<BR>vtkVolumeRayCastMapper volumeMapper<BR>volumeMapper SetVolumeRayCastFunction MIP<BR>volumeMapper SetInputConnection [reader GetOutputPort]<BR><BR>vtkVolume volume<BR>volume SetMapper volumeMapper<BR>volume SetProperty volumeProperty<BR>volume VisibilityOn<BR>volume Update<BR><BR># Bounding box.<BR>vtkOutlineFilter outlineData<BR>outlineData SetInputConnection [reader GetOutputPort]<BR>vtkPolyDataMapper
mapOutline<BR>mapOutline SetInputConnection [outlineData GetOutputPort]<BR>vtkActor outline<BR>outline SetMapper mapOutline<BR>[outline GetProperty] SetColor 0 1 0<BR><BR># Actors are added to the renderer.<BR>aRenderer AddActor outline<BR>aRenderer AddVolume volume<BR><BR>vtkCamera aCamera<BR>aRenderer SetActiveCamera aCamera<BR><BR># Setting the color and size of the renderwindow,<BR>#initializing the camera position<BR>aCamera SetViewUp 0 0 -1<BR>aCamera SetPosition -2 -2 -2<BR>aCamera SetFocalPoint 0 0 0<BR>aCamera ComputeViewPlaneNormal<BR>aRenderer ResetCamera<BR>aRenderer ResetCameraClippingRange<BR>aRenderer SetBackground 0.2 0.2 0.2<BR>renWin SetSize 640 480<BR><BR># Set up a callback (using command/observer) to bring up the Tcl<BR># command GUI when the keypress-u (UserEvent) key is pressed.<BR>iren AddObserver UserEvent {wm deiconify .vtkInteract}<BR><BR># Here we go!<BR>iren Initialize<BR>#renWin Render<BR>#iren Start<BR>wm withdraw .<BR>---- end mip.tcl-----<BR><BR>LM
wrote:<BR>> Hi all..<BR>> Please could any one tell me how to get a *2D projection* from a 3D <BR>> Image Data..<BR>> As I would like to represent projections in each x-y plane, y-zplane and <BR>> x-z plane..<BR>> at least i need a class name..<BR>> thanks in advance<BR>> <BR>> ------------------------------------------------------------------------<BR>> Yahoo! Photos<BR>> Got holiday prints? See all the ways <BR>> <BR>> to get quality prints in your hands ASAP.<BR>> <BR>> <BR>> ------------------------------------------------------------------------<BR>> <BR>> _______________________________________________<BR>> This is the private VTK discussion list. <BR>> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<BR>> Follow this link to subscribe/unsubscribe:<BR>> http://www.vtk.org/mailman/listinfo/vtkusers<BR><BR>-- <BR>Hugo Gratama van Andel<BR></BLOCKQUOTE><BR> <DIV></DIV></DIV><p>
                <hr size=1>Do you Yahoo!?<br>
With a free 1 GB, there's more in store with <a href="http://us.rd.yahoo.com/mail_us/taglines/mailstorage/*http://mail.yahoo.com/">Yahoo! Mail.</a>