[Insight-users] Re: the sigmoid image is entirely white for GeodesicActiveContourLevelSet

Goo gtshowtime at gmail.com
Tue Mar 27 08:32:57 EST 2007


notice something:

(1)
if the ExternalImageType used as float, the image of result will be white
entirely in every step (smooth,gradient and sigmoid).

(2)
And if both ExternalImageType and InternalImageType are signed short,
the image of smooth and gradient are fine but sigmoid image is whole white.

(3) Unfortunately , the format for level set must be float.
How do I solve this problem???


2007/3/27, Goo <gtshowtime at gmail.com>:
>
> Hi All:
>
> This question is so confused to me.
> The output of sigmoid image is shown white entirely but gradient image
> fine.
>
> The following are my programs:
> if the ExternalImageType used as float, the image of result will be white
> entirely in smooth,gradient and sigmoid.
>
> Please give me some guidance.
> Regards.
>
>
> //----------------------------------CODE-------------------------------------------
>
>     typedef itk::Image< signed short, 3 >  InternalImageType;
>     typedef itk::Image< signed short, 3 >  ExternalImageType;
>
>     typedef itk::RescaleIntensityImageFilter<ExternalImageType,
> InternalImageType> InputCastType;
>     typedef itk::RescaleIntensityImageFilter<InternalImageType,
> ExternalImageType> OutputCastType;
>
>     OutputCastType::Pointer            m_SmoothObserver;
>     OutputCastType::Pointer            m_GradientObserver;
>     OutputCastType::Pointer            m_SigmoidObserver;
>
>         typedef itk::ResampleImageFilter<
>                             InternalImageType , InternalImageType >
> FilterType;
>         FilterType::Pointer SubSample = FilterType::New();
>
>         typedef itk::AffineTransform< double, 3 >  TransformType;
>         TransformType::Pointer transform = TransformType::New();
>
>         typedef itk::NearestNeighborInterpolateImageFunction<
>                            InternalImageType, double >  InterpolatorType;
>         InterpolatorType::Pointer interpolator = InterpolatorType::New();
>
>
>         SubSample->SetInterpolator( interpolator );
>         SubSample->SetDefaultPixelValue( 50 );
>
>         double spacing[ 3 ];
>         spacing[0] = InputCaster->GetOutput()->GetSpacing()[0];
>         spacing[1] = InputCaster->GetOutput()->GetSpacing()[1];
>         spacing[2] = InputCaster->GetOutput()->GetSpacing()[2];
>         SubSample->SetOutputSpacing( spacing );
>
>         double origin [3];
>         origin[0] = 80*spacing[0];
>         origin[1] = 80*spacing[1];
>         origin[2] = 15*spacing[2];
>         SubSample->SetOutputOrigin(origin);
>
>         InternalImageType::SizeType   size;
>
>         size[0] = 100;
>         size[1] = 100;
>         size[2] = 5;
>
>         SubSample->SetSize( size );
>         SubSample->SetInput( InputCaster->GetOutput() );
>         SubSample->SetTransform( transform );
>         transform->SetIdentity();
>
>         SubSample->Update();
>
>
>         typedef itk::CurvatureAnisotropicDiffusionImageFilter
>                     < InternalImageType,InternalImageType >
> SmoothingFilterType;
>
>         typedef itk::GradientMagnitudeRecursiveGaussianImageFilter
>                     < InternalImageType,InternalImageType >
> GradientFilterType;
>
>         typedef itk::SigmoidImageFilter
>                     < InternalImageType,InternalImageType >
> SigmoidFilterType;
>
>         SmoothingFilterType::Pointer    m_smoothing =
> SmoothingFilterType::New();
>         GradientFilterType::Pointer        m_gradientMagnitude =
> GradientFilterType::New();
>         SigmoidFilterType::Pointer        m_sigmoid =
> SigmoidFilterType::New();
>
>         m_smoothing->SetNumberOfIterations(  m_SmoothIter );
>         m_smoothing->SetConductanceParameter( m_SmoothConductance );
>         m_smoothing->SetTimeStep( m_TimeStep );
>
>         m_gradientMagnitude->SetSigma(  m_sigma  );
>
>         m_sigmoid->SetOutputMinimum(  m_SigmoidOutMin  );
>         m_sigmoid->SetOutputMaximum(  m_SigmoidOutMax  );
>         m_sigmoid->SetAlpha( m_alpha );
>         m_sigmoid->SetBeta(  m_beta  );
>
>         m_smoothing->SetInput(     SubSample->GetOutput() );
>         m_gradientMagnitude->SetInput( m_smoothing->GetOutput() );
>         m_sigmoid->SetInput( m_gradientMagnitude->GetOutput() );
>
>         m_SmoothObserver->SetInput(m_smoothing->GetOutput());
>         m_GradientObserver->SetInput(m_gradientMagnitude->GetOutput());
>         m_SigmoidObserver->SetInput(m_sigmoid->GetOutput());
>
>         m_SmoothObserver->Update();
>         m_GradientObserver->Update();
>         m_SigmoidObserver->Update();
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070327/4219544d/attachment.html


More information about the Insight-users mailing list