[Insight-users] problem with ParallelSparseFieldLevelSetImageFilter

Kun kun_ch at 163.com
Mon Jul 28 15:47:56 EDT 2008


 Hi,all

    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:

Unhandled exception at 0x0042d7f1 in *.exe: 0xC0000005: Access violation reading location 0xfdfdfdfd.

it seems there is something wrong at the memory access.

 the  code is mainly like follows:

    m_LevelSetFunction    =     ThresholdFunctionType::New();
    m_LevelSetFunction    ->    SetUpperThreshold(150);
    m_LevelSetFunction    ->    SetLowerThreshold(100);
    m_LevelSetFunction    ->    SetFeatureImage(SourceImage); 

    parallelfilter    =     ParallelSparseFieldFilterType::New();
    parallelfilter    ->    SetInput(InitImage);
    parallelfilter    ->    SetNumberOfLayers(3);
    parallelfilter    ->    SetIsoSurfaceValue(0.0);
    parallelfilter    ->    SetDifferenceFunction(m_LevelSetFunction);
    parallelfilter    ->    Update();

 
 Could any one help me ?

 Thanks very much.

 Kun 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080729/97f2f33e/attachment.htm>


More information about the Insight-users mailing list