[Insight-users] RE: Problem with HistogramType::ConstIterator
inside function
Luis Ibanez
luis.ibanez at kitware.com
Wed, 11 Feb 2004 17:14:46 -0500
Hi Radhika,
Aja !, You were hiding the evidence !
You got 145 lines of error messages,
but only shared 2 of them with us...
That's not what we could call "Generous". 8-/
-----
The problem is shown around line 20 of the error
message:
> >*)::ImageType>::Pointer' is implicitly a typename
and
> warning: implicit typename is deprecated,
GCC doesn't accept implicit typenames
(since version 3.2, I think...)
Solution:
Go to line 37 of your file HistogramThreshold.txx
and put a "typename" keyword after the "typedef".
It will look like
typedef typename itk::.....
Regards,
Luis
--------------------------------
Radhika Sivaramakrishna wrote:
> Hi Luis,
> You are right, those are not the only two lines I get. I have attached
> the entire error which I get.
>
> However,these errors I got are on Linux so not Visual C++.
> Also, I have used this kind of template function before ie. Only using
> PixelType and not ImageType without a problem.
>
> Hope you can figure out what is happening from this long error message.
> Thanks
> Radhika
>
>
> Building object file PostExbrain.o...
> In file included from
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.h:19,
> from
> /export/jfs/rsivaram/PostExbrain-code/PostExbrain.cxx:26:
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx: In
> function `void
> HistogramThreshold(const itk::Image<PixelType, 3>*,
> itk::Image<PixelType,
> 3>*)':
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:37: warning: `
> typename itk::MaskImageFilter<HistogramThreshold(const
> itk::Image<PixelType,
> 3>*, itk::Image<PixelType, 3>*)::ImageType, HistogramThreshold(const
> itk::Image<PixelType, 3>*, itk::Image<PixelType, 3>*)::ImageType,
> HistogramThreshold(const itk::Image<PixelType, 3>*,
> itk::Image<PixelType,
> 3>*)::ImageType>::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:37:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:38: warning: `
> typename itk::BinaryThresholdImageFilter<HistogramThreshold(const
> itk::Image<PixelType, 3>*, itk::Image<PixelType, 3>*)::ImageType,
> HistogramThreshold(const itk::Image<PixelType, 3>*,
> itk::Image<PixelType,
> 3>*)::ImageType>::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:38:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:40: warning: `
> typename itk::ImageFileReader<HistogramThreshold(const
> itk::Image<PixelType,
> 3>*, itk::Image<PixelType, 3>*)::ImageType,
> itk::DefaultConvertPixelTraits<HistogramThreshold(const
> itk::Image<PixelType, 3>*, itk::Image<PixelType,
> 3>*)::ImageType::PixelType>
> >::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:40:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:41: warning: `
> typename itk::ImageFileReader<HistogramThreshold(const
> itk::Image<PixelType,
> 3>*, itk::Image<PixelType, 3>*)::ImageType,
> itk::DefaultConvertPixelTraits<HistogramThreshold(const
> itk::Image<PixelType, 3>*, itk::Image<PixelType,
> 3>*)::ImageType::PixelType>
> >::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:41:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:42: warning: `
> typename itk::ImageFileWriter<HistogramThreshold(const
> itk::Image<PixelType,
> 3>*, itk::Image<PixelType, 3>*)::ImageType>::Pointer' is implicitly a
> typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:42:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:43: warning: `
> typename itk::ConnectedComponentImageFilter<HistogramThreshold(const
> itk::Image<PixelType, 3>*, itk::Image<PixelType, 3>*)::ImageType,
> HistogramThreshold(const itk::Image<PixelType, 3>*,
> itk::Image<PixelType,
> 3>*)::IntImageType>::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:43:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:44: warning: `
> typename itk::RelabelComponentImageFilter<HistogramThreshold(const
> itk::Image<PixelType, 3>*, itk::Image<PixelType, 3>*)::IntImageType,
> HistogramThreshold(const itk::Image<PixelType, 3>*,
> itk::Image<PixelType,
> 3>*)::ImageType>::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:44:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:45: warning: `
> typename itk::BinaryErodeImageFilter<HistogramThreshold(const
> itk::Image<PixelType, 3>*, itk::Image<PixelType, 3>*)::ImageType,
> HistogramThreshold(const itk::Image<PixelType, 3>*,
> itk::Image<PixelType,
> 3>*)::ImageType, HistogramThreshold(const itk::Image<PixelType, 3>*,
> itk::Image<PixelType, 3>*)::StructuringElementType>::Pointer' is
> implicitly
> a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:45:
> warning: implicit
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:46:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:74: warning: `
> typename
>
> itk::Statistics::ScalarImageToHistogramGenerator<HistogramThreshold(const
> itk::Image<PixelType, 3>*, itk::Image<PixelType,
> 3>*)::ImageType>::Pointer'
> is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:74:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:86: warning: `
> typename
>
> itk::Statistics::ScalarImageToHistogramGenerator<HistogramThreshold(const
> itk::Image<PixelType, 3>*, itk::Image<PixelType,
> 3>*)::ImageType>::HistogramType' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:86:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:94: parse
> error
> before `=' token
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:95: parse
> error
> before `=' token
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:130:
> warning: `
> typename itk::Image<PixelType, Dimension>::RegionType' is implicitly a
> typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:130:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:158:
> warning: `
> typename itk::Image<PixelType, Dimension>::Pointer' is implicitly a
> typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:158:
> warning: implicit
> typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx: In
> function `void
> HistogramThreshold(const itk::Image<PixelType, 3>*,
> itk::Image<PixelType,
> 3>*) [with PixelType = PixelType]':
> /export/jfs/rsivaram/PostExbrain-code/PostExbrain.cxx:262:
> instantiated from here
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:99: `itr'
> undeclared (first use this function)
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:99: (Each
> undeclared identifier is reported only once for each function it appears
> in.)
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:100: `end'
> undeclared (first use this function)
> make[1]: *** [PostExbrain.o] Error 1
> make: *** [default_target] Error 2
>
>
>
> -----------------------------------------------------
> Confidentiality Notice.
> This email message is for the sole use of the intended recipient(s) and
> may contain confidential and privileged information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not
> the intended recipient, please contact the sender by reply email and
> destroy all copies of the original message. If you are the intended
> recipient, please be advised that the content of this message is subject
> to access, review and disclosure by the sender's Email System Administrator.
>