[Insight-users] Getting data in and out of ITK

William A. Hoffman bill.hoffman at kitware.com
Thu Feb 14 13:31:07 EST 2002


Your code looks perfect, unfortunately ITK is not.  The Write on RawImageIO 
is not yet implemented, but
will be soon.   For now try using  itk::RawImageWriter instead of 
itk::ImageFileWriter, the only thing
you will have to change is tghe SetImageIO(write_io); line which should be 
removed.

BTW, how long is "some time"?

-Bill


At 06:52 PM 2/14/2002 +0100, Bjorn Hanch Sollie wrote:
>Hello to you all,
>
>I have been struggling for some time now trying to get 3D raw image
>data in and out of ITK.  Basically what I wish to do is this:
>
>read data into buffer -> filters -> write output buffer to disk
>
>or in other words:
>
>Read data, filter calls reader->GetOutput(), another filter calls
>filter->GetOutput() etc., writer calls filter->GetOutput(), write
>data.
>
>I've studied the examples, but unfortunately I have so far been unable
>to use the techniques they provide to fit my own needs and actually
>produce meaningful output.  (Yes, I'm aware that there are minor
>hitches, such as, for example, that some filters require data of
>certain types.)
>
>I have attached a simple sample program (it's just short over 50
>lines) that attempts to just read some image data into a buffer, ready
>to be accessed by a filter and write the processed data back to disk,
>the present problem being that it doesn't produce any output at all.
>
>I will be most grateful if any one of you are willing to bear with me,
>take a look at it and give me some hints as to what I need to
>do/change in order to make it work accoding to my wishes.
>
>-Beorn
>--
>The History of the Universe
>Chapter 1: Bang!  Chapter 2: Sss...  Chapter 3: Crunch!
>The End





More information about the Insight-users mailing list