<div>Hi Luis,</div>  <div>&nbsp;</div>  <div>I implemented this using my idea.The reason I didn't use vtkCut is I dont think&nbsp;I can use vtkCut to display tumors except as contours not as filled polygon.(Can I do that with vtkCut?)</div>  <div>&nbsp;</div>  <div><U><FONT color=#800080><A href="http://isiswiki.georgetown.edu/teo/rfacolor.jpg">http://isiswiki.georgetown.edu/teo/rfacolor.jpg</A></FONT></U></div>  <div><U><FONT color=#800080></FONT></U>&nbsp;</div>  <div>But I didn't implemented it as a separated igstkImageContourSpatialObjectRepresentation as you suggested , I just modified the igstkImageSpatialObjectRepresentation :(.(because only is for my own usage)</div>  <div>&nbsp;</div>  <div>My only concern is the RequestSetImage() method from igstkImageSpatialObject require that my&nbsp;application is a friend of that class.I dont understand why this method cannot be accessed directly ?</div>  <div>&nbsp;</div>  <div>Teo<BR><BR><B><I>Luis Ibanez
 &lt;luis.ibanez@kitware.com&gt;</I></B> wrote:</div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>Hi Teo,<BR><BR>Implementing this functionality by redrawing an image<BR>is a bit of an overkill. You can do it in a simpler<BR>way by using creating a new image representation class<BR>and using a vtkContour + a vtkCut filter inside.<BR><BR><BR>1) You can implement this functionality as a new type<BR>of ImageRepresentation class.<BR><BR>2) If you start from the current class:<BR><BR>igstkImageSpatialObjectRepresentation.<BR><BR>and create a new class, with (for example) name<BR><BR>igstkImageContourSpatialObjectRepresentation.<BR><BR>3) Inside that new class you remove the<BR><BR>vtkImageActor<BR>vtkLookupTable<BR>vtkImageMapToColors<BR><BR>and replace them with a vtkContour filter and<BR>a normal vtkActor.<BR><BR><BR>4) Then setup a similar pipeline to the one illustrated<BR>in the ITK
 example:<BR><BR>InsightApplications/Auxiliary/vtk<BR>itkReadITKImage3DSegmentShowVTK.cxx<BR><BR>5) The image that you need to pass to the vtkContour filter<BR>is the vtkImageData that you get from the VTKImageObserver.<BR><BR><BR><BR>The reason behind the apparently complicated way of passing<BR>images is that IGSTK does not expose ITK or VTK classes in<BR>order to increase the safety of the software applications.<BR><BR><BR>The igstkImage class contains internally an ITK image, and<BR>using an ITK export + VTK import filter, it reuses the pixel<BR>data in order to create a vtkImageData object that you can<BR>pass to a VTK pipeline.<BR><BR><BR><BR>Please let us know if you find any difficulties implementing<BR>the igstkImageContourSpatialObjectRepresentation class.<BR><BR><BR><BR>Thanks<BR><BR><BR><BR>Luis<BR><BR><BR><BR><BR>------------------------<BR>ionut iorgovan wrote:<BR>&gt; Hi,<BR>&gt; <BR>&gt; I want to display the contour of a segmented object in Axial,Sagittal
 <BR>&gt; and Coronal Views using igstk.<BR>&gt; I saw there are implemented in IGSTK sandbox some classes that start <BR>&gt; with Contour but they suport only mesh representation and also there is <BR>&gt; no documentation how to use them, and what goes were.<BR>&gt; <BR>&gt; Therefore I tried to implement my own classes.<BR>&gt; I wanted to display a second transparent slice(above the CT data) that <BR>&gt; shows a rasterized contour rather than a 3d object.<BR>&gt; <BR>&gt; So I wrote my own SpatialObject and SpatialObjectRepresentation.<BR>&gt; My workflow goes like this:<BR>&gt; 1.Create an empty 3D image(vtk or itk) that has the same dimension like <BR>&gt; CTSpatialObject internal image data.<BR>&gt; 2.Draw my countours inside this image<BR>&gt; 3.Pass the image to my SpatialObject in a similar fashion with <BR>&gt; CTImageSpatialObject.<BR>&gt; <BR>&gt; My problem is the RequestGetITKImage() with afferent event <BR>&gt; ITKImageModifiedEvent is not fully
 implemented so I <BR>&gt; used RequestGetVTKImage() instead and then get the dimensions,spacing <BR>&gt; from the vtk image and create a new itk image.<BR>&gt; <BR>&gt; My questions are<BR>&gt; 1.How can I display contours in igstk(the book offers no clue on how I <BR>&gt; can do this)?<BR>&gt; 2.Why the class has a RequestGetITKImage() and no event <BR>&gt; ITKImageModifiedEvent?<BR>&gt; 3.What is the reason behind this very complicated way of passing image <BR>&gt; data between classes?<BR>&gt; 4.Is isgtk keeping an internal copy of the 3d data in each class?<BR>&gt; 5.How a user is supposed to use correctly an Igstk <BR>&gt; component(methods,event,states-look in constructor for allowed requests, <BR>&gt; look for allowed events)?<BR>&gt; <BR>&gt; Teo<BR>&gt; <BR>&gt; ------------------------------------------------------------------------<BR>&gt; Luggage? GPS? Comic books?<BR>&gt; Check out fitting gifts for grads <BR>&gt; <HTTP:
 evt="48249/*http://search.yahoo.com/search?fr=oni_on_mail&amp;p=graduation+gifts&amp;cs=bz" us.rd.yahoo.com><BR>&gt; at Yahoo! Search.<BR>&gt; <BR>&gt; <BR>&gt; ------------------------------------------------------------------------<BR>&gt; <BR>&gt; _______________________________________________<BR>&gt; IGSTK-Users mailing list<BR>&gt; IGSTK-Users@public.kitware.com<BR>&gt; http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users<BR></BLOCKQUOTE><BR><p>&#32;

<hr size=1>
<a href="http://us.rd.yahoo.com/evt=49678/*http://smallbusiness.yahoo.com/domains/?p=BESTDEAL"> Get your own web address.</a><br> Have a HUGE year through <a href="
http://us.rd.yahoo.com/evt=49678/*http://smallbusiness.yahoo.com/domains/?p=BESTDEAL">Yahoo! Small Business.</a>