[IGSTK-Users] Integration of ITK-Pipeline into IGSTK / Problem with igstkImageSpatialObject and igstkMeshSpatialObject

Stefan sps.mindworks at googlemail.com
Mon Aug 30 06:10:44 EDT 2010


Dear igstk-experts,

 

we are currently working on a solution to integrate one or several ITK
pipelines into IGSTK. Our primary application for this is image processing
on stereo endoscopic data. The most basic workflow is as follows: We get an
image from the VideoImager, the image is processed in an ITK pipeline and
then displayed. However, we have serious difficulties to represent this
basic workflow with current IGSTK classes.

 

The problem boils down to the question how the ITK image which is generated
by the ITK pipeline can be displayed. Our first idea was to use
igstkVideoFrameSpatialObject for that purpose. However, this class is made
to get the images from a VideoImager class through a VideoImagerTool. We
then looked into the igstkImageSpatialObject class. Unfortunately the ITK
data that is encapsulated in this class can only be set by the friend
classes ImageReaderToImageSpatialObject and
UltrasoundImageSimulatorToImageSpatialObject. All other classes can only get
a const pointer in the itkImageData. So how do we put the output data of the
ITK pipeline into the igstkImageSpatialObject class?

 

I am by no means an igstk expert and I might be missing something (please
tell me if this is the case), but: I think there is no such functionality in
IGSTK. There is an example (DeckOfCardsRobot) that demonstrates how to
extract an itk image, but none that actually changes an ITK image and
displays the result. In my opinion there must be a mechanism to efficiently
update the itkImageData in igstkImageSpatialObject from arbitrary classes
(not just from friend classes). Otherwise we end up declaring tons of
classes as friend classes.

 

I've encountered a very similar problem with igstkMeshObject. We are working
with deformable meshes, so I have to be able to continuously update the
igstkMeshObject. Unfortunately this is only possible from the friend class
igstkMeshReader. So I ended up copying the code from igstkMeshObject to my
own class and declaring the classes that need access as friends (which
obviously is a really ugly solution).

 

Now, what could be a solution to this problem? Again, I probably have not
enough experience with igstk to propose a perfect solution, but I think it
should be possible to get the (non-const) pointer to the ITK data object
through the event mechanism. The problem with this approach is that this
might mess up the VTK representation classes. However, in my opinion this
can be cured by updating the VTK classes every time the view is refreshed.
As far as performance is concerned, this should not be a problem for most
meshes and 2D images. It might be a big problem for 3D images. Maybe there
could be two states for igstkImageSpatialObject (and similar classes): An
ImageSetStatic state without refreshing the VTK actors every time (as it is
currently implemented) and an ImageSetDynamic state. The non-const pointer
can only be obtained if the dynamic state is enabled.

 

I am looking forward to your comments on my problem. 

 

Thank you!

 

Cheers,


Stefan

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20100830/57b1ecdb/attachment-0001.html>


More information about the IGSTK-Users mailing list