[Insight-users] LevelSet Filters Problem (ITK_TYPENAME related)
Luis Ibanez
luis.ibanez at kitware.com
Sun Jan 20 19:13:08 EST 2008
Hi Oscar,
The ITK_TYPENAME symbol (macro) is defined in
Insight/Code/Common/itkWin32Header.h.
In lines 76-82.
Please try the following:
In itkWin32Header.h comment out the lines that
are defining:
#define ITK_TYPENAME typename
recompile,
and let us know what the result is.
If this works, it means that we have to figure out
a combination of #if defined that will create the
correct case for Borland 5.5 when used from the IDE.
Thanks
Luis
--------------
Osc at r wrote:
> Hi All!!
>
> I'm building a GUI_application of segmentation based on
> LevelSetImageFilters of ITK, the ones in itkSoftwareGuide and
> visualization by VTK
> FastMarching succeded, but with ShapeDetection and GeodesicActiveContour
> there are a compilation Error:
> [C++ Error] itkSparseFieldLevelSetImageFilter.txx(101): E2439 'typename'
> is only allowed in template declarations
>
> ///////Part of itkSparseFieldLevelSetImageFilter.txx where
> locate the error...
>
> template<class TInputImage, class TOutputImage>
>
> ITK_TYPENAME SparseFieldLevelSetImageFilter<TInputImage,
> TOutputImage>::ValueType
>
> SparseFieldLevelSetImageFilter<TInputImage, TOutputImage>
> this is line 101 related with the error----> ::m_ValueZero =
> NumericTraits<ITK_TYPENAME, SparseFieldLevelSetImageFilter<TInputImage,
>
> TOutputImage>::ValueType >::Zero;
>
> It is possible to add the library by:
> //Shape Detection Level Set
> #include <itkShapeDetectionLevelSetImageFilter.h>
> //Geodesic Active Contour Level Set
> #include <itkGeodesicActiveContourLevelSetImageFilter.h>
>
> also is possible to define types by:
> typedef float InternalPixelType;
> typedef itk::Image<InternalPixelType,3> InternalImageType;
>
> typedef
> itk::ShapeDetectionLevelSetImageFilter<InternalImageType,InternalImageType>
> ShapeDetectionFilterType;
>
> typedef
> itk::GeodesicActiveContourLevelSetImageFilter<InternalImageType,InternalImageType>
> GeodesicActiveContourFilterType;
>
> Pointers are defined too, by:
> ShapeDetectionFilterType::Pointer shapeDetection;
> GeodesicActiveContourFilterType::Pointer geodesicActiveContour;
> if compile just that lines, there are no problems...,
> it compile and run with FastMarching Working, shapeDetection and
> geodesicActiveContour obviously do nothing
> But once I added the next, appears the error mentioned before...
> shapeDetection=ShapeDetectionFilterType::New();
> or
> geodesicActiveContour=GeodesicActiveContourFilterType::New()
>
>
> Characteristics:
> Compiler: Borland 5.5
> IDE: Builder 5.1
> ITK version: 3.2.0
> VTK version: 5.0.3
>
> Any suggestions??
>
> Looking only found
> http://public.kitware.com/pipermail/insight-users/2004-September/010291.html
> but adding itkWin32Header.h (as suggested there) doesn't work, altough
> it was a MSVC issue
>
> Thanks in Advance
>
> Oscar Gutiérrez Luna
> CIMAT A. C.
> Cubiculo: J4
> Tel.: 73 271-55 ext. 49672
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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