[Insight-users] Re: Regarding Examples

Luis Ibanez luis . ibanez at kitware . com
Sat, 08 Jun 2002 17:24:10 -0400


Hi cspl,

Did you make a "cvs update"  ?

or just downloaded the examples directories ?


 From the error message that you posted, it looks
like you have two unsynchronized versions of
the ImageIOBase and  RawImageIO classes.

   RawImageIO derives from ImageIOBase

ImageIOBase has a pure virtual method "Write()",
that has to be overloaded by any writer. The signature
of "Write()" in your version of RawImageIO doesn't match
the signature of "Write()" on your version of ImageIOBase.

You have:

void ImageIOBase::Write( void * );
void RawImageIO::Write( const void * );

We have put a lot of effort on making ITK const-correct,
the version that you have of ImageIOBase should be
relatively old.

All the ImageIO objects implementing the reading and
writing of specific file formats derive from ImageIOBase
and therefore have to implement the "Write()" method.
(among others...)
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageIOBase.html


Please make sure that you have a consistent checkout of ITK.

Let us know if you still find any problems after updating
your cvs checkout.



  Thanks

     Luis


PS: If you would like to have some guidelines about how
to use cvs we will be happy to point you to some URLs.



=================================================================
cspl wrote:
> Dear Mr.Luis,
> 
>  
> 
> I have downloaded ur examples and tried to make it run. I have compiled 
> the total project once again and got new lib files after downloading 
> the newversion of RawImageIO.h and RawImageIO.txx.
> 
> But I am getting the following errors.
> 
> 
> :\ITK\Insight\Code\IO\itkRawImageIO.h(56) : error C2259: 
> 'RawImageIO<unsigned char,3>' : cannot instantiate abstract class due to 
> following members:
>         F:\ITK\Insight\Code\IO\itkRawImageIO.h(56) : while compiling 
> class-template member function 'class itk::SmartPointer<class 
> itk::RawImageIO<unsigned char,3> > __cdecl itk::RawImageIO<unsigned 
> char,3>::New(void)'
> F:\ITK\Insight\Code\IO\itkRawImageIO.h(56) : warning C4259: 'void 
> __thiscall itk::ImageIOBase::Write(void *)' : pure virtual function was 
> not defined
>         F:\ITK\Insight\Code\IO\itkImageIOBase.h(201) : see declaration 
> of 'Write'
>         F:\ITK\Insight\Code\IO\itkRawImageIO.h(56) : while compiling 
> class-template member function 'class itk::SmartPointer<class 
> itk::RawImageIO<unsigned char,3> > __cdecl itk::RawImageIO<unsigned 
> char,3>::New(void)'
> F:\ITK\Insight\Code\IO\itkRawImageIO.h(56) : error C2259: 
> 'RawImageIO<unsigned char,3>' : cannot instantiate abstract class due to 
> following members:
>         F:\ITK\Insight\Code\IO\itkRawImageIO.h(56) : while compiling 
> class-template member function 'class itk::SmartPointer<class 
> itk::RawImageIO<unsigned char,3> > __cdecl itk::RawImageIO<unsigned 
> char,3>::New(void)'
> F:\ITK\Insight\Code\IO\itkRawImageIO.h(56) : warning C4259: 'void 
> __thiscall itk::ImageIOBase::Write(void *)' : pure virtual function was 
> not defined
>         F:\ITK\Insight\Code\IO\itkImageIOBase.h(201) : see declaration 
> of 'Write'
>         F:\ITK\Insight\Code\IO\itkRawImageIO.h(56) : while compiling 
> class-template member function 'class itk::SmartPointer<class 
> itk::RawImageIO<unsigned char,3> > __cdecl itk::RawImageIO<unsigned 
> char,3>::New(void)'
> Error executing cl.exe.
> 
>  
> 
> ALL_BUILD - 2 error(s), 2 warning(s)
> 
>  
> 
>  
> 
> 
> When I used the  old version of lib files and rawimageio.h , I got the 
> exception.This is as follows.
> 
>  
> 
> Exception caught during Raw file reading
> itk::ExceptionObject (0012F1AC)
> Location: "Unknown"
> File: F:\ITK\Insight\Code\IO\itkRawImageIO.txx
> Line: 117
> Description: itk::ERROR: RawImageIO(00301640): Could not open file: 
> c:\diocmfile
> s\download\xyz\1.raw
> 
>  
> 
> I will try second example which is using FLTK. Actually I have 2D Image 
> raw files.(i.e.from CT scanner Images) . I  want to read and show it's 
> o/p in vtk.
> 
>  
> 
> Please help me in getting the output.
> 
>  
> 
>  
> 
> Thanking you,
> Reagards,
> Ramakrishna
>