[IGSTK-Users] Receiving the image from Spatial Object

ionut iorgovan ionutcelgroaznic at yahoo.com
Thu May 24 15:24:41 EDT 2007


Hi Luis,
   
  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?)
   
  http://isiswiki.georgetown.edu/teo/rfacolor.jpg
   
  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)
   
  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 ?
   
  Teo

Luis Ibanez <luis.ibanez at kitware.com> wrote:
  
Hi Teo,

Implementing this functionality by redrawing an image
is a bit of an overkill. You can do it in a simpler
way by using creating a new image representation class
and using a vtkContour + a vtkCut filter inside.


1) You can implement this functionality as a new type
of ImageRepresentation class.

2) If you start from the current class:

igstkImageSpatialObjectRepresentation.

and create a new class, with (for example) name

igstkImageContourSpatialObjectRepresentation.

3) Inside that new class you remove the

vtkImageActor
vtkLookupTable
vtkImageMapToColors

and replace them with a vtkContour filter and
a normal vtkActor.


4) Then setup a similar pipeline to the one illustrated
in the ITK example:

InsightApplications/Auxiliary/vtk
itkReadITKImage3DSegmentShowVTK.cxx

5) The image that you need to pass to the vtkContour filter
is the vtkImageData that you get from the VTKImageObserver.



The reason behind the apparently complicated way of passing
images is that IGSTK does not expose ITK or VTK classes in
order to increase the safety of the software applications.


The igstkImage class contains internally an ITK image, and
using an ITK export + VTK import filter, it reuses the pixel
data in order to create a vtkImageData object that you can
pass to a VTK pipeline.



Please let us know if you find any difficulties implementing
the igstkImageContourSpatialObjectRepresentation class.



Thanks



Luis




------------------------
ionut iorgovan wrote:
> Hi,
> 
> I want to display the contour of a segmented object in Axial,Sagittal 
> and Coronal Views using igstk.
> I saw there are implemented in IGSTK sandbox some classes that start 
> with Contour but they suport only mesh representation and also there is 
> no documentation how to use them, and what goes were.
> 
> Therefore I tried to implement my own classes.
> I wanted to display a second transparent slice(above the CT data) that 
> shows a rasterized contour rather than a 3d object.
> 
> So I wrote my own SpatialObject and SpatialObjectRepresentation.
> My workflow goes like this:
> 1.Create an empty 3D image(vtk or itk) that has the same dimension like 
> CTSpatialObject internal image data.
> 2.Draw my countours inside this image
> 3.Pass the image to my SpatialObject in a similar fashion with 
> CTImageSpatialObject.
> 
> My problem is the RequestGetITKImage() with afferent event 
> ITKImageModifiedEvent is not fully implemented so I 
> used RequestGetVTKImage() instead and then get the dimensions,spacing 
> from the vtk image and create a new itk image.
> 
> My questions are
> 1.How can I display contours in igstk(the book offers no clue on how I 
> can do this)?
> 2.Why the class has a RequestGetITKImage() and no event 
> ITKImageModifiedEvent?
> 3.What is the reason behind this very complicated way of passing image 
> data between classes?
> 4.Is isgtk keeping an internal copy of the 3d data in each class?
> 5.How a user is supposed to use correctly an Igstk 
> component(methods,event,states-look in constructor for allowed requests, 
> look for allowed events)?
> 
> Teo
> 
> ------------------------------------------------------------------------
> Luggage? GPS? Comic books?
> Check out fitting gifts for grads 
> 
> at Yahoo! Search.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> IGSTK-Users mailing list
> IGSTK-Users at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users


 
---------------------------------
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20070524/4d7da1c3/attachment-0001.html>


More information about the IGSTK-Users mailing list