[Insight-users] meta writers problem
Stephen R. Aylward
aylward@unc.edu
Tue, 22 Oct 2002 09:50:33 -0400
Hi,
This was actually how I intended metaImage to work. I find it
safer/simpler to append .raw to files, than to try to substitute the
last three letters or enforce a naming convention. There is a bit of
history to this as well - traditionally, .mha is reserved for metaFiles
in which the header and the data appears together (metaHeaderAll) and
.mhd is reserved for metaFiles containing only header data (metaHeaDer)
and that point to data (.raw) files. But to try to enforce this I
would have to sometimes convert suffixes from .mhd to .mha, or append
one or the other suffix and possibly .raw. To understand that behavior
seemed more complex, so I went with something simple...
You can also do a "m_Writer->SetDataFileName("LOCAL");" and it will
write your header and data to the same file and that way the .raw file
won't be created - it that more appropriate for what you intend?
Thanks,
Stephen
Zein Salah wrote:
> hello friends,
>
> I thing there is a bug in the Meta file writers (or by me). The problem is:
>
> 1. when I define the file name like this (for example)
> m_Writer->SetFileName( "myfile" ); // with no extention
> then the following two file will be produced
> myfile (no extention)
> myfile.raw
> 2. when I define the file name like this
> m_Writer->SetFileName( "myfile.mha" );
> then the following two file will be produced
> myfile.mha
> myfile.mha.raw
>
> I expect the produced two file to have the names:
> myfile.mha
> myfile.raw
>
>
>
> Do anybody have an idea where could the problem be?
>
> many thanks,
> 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 <mailto:salah@gris.uni-tuebingen.de>
> / zeinsalah@hotmail.com <mailto:zeinsalah@hotmail.com>
> Tel.: (07071) 29 75465 (GRIS) , (07071) 96 44 39 (privat)
> Fax: (07071) 29 54 66
--
===============================================
Dr. Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://caddlab.rad.unc.edu
aylward@unc.edu
(919) 966-9695