<div>&nbsp;Hi,all<br><br>&nbsp;&nbsp;&nbsp; I try to use ParallelSparseFieldLevelSetImageFilter to create a Sparse Level Set, and use the "ThresholdSegmentationLevelSetFunction"as the level set function. It is OK when I build the solution, but it is failed when I debug the code. It always shows:<br><br><font color="#800080">Unhandled exception at 0x0042d7f1 in *.exe: 0xC0000005: Access violation reading location 0xfdfdfdfd.</font><br><br>it seems there is something wrong at the memory access.<br><br>&nbsp;the&nbsp; code is mainly like follows:<br><br>&nbsp;&nbsp;&nbsp; <font color="#800000">m_LevelSetFunction&nbsp;&nbsp; &nbsp;=&nbsp;&nbsp; &nbsp; ThresholdFunctionType::New();<br>&nbsp;&nbsp;&nbsp; m_LevelSetFunction&nbsp;&nbsp;&nbsp; -&gt;&nbsp;&nbsp;&nbsp; SetUpperThreshold(150);<br>&nbsp;&nbsp;&nbsp; m_LevelSetFunction&nbsp;&nbsp;&nbsp; -&gt;&nbsp;&nbsp;&nbsp; SetLowerThreshold(100);<br>&nbsp;&nbsp;&nbsp; m_LevelSetFunction&nbsp;&nbsp;&nbsp; -&gt;&nbsp;&nbsp;&nbsp; SetFeatureImage(SourceImage); <br><br>&nbsp;&nbsp;&nbsp; parallelfilter&nbsp;&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp; ParallelSparseFieldFilterType::New();<br>&nbsp;&nbsp;&nbsp; parallelfilter&nbsp;&nbsp;&nbsp; -&gt;&nbsp;&nbsp;&nbsp; SetInput(InitImage);<br>&nbsp;&nbsp;&nbsp; parallelfilter&nbsp;&nbsp;&nbsp; -&gt;&nbsp;&nbsp;&nbsp; SetNumberOfLayers(3);<br>&nbsp;&nbsp;&nbsp; parallelfilter&nbsp;&nbsp;&nbsp; -&gt;&nbsp;&nbsp;&nbsp; SetIsoSurfaceValue(0.0);<br>&nbsp;&nbsp;&nbsp; parallelfilter&nbsp;&nbsp;&nbsp; -&gt;&nbsp;&nbsp;&nbsp; SetDifferenceFunction(m_LevelSetFunction);<br>&nbsp;&nbsp;&nbsp; parallelfilter&nbsp;&nbsp;&nbsp; -&gt;&nbsp;&nbsp;&nbsp; Update();</font><br></div><div>&nbsp;</div><div>&nbsp;Could any one help me ?<br><br>&nbsp;Thanks very much.<br><br>&nbsp;Kun <br></div>