<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#acccc6>
<DIV><FONT face=Arial size=2>Hello ITK users,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am using a complex pipeline to convert
vtkImageData to itk Image, apply some filters on it (each time a different
filter) like smoohting, segmentation, then convert back to VTK in order to
visualize it.</FONT></DIV>
<DIV><FONT face=Arial size=2>My problem is that I receive various errors,
"unhandled exceptions" sometimes in the itk sources sometimes in system dlls,
usually when I want to apply the itk filters for the 2nd time.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am using the same pipeline several times on
several (different) images read into VTK.</FONT></DIV>
<DIV><FONT face=Arial size=2>As I understood, if one element (object) in
the VTK->ITK->VTK pipeline is destroyed the whole pipeline will crash. In
order to prevent this I use vtkImageCast to "Clone" the final vtk output in
order to separate the output vtkImageData from the whole pipeline. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here is the sketch of the pipeline:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>vtkImageData Input -> </FONT></DIV>
<DIV><FONT face=Arial size=2>-> vtkImageCast -></FONT></DIV>
<DIV><FONT face=Arial size=2>-> vtkImageData Input 2 -></FONT></DIV>
<DIV><FONT face=Arial size=2>-> itk::VTKImageToImageFilter -></FONT></DIV>
<DIV><FONT face=Arial size=2>-> itk::Image -></FONT></DIV>
<DIV><FONT face=Arial size=2>-> " different itk filter each time: ex:
itk::ConnectedThresholdImageFilter or itk::CurvatureFlowImageFilter "
-></FONT></DIV>
<DIV><FONT face=Arial size=2>-> itk::Image Output -></FONT></DIV>
<DIV><FONT face=Arial size=2>-> itk::ImageToVTKImageFilter -></FONT></DIV>
<DIV><FONT face=Arial size=2>-> vtkImageData Output -></FONT></DIV>
<DIV><FONT face=Arial size=2>-> vtkImageCast -></FONT></DIV>
<DIV><FONT face=Arial size=2>-> vtkImageData Output 2</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I use ->Update() at every step!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>
<DIV><FONT face=Arial size=2>By the way I am using itk 2-0-0, vtk 4-4, VC++6
with SP6, WinXP Pro.</FONT></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>
<DIV><FONT face=Arial size=2>Is a solution to recreate (Delete()
and New()) all the itk and vtk filters in the pipeline each time they
need to be used? I observed that if I destroy even one of these filters the
whole thing crashes, and not immediately, but sooner or later, somewhere when
vtk needs the data.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></DIV>
<DIV><FONT face=Arial size=2>My question is: </FONT></DIV>
<DIV><FONT face=Arial size=2>How can I separate the resulting vtkImage from the
whole vtk-itk-vtk pipeline once it was processed? </FONT></DIV>
<DIV><FONT face=Arial size=2>Or more generally: </FONT></DIV>
<DIV><FONT face=Arial size=2>How can I reuse the whole pipeline on different
images with different sizes and attributes?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any hints will be gratefully
apreciated.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Sincerelly,</FONT></DIV>
<DIV><FONT face=Arial size=2>Istvan</FONT><FONT face=Arial size=2></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>