Hi Dan,<br><br>thanx for your support. Here&#39;s the code.Please take a look. Michael.<br>If you want, I can send images acoording to the filter steps an the dicom data.<br><br>Michael<br><br><div id=":j9" class="ii gt">///////////////////////////////////////////<br>

<br>const double initialDistance = 5.0;<br>const double sigma =  1.0;<br>const double alpha =  -0.3;<br>const double beta  =  2.0;<br>const double curvatureScaling   = 0.05;<br>const double propagationScaling = 1.0;<br><br>

typedef itk::Image&lt; float,3 &gt; InternalImageType;<br>typedef itk::Image&lt; short,3 &gt; ShortImageType;<br><br>typedef itk::CurvatureAnisotropicDiffusionImageFilter &lt;ShortImageType, InternalImageType&gt; SmoothingFilterType;<br>

typedef itk::GradientMagnitudeRecursiveGaussianImageFilter &lt;InternalImageType, InternalImageType&gt; GradientFilterType;<br>typedef itk::SigmoidImageFilter &lt;InternalImageType, InternalImageType&gt; SigmoidFilterType;<br>

typedef itk::FastMarchingImageFilter &lt;InternalImageType, InternalImageType&gt; FastMarchingFilterType;<br>typedef itk::ShapeDetectionLevelSetImageFilter &lt;InternalImageType, InternalImageType&gt; ShapeDetectionFilterType;<br>

typedef itk::BinaryThresholdImageFilter &lt;InternalImageType, InternalImageType&gt; ThresholdingFilterType;<br><br>ThresholdingFilterType::Pointer thresholder = ThresholdingFilterType::New();<br>SmoothingFilterType::Pointer smoothing = SmoothingFilterType::New();<br>

GradientFilterType::Pointer gradientMagnitude = GradientFilterType::New();<br>SigmoidFilterType::Pointer sigmoid = SigmoidFilterType::New();<br>FastMarchingFilterType::Pointer fastMarching = FastMarchingFilterType::New();<br>

ShapeDetectionFilterType::Pointer shapeDetection = ShapeDetectionFilterType::New();<br><br>// the input comes from a dicomreader<br>smoothing-&gt;SetInput( m_Dicomreader-&gt;GetITKOutput() );<br>gradientMagnitude-&gt;SetInput( smoothing-&gt;GetOutput() );<br>

sigmoid-&gt;SetInput( gradientMagnitude-&gt;GetOutput() );<br>shapeDetection-&gt;SetInput( fastMarching-&gt;GetOutput() );<br>shapeDetection-&gt;SetFeatureImage( sigmoid-&gt;GetOutput() );<br>thresholder-&gt;SetInput( shapeDetection-&gt;GetOutput() );<br>

<br>smoothing-&gt;SetTimeStep(0.0625);<br>smoothing-&gt;SetNumberOfIterations(5);<br>smoothing-&gt;SetConductanceParameter(9.0);<br><br>gradientMagnitude-&gt;SetSigma(sigma);<br><br>sigmoid-&gt;SetOutputMinimum(0.0);<br>
sigmoid-&gt;SetOutputMaximum(1.0);<br>
sigmoid-&gt;SetAlpha(alpha);<br>sigmoid-&gt;SetBeta(beta);<br><br>typedef FastMarchingFilterType::NodeContainer NodeContainer;<br>typedef FastMarchingFilterType::NodeType NodeType;<br>NodeContainer::Pointer seeds = NodeContainer::New();<br>

<br>InternalImageType::IndexType  seedPosition;<br><br>seedPosition[0] = 250;<br>seedPosition[1] = 300;<br>seedPosition[2] = 0;<br><br>NodeType node;<br>const double seedValue = - initialDistance;<br><br>node.SetValue( seedValue );<br>

node.SetIndex( seedPosition );<br><br>seeds-&gt;Initialize();<br>seeds-&gt;InsertElement( 0, node );<br><br>fastMarching-&gt;SetTrialPoints(  seeds  );<br>fastMarching-&gt;SetSpeedConstant( 1.0 );<br>fastMarching-&gt;SetOutputSize( m_Dicomreader-&gt;GetITKOutput()-&gt;GetBufferedRegion().GetSize() );<br>

<br>shapeDetection-&gt;SetPropagationScaling(  propagationScaling );<br>shapeDetection-&gt;SetCurvatureScaling( curvatureScaling );<br>shapeDetection-&gt;SetMaximumRMSError( 0.02 );<br>shapeDetection-&gt;SetNumberOfIterations( 800 );<br>

<br>thresholder-&gt;SetLowerThreshold(-1000.0 );<br>thresholder-&gt;SetUpperThreshold(0.0 );<br>thresholder-&gt;SetOutsideValue(  0  );<br>thresholder-&gt;SetInsideValue(  255 );<br><br>// here I use a VtkImageViewer2 to show the output<br>

Utility::popUpImage(thresholder-&gt;GetOutput());<br><br>////////////////////////////////////////////////////////////////////////////////////////////////</div><br><br><br><br><div class="gmail_quote">2009/8/27 Dan Mueller <span dir="ltr">&lt;<a href="mailto:dan.muel@gmail.com">dan.muel@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Michael,<br>
<br>
I recommended that you post the minimal source code (and possibly<br>
data) required to reproduce the issue.<br>
<br>
Regards, Dan<br>
<br>
2009/8/25 Michael Xanadu &lt;<a href="mailto:xanadu.michael@googlemail.com">xanadu.michael@googlemail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hi folks,<br>
&gt;<br>
&gt; I&#39;ve got a problem with all segmentation filters which have two inputs, for<br>
&gt; example ShapeDetectionLevelSet or GeodesicActiveContour. I tryed the<br>
&gt; accordant examples in the example folders and they work great (with image<br>
&gt; files). But if I replace the input by a dicomreader (of course, I changed<br>
&gt; all accordant parameters, too) I always get a black output with a little<br>
&gt; white spot at the coordinate where I placed the seedpoint. I messed around<br>
&gt; with the filter parameters, but I never get a segment, only the spot. Is<br>
&gt; somebody familiar with the problem?<br>
&gt;<br>
&gt; Michael<br>
&gt;<br>
&gt; P.S.: dicom data = 512 x 512 x 4, short<br>
&gt;<br>
</div></div>&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>