<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=DE link=blue vlink=purple>
<div class=WordSection1>
<p class=MsoNormal><span lang=EN-US>Dear igstk-experts,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>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?<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>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).<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>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.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I am looking forward to your comments on my
problem. <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Thank you!<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Cheers,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><br>
Stefan<o:p></o:p></span></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>