[Insight-users] Fwd: problem with ParallelSparseFieldLevelSetImageFilter
Luca Antiga
luca.antiga at gmail.com
Wed Jul 30 03:29:10 EDT 2008
Hi Kun,
good catch. This is a bug, the code shouldn't just crash like this,
it should at the very least acknowledge that the function hasn't been
initialized, or better it should proceed with the initialization with
default parameters.
It would be great if you could file a bug report. I'm looking into
the issue now to find a good fix.
Luis, I'm not sure I can ensure I'll fix it by today, on time for
3.8. What do you think?
Luca
On Jul 30, 2008, at 1:10 AM, Kun wrote:
> 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
>
>
>
>
>
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list