[Insight-users] base classes not declared when defining a new class
Bill Lorensen
bill.lorensen at gmail.com
Wed Nov 26 23:25:47 EST 2008
Matt,
1) You are missing a } to close the namespace in itkHammingWindowImageFilter.txx
2) You should #include <string> in the main program
3) When you reference stl string use std::string.
4) In itkHammingWIndowImageFIlter.txx, this->m_Window is not a pointer so the
this->m_Window->SetSize(window_size) should be
this->m_Window.SetSize(window_size) .
Bill
On Wed, Nov 26, 2008 at 8:27 PM, Matthew McCormick (thewtex)
<matt at mmmccormick.com> wrote:
> Hi,
>
> I am trying to define a new class. A Hamming window filter.
>
> The header file is here
> http://rafb.net/p/o2YIRU60.html
>
> The .txx is here
> http://rafb.net/p/f3WY1P35.html
>
> Example main here
> http://rafb.net/p/d74LAO74.html
>
> With CMakeLists.txt here
> http://rafb.net/p/1lU6w430.html
>
> But, I get tons of errors during compilation like
> "
> In file included from
> /usr/include/InsightToolkit/IO/itkImageFileReader.txx:22,
> from
> /usr/include/InsightToolkit/IO/itkImageFileReader.h:188,
> from /tmp/hamtest/test.cpp:3:
> /usr/include/InsightToolkit/IO/itkImageIOFactory.h:43: error:
> 'itk::ImageIOBase' has not been declared
> /usr/include/InsightToolkit/IO/itkImageIOFactory.h:43: error: ISO C++
> forbids declaration of 'Pointer' with no type
> /usr/include/InsightToolkit/IO/itkImageIOFactory.h:43: error: typedef name
> may not be a nested-name-specifier
> /usr/include/InsightToolkit/IO/itkImageIOFactory.h:43: error: expected ';'
> before 'ImageIOBasePointer'
> /usr/include/InsightToolkit/IO/itkImageIOFactory.h:49: error:
> 'ImageIOBasePointer' does not name a type
> In file included from /usr/include/InsightToolkit/Common/itkRGBPixel.h:173,
> .....
> .....
> more nonsense
> ....
> you suck
> ....
> you are a newb.
> ....
> "
>
> Of course there is a big fat #include itkImageIOBase.h at the start of
> itkImageIOFactory.h
>
> Any insights on my problem? ;-) ( ha ha ... ha :P)
>
> Using ITK-3.10.0, gcc-4.3.2, cmake-2.6.2
>
> Thanks.
>
> _______________________________________________
> 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