<div>Hi Luis,</div>  <div> </div>  <div>I implemented this using my idea.The reason I didn't use vtkCut is I dont think I can use vtkCut to display tumors except as contours not as filled polygon.(Can I do that with vtkCut?)</div>  <div> </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> </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> </div>  <div>My only concern is the RequestSetImage() method from igstkImageSpatialObject require that my application is a friend of that class.I dont understand why this method cannot be accessed directly ?</div>  <div> </div>  <div>Teo<BR><BR><B><I>Luis Ibanez
 <luis.ibanez@kitware.com></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>> Hi,<BR>> <BR>> I want to display the contour of a segmented object in Axial,Sagittal
 <BR>> and Coronal Views using igstk.<BR>> I saw there are implemented in IGSTK sandbox some classes that start <BR>> with Contour but they suport only mesh representation and also there is <BR>> no documentation how to use them, and what goes were.<BR>> <BR>> Therefore I tried to implement my own classes.<BR>> I wanted to display a second transparent slice(above the CT data) that <BR>> shows a rasterized contour rather than a 3d object.<BR>> <BR>> So I wrote my own SpatialObject and SpatialObjectRepresentation.<BR>> My workflow goes like this:<BR>> 1.Create an empty 3D image(vtk or itk) that has the same dimension like <BR>> CTSpatialObject internal image data.<BR>> 2.Draw my countours inside this image<BR>> 3.Pass the image to my SpatialObject in a similar fashion with <BR>> CTImageSpatialObject.<BR>> <BR>> My problem is the RequestGetITKImage() with afferent event <BR>> ITKImageModifiedEvent is not fully
 implemented so I <BR>> used RequestGetVTKImage() instead and then get the dimensions,spacing <BR>> from the vtk image and create a new itk image.<BR>> <BR>> My questions are<BR>> 1.How can I display contours in igstk(the book offers no clue on how I <BR>> can do this)?<BR>> 2.Why the class has a RequestGetITKImage() and no event <BR>> ITKImageModifiedEvent?<BR>> 3.What is the reason behind this very complicated way of passing image <BR>> data between classes?<BR>> 4.Is isgtk keeping an internal copy of the 3d data in each class?<BR>> 5.How a user is supposed to use correctly an Igstk <BR>> component(methods,event,states-look in constructor for allowed requests, <BR>> look for allowed events)?<BR>> <BR>> Teo<BR>> <BR>> ------------------------------------------------------------------------<BR>> Luggage? GPS? Comic books?<BR>> Check out fitting gifts for grads <BR>> <HTTP:
 evt="48249/*http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz" us.rd.yahoo.com><BR>> at Yahoo! Search.<BR>> <BR>> <BR>> ------------------------------------------------------------------------<BR>> <BR>> _______________________________________________<BR>> IGSTK-Users mailing list<BR>> IGSTK-Users@public.kitware.com<BR>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users<BR></BLOCKQUOTE><BR><p>

<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>