[Insight-users] Fwd: problem with ParallelSparseFieldLevelSetImageFilter

Kun kun_ch at 163.com
Tue Jul 29 19:10:56 EDT 2008


 Thanks, Luca,

    I have found the problem. The LevelSetFunction should be initialized first,otherwise the radius will set 0, then such an error happens. Also, it seems that the SpeedImage should be calculated before sending to the parallelfilter. 

 
    The code as follows:
    
      m_LevelSetFunction    =     ThresholdFunctionType::New();
      m_LevelSetFunction    ->    SetUpperThreshold(150);
      m_LevelSetFunction    ->    SetLowerThreshold(100);
      m_LevelSetFunction    ->    SetFeatureImage(SourceImage);
       
      ThresholdFunctionType::RadiusType    r;
      r[0] = r[1] = r[2] =1;
      m_LevelSetFunction->Initialize(r);
      
      m_LevelSetFunction->AllocateSpeedImage();
      m_LevelSetFunction->CalculateSpeedImage();      

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

 
    Appreciate and Thanks all.

Kun 


From: Luca Antiga<luca.antiga at gmail.com>
Date: Tue, Jul 29, 2008 at 10:59 AM
Subject: Re: [Insight-users] problem with ParallelSparseFieldLevelSetImageFilter
To: ITK Users <insight-users at itk.org>


Dear Kun,
 I'll try to reproduce the problem and get back to you.
Keep in touch

Luca




  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080730/78f438af/attachment.htm>


More information about the Insight-users mailing list