[Insight-users] Speedimage for FastMarchingImageFilter

Lydia Ng lng@insightful.com
Thu, 23 May 2002 13:27:27 -0700


Hi Bjorn,

The EdgePotentialImageFilter expects a CovariantVector image=20
representing the image gradient as the input.

This allows the user to have the flexibility to use
whatever filter they would like to compute the image=20
derivative - e.g. maybe with some Gaussian smoothing etc.

/** \class EdgePotentialImageFilter
 *
 * \brief Computes the edge potential of an image from the image =
gradient.
 *
 * Input to this filter should be a CovariantVector image representing
 * the image gradient.
 *=20
 * The filter expect both the input and output images to have the same=20
 * number of dimensions, and the output to be of a scalar image type.
 *
 */

- Lydia

> -----Original Message-----
> From: Bjorn Hanch Sollie [mailto:bhs@pvv.org]
> Sent: Thursday, May 23, 2002 11:48 AM
> To: Lydia Ng
> Cc: insight-users
> Subject: RE: [Insight-users] Speedimage for FastMarchingImageFilter
>=20
>=20
> On Thu, 23 May 2002, Lydia Ng wrote:
>=20
> > Thanks for your feedback.
> > If you have time could you detail the problems you are having
> > and we'll look into it.
>=20
> 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:
>=20
>   enum{ ImageDimension =3D 2 };
>   typedef float PixelType;
>   typedef itk::Image<PixelType, ImageDimension> ImageType;
>=20
>   typedef itk::EdgePotentialImageFilter<ImageType, ImageType>=20
> EdgePotentialType;
>   EdgePotentialType::Pointer potential =3D EdgePotentialType::New();
>   potential->SetInput(input);
>   potential->Update();
>=20
> I get the following (MSVC++ 6.0 on Windows 2000):
>=20
>   Innsight\Code\BasicFilters\itkEdgePotentialImageFilter.h(46) : error
>   C2228: left of '.GetNorm' must have class/struct/union type
>=20
>   Innsight\Code\BasicFilters\itkEdgePotentialImageFilter.h(45) : while
>   compiling class-template member function 'float __thiscall
>   itk::Functor::EdgePotential<float,float>::operator ()(const=20
> float &)'
>   error executing cl.exe.
>=20
> Lines 36-49 from itkEdgePotentialImageFilter.h
>=20
>   namespace Functor {
>=20
>     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() ) );
>       }
>     };
>   }
>=20
> -Bjorn
> --=20
> The History of the Universe
> Chapter 1: Bang!  Chapter 2: Sss...  Chapter 3: Crunch!
> The End
>=20
>=20
>=20