[Insight-users] Speedimage for FastMarchingImageFilter

Bjorn Hanch Sollie bhs@pvv.org
Thu, 23 May 2002 20:48:24 +0200 (CEST)


On Thu, 23 May 2002, Lydia Ng wrote:

> Thanks for your feedback.
> If you have time could you detail the problems you are having
> and we'll look into it.

Well, there are plenty of ways to compute a potentialimage of course,
so I'm not stuck with this, but when I try to use the
EdgePotentialImageFilter, for example like this:

  enum{ ImageDimension = 2 };
  typedef float PixelType;
  typedef itk::Image<PixelType, ImageDimension> ImageType;

  typedef itk::EdgePotentialImageFilter<ImageType, ImageType> EdgePotentialType;
  EdgePotentialType::Pointer potential = EdgePotentialType::New();
  potential->SetInput(input);
  potential->Update();

I get the following (MSVC++ 6.0 on Windows 2000):

  Innsight\Code\BasicFilters\itkEdgePotentialImageFilter.h(46) : error
  C2228: left of '.GetNorm' must have class/struct/union type

  Innsight\Code\BasicFilters\itkEdgePotentialImageFilter.h(45) : while
  compiling class-template member function 'float __thiscall
  itk::Functor::EdgePotential<float,float>::operator ()(const float &)'
  error executing cl.exe.

Lines 36-49 from itkEdgePotentialImageFilter.h

  namespace Functor {

    template< class TInput, class TOutput>
    class EdgePotential
    {
    public:
      EdgePotential() {};
      ~EdgePotential() {};
      inline TOutput operator()( const TInput & A )
      {
        return static_cast<TOutput>( exp( -1.0 * A.GetNorm() ) );
      }
    };
  }

-Bjorn
-- 
The History of the Universe
Chapter 1: Bang!  Chapter 2: Sss...  Chapter 3: Crunch!
The End