[Insight-users] Re: About Io problem

Luis Ibanez luis.ibanez at kitware.com
Thu Oct 14 12:28:40 EDT 2004


Hi Zhuyiyang,

You are using a *VERY VERY OLD* version of ITK.

The file "FileIOToImageFilter" doesn't exist anymore.

This class was deprecated in September 5th 2002,
(more than two years ago.)
http://www.itk.org/cgi-bin/viewcvs.cgi/Code/BasicFilters/Attic/itkFileIOToImageFilter.h?rev=1.23&root=Insight&view=log

The functionality of that filter is now provided by
the IO framework.

Please read the ITK Software Guide

        http://www.itk.org/ItkSoftwareGuide.pdf

in particular the chapter on "Reading and Writing Images".
This is Chapter 7, pdf-pages 219 - 240.


The associated examples are available in

          Insight/Examples/IO

You should also read the Tutorials

      http://www.itk.org/HTML/Tutorials.htm

in particular the "Getting Started I" session:

http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/index.htm


That will save you a lot of time.

We also *strongly* recommend you to start using ITK 1.8,
that is the latest release of ITK.


Reading an image in ITK is quite easy,
just follow the instructions in the documentation above.


Regards,


    Luis



------------
?? ? wrote:

> Hi Luis
> Tangks for your replay.
> The problem still exists.That is  I still can not read raw image,with a 
> corresponding .mhd file and a header file like this
> #include "itkImage.h"
> #include "itkImageFileReader.h"
> #include "itkImageFileWriter.h"
> #include "itkImageRegionConstIterator.h"
> #include "itkImageRegionIterator.h"
> #include "itkRAWimageIO.h"
> #include "itkMetaimageIO.h"
> 
> typedef itk::ImageFileReader< ImageType >        ReaderType;
> typedef itk::ImageFileWriter< ImageType >         WriterType;
> typedef itk::FileIOToImageFilter< ImageType >    ImageIOType;
> There is compiling error indicating error C2039: 'FileIOToImageFilter' : 
> is not a member of 'itk'
> Can you give me an example?
> 
> Another problem
> the function
> void SetImportPointer (PixelType *ptr, Dimension long num, bool
> LetFilterManageMemory) ,I use it for other purpose ,Ijust have the 
> pboblem about the memory gathering.The problem is describled as
> if  I use a void* pITKBuffer here, and when to call the
> 
>> SetImportPointer() function, cast  void* pITKBuffer to PixelType* 
>> pITKBuffer to fit in the parameter, and then  I set  
>> LetFilterManageMemory true,it means ITK do the delete buffer task,so 
>> problem comes,I should have deleted  the buffer as 
>> delete[](PixelType*)pITKBuffer,but can ITK do this with a cast to 
>> delete the void pointer?
> 
> 
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE* 
> http://join.msn.com/?page=features/virus
> 
> 
> 






More information about the Insight-users mailing list