[Insight-users] probably a buf in ITK writers??

Luis Ibanez luis.ibanez@kitware.com
Thu, 16 Jan 2003 09:34:18 -0500


Hi Zein,


Are you giving a filename with extension ".mha" or ".mhd"  ?

The ImageFileReader will only produce a MetaImageIO if one
of these two extensions are found in your filename.

About the absence of the raw file:  Could you verify the
size of the "mha" file.  MetaImage can write the header
and raw data in the same file or in separate files.

The default is to use the same file. So, probably you are
getting the full header + raw data in a single file.

Please let us know if this it the case,

If you want to control the options of MetaImageIO, it
is then important to create the ImageIO object by yourself
instead of relying on the automatic factory mechanism.

Factories will always give you a standard default
initialized ImageIO object.

When you instantiate directly the MetaImageIO object,
you have more control over the options. For example,
selecting to write in two separate files.


Let us know if you have further questions.


   Thanks


      Luis


-------------------------------------



salah wrote:

> Hello all,
> 
> I have a button in my user interface that simply saves a 3D image on the hard drive as a meta file, as a header file+ raw file. It first chooses a name for the output file using fl_file_chooser
> The problem looks like this:
> 1. when I press the saving-button for the first time during running the program and give a new file name, it report a file writing error. when I choose to overwrite one of the existing file, it works.
> 2. after the first time, if I give new file names, it works (but wrongly). I creats a new header file with the given name, but creates no raw file. Instead, it always overwrites the raw file of the firstly choosen name.
> 
> 
> Does anybody have an idea, what could the problem be? 
> Many thanks in advanced.
> 
> Zein
> 
> 
> ->8<------------->8<------------->8<------------->8<------------->8<------------->8<-
> Zein I. Salah 
> Universität Tübingen, WSI-GRIS, Sand 14, 72076 Tübingen 
> Email: salah@gris.uni-tuebingen.de  / zeinsalah@hotmail.com
> Tel.: (07071) 29 75465 (GRIS) , (07071) 25 69 43 (privat) 
> Fax: (07071) 29 54 66
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
> 
>