<div>One of the options to visualize your 3d data is to use volume representation</div>  <div>Here I show you some code that use VTK for the visualisation.</div>  <div>VTK has several options for composite (means you use color) volume visualisation:</div>  <div>-vtkVolumeTextureMapper2D</div>  <div>-vtkVolumeTextureMapper3D</div>  <div>-vtkVolumeRayCastMapper</div>  <div>-vtkVolumeProMapper</div>  <div>&nbsp;</div>  <div>The c++ partial code,you still need to create additional classes like vtkRenderer&nbsp;,vtkRenderWindow,,vtkRenderWindowInterator also you have to&nbsp;copy the files itkImageToVTKImageFilter.txx and .h in your project:</div>  <div>&nbsp;</div>  <div>&nbsp; #include "vtkVolumeProperty.h"<BR>&nbsp; #include "vtkPiecewiseFunction.h"<BR>&nbsp; #include "vtkVolume.h"<BR>&nbsp; #include "vtkColorTransferFunction.h"<BR>&nbsp; #include "itkImageToVTKImageFilter.h"</div>  <div>&nbsp; #include "vtkVolumeTextureMapper2D.h"</div>  <div>&nbsp;</div>  <div>&nbsp; /*Pass the data
 to vtk &nbsp;from a itk class&nbsp;(&nbsp;file_reader in this example)*/</div>  <div>&nbsp;</div>  <div>&nbsp; typedef itk::ImageToVTKImageFilter&lt; ImageType &gt; ConnectorFilterType;<BR>&nbsp; ConnectorFilterType::Pointer connector = ConnectorFilterType::New();<BR>&nbsp;&nbsp; connector-&gt;GetExporter()-&gt;SetInput( file_reader-&gt;GetOutput() );<BR>&nbsp;&nbsp; connector-&gt;GetImporter()-&gt;Update();<BR>&nbsp;&nbsp; connector-&gt;Update();<BR></div>  <DIV id=RTEContent>  <DIV id=RTEContent>  <DIV>&nbsp; /*Select the volume method*/</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp; vtkVolumeTextureMapper2D* VolumeMapper = vtkVolumeTextureMapper2D::New();<BR>&nbsp; VolumeMapper-&gt;SetInput(Reader-&gt;GetOutput());</DIV>  <DIV>&nbsp;</DIV>  <DIV>/*Define the functions that will map your density values fromm your data to color and opacity i.e all the voxels with value 0 will have color 0,0,0 or black*/</DIV>  <DIV>&nbsp;</DIV> 
 <DIV>&nbsp;&nbsp;vtkPiecewiseFunction*&nbsp;OpacityTransferFunction=vtkPiecewiseFunction::New();<BR>&nbsp; vtkColorTransferFunction* ColorTransferFunction=vtkColorTransferFunction::New();<BR></DIV>  <DIV>&nbsp; OpacityTransferFunction-&gt;AddPoint(0, 0.0);<BR><BR>&nbsp; OpacityTransferFunction-&gt;AddPoint(2048, 0.1);<BR>&nbsp; OpacityTransferFunction-&gt;AddPoint(2048+1, 0.0);</DIV>  <DIV>&nbsp; ColorTransferFunction-&gt;AddRGBPoint(0 0.0, 0.0, 0.0);<BR>&nbsp; ColorTransferFunction-&gt;AddRGBPoint(2048/4, 1, 0, 0);<BR>&nbsp; ColorTransferFunction-&gt;AddRGBPoint(2048/2, 0, 0, 1);<BR>&nbsp; ColorTransferFunction-&gt;AddRGBPoint(2048/4*3, 0, 1, 0);<BR>&nbsp; ColorTransferFunction-&gt;AddRGBPoint(2048, 1, 1, 1);</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp; vtkVolumeProperty* VolumeProperty = vtkVolumeProperty::New();<BR>&nbsp; VolumeProperty-&gt;SetColor(ColorTransferFunction);<BR>&nbsp; VolumeProperty-&gt;SetScalarOpacity(OpacityTransferFunction);</DIV>  <DIV>&nbsp; vtkVolume* VolumeActor =
 vtkVolume::New();<BR>&nbsp; VolumeActor-&gt;SetMapper(VolumeMapper);<BR>&nbsp; VolumeActor-&gt;SetProperty(VolumeProperty);<BR><BR></DIV>  <DIV>Or better in your case you can use Surface Representation instead of Volume.This is much suited for binary data visualization</DIV>  <DIV>&nbsp;</DIV>  <DIV>Here is the c++ partial code:</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp; vtkImageMarchingCubes * marcher = vtkImageMarchingCubes::New();<BR>&nbsp;&nbsp;&nbsp; marcher-&gt;SetInput(image);<BR>&nbsp;&nbsp;&nbsp; marcher-&gt;SetValue(1,1.0);//Here 1.0 represent the voxel value of your binary data<BR>&nbsp;&nbsp;&nbsp; marcher-&gt;Update();</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp; vtkSmoothPolyDataFilter* smoother = vtkSmoothPolyDataFilter::New();<BR>&nbsp;&nbsp;&nbsp; smoother-&gt;SetInput(marcher-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; smoother-&gt;SetNumberOfIterations(5);<BR>&nbsp;&nbsp;&nbsp; smoother-&gt;SetFeatureAngle(60);<BR>&nbsp;&nbsp;&nbsp;
 smoother-&gt;SetRelaxationFactor(0.05);<BR>&nbsp;&nbsp;&nbsp; smoother-&gt;FeatureEdgeSmoothingOff();<BR>&nbsp;&nbsp;&nbsp; std::cout &lt;&lt; "VTK Smoothing mesh finished...." &lt;&lt; std::endl;</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;// render 3D model<BR>&nbsp; vtkPolyDataMapper* isoMapper = vtkPolyDataMapper::New();<BR>&nbsp;&nbsp;&nbsp; isoMapper-&gt;SetInput(smoother-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; isoMapper-&gt;ScalarVisibilityOn();</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;&nbsp; vtkActor * SurfaceExtractor = vtkActor::New();<BR>&nbsp; SurfaceExtractor-&gt;SetMapper(isoMapper);<BR>&nbsp; SurfaceExtractor-&gt;GetProperty()-&gt;SetDiffuseColor(1,1,0.9412);<BR></DIV>  <DIV>&nbsp;</DIV>  <DIV>Teo</DIV>  <DIV><B><I>ilker hacıhaliloğlu &lt;hacihaliloglu@gmail.com&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">hi all<BR>i have segmented a 3D image now i wantto visualize it what can i use
 ?<BR><BR>ilker<BR>_______________________________________________<BR>Insight-users mailing list<BR>Insight-users@itk.org<BR>http://www.itk.org/mailman/listinfo/insight-users<BR></BLOCKQUOTE>  <DIV><BR></DIV></DIV></DIV><p>
                <hr size=1> <a href="http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//farechase.yahoo.com/">Yahoo! FareChase - Search multiple travel sites in one click.</a>