Re[1] [Insight-users] Re: (HOW TO GETDATA)

lydia ycl ylydia at caramail.com
Mon Jan 7 19:13:46 EST 2002


I put both files in the same directory as you suggested.
The size of the decompressed brainweb is 6.77MB 
I'll try to create another mhd file without MSDEV and 
inform you about the result
Thanks again
Lydia

> -------Message d'origine-------
> De : Luis Ibanez <ibanez at choroid.cs.unc.edu>
> Date : 07/01/2002 18:04:46
> 
> 
> 
> Lydia,
> 
> 
> The process that you describe looks Ok.
> 
> Are the two files (header and raw data)
> in the same directory ?
> 
> The only suspicious thing I can see is 
> to create the header file with MSDEV. 
> [ There is nothing like Vim :-) ]
> 
> 
> Could you please post to the list: 
> 
> 1) the header file that you created
> attached to an email. 
> 
> 2) the EXACT size of the binary data file 
> that you got from the BrainWeb 
> (after decompression).
> 
> 
> It could be a mismatch between the header and
> the raw data file.
> 
> 
> Luis
> 
> =======================================
> 
> On Mon, 7 Jan 2002, lydia ycl wrote:
> 
> > Hi Luis and insight users!
> > Sorry to bother you again but I still have the
> > message "problems in reading file format"
> > That's wha I did
> > 
> > 1.I dowlowded the file and named it brainweb from the 
site
> > 
> > 2.I renamed it as .gz (under msdos) and unzipped it with
> > Gunzip
> > 
> > 3.I got a file whose size was nearly 6MB
> > 
> > 4.I renamed this file as a raw file
> > 
> > 5. I created from the MSDEV a text file (brain.mhd)
> > 
> > 6.I put on it the information concerning the pixel size 
and
> > thickness:
> > 181,217,181
> > MET_UCHAR
> > 1.0 1.0 1.0
> > False
> > brainweb.raw
> > I got this information from the site of course
> > 
> > 7.I run the Gaussian filter project
> > 
> > 8. I opened the file "brain.mhd"
> > 
> > 9. The result is the message "problems in ......file 
format"
> > 
> > Is there any mistake in what I did?
> > 
> > Thanks again to reply and sorry for the disturbs
> > 
> > Regards
> > 
> > Lydia
> > 
> > > -------Message d'origine-------
> > > De : Luis Ibanez 
> > > Date : 07/01/2002 16:10:30
> > >
> > >
> > > Hi Lydia,
> > >
> > > The file that you get from the BrainWeb is named
> > > "brainwe1" with no extension.
> > >
> > > You might want to change its extension to ".gz" in
> > > order to make gunzip recognize the file as a 
compressed
> > > file.
> > >
> > > Once decompressed, you should find only one file
> > > which is the raw binary data for the image. The file,
> > > again is lacking any extension. We use to rename it
> > > and put the extension ".raw", but this is purely a
> > > convention.
> > >
> > > The information concerning the size in pixels and the
> > > resolution in milimeters of the image was displayed
> > > in the second page of the BrainWeb download sequence.
> > > You will need this information for writing the 
MetaImage
> > > header file.
> > >
> > >
> > > Hope that helps.
> > >
> > > Luis
> > >
> > > ======================================
> > >
> > > On Sun, 6 Jan 2002, lydia ycl wrote:
> > >
> > > > Dear Luis,
> > > > I followed all the instructions but I foud a 
problem in
> > > > decompression with GUNZIP and even with Winzip
> > > > for /compression option) for Windows platform
> > > > Do you get after decompression 2 files? what are the
> > > > extensions?
> > > > Sorry for bothering you again.
> > > > Regards
> > > > Lydia
> > > >
> > > > > -------Message d'origine-------
> > > > > De : Luis Ibanez
> > > > > Date : 04/01/2002 19:53:32
> > > > >
> > > > >
> > > > > Hi Lydia,
> > > > >
> > > > >
> > > > > On Fri, 4 Jan 2002, lydia ycl wrote:
> > > > > > it's a pity for the operating room project.
> > > > >
> > > > > ???
> > > > > Did you have further problems after updating your 
ITK
> > > > checkout ?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > > For the Gaussian filter project, I couldn't find
> > which
> > > > > > image format should I use. I tried many of them 
but
> > each
> > > > > > time it failed in reading the file. May I ask 
you to
> > > > give
> > > > > > me the right format (even pgm didn't work)
> > > > >
> > > > >
> > > > > The format that GaussianFilter is accepting
> > > > is "MetaImage".
> > > > > Here is how you can create one image in the 
appropiate
> > > > format.
> > > > >
> > > > > Metaimages are composed of a Header file and a Raw
> > data
> > > > file.
> > > > > You can get raw data from the BrainWeb project and
> > write
> > > > the
> > > > > corresponding MetaImage header for it.
> > > > >
> > > > > Do the following:
> > > > >
> > > > > 1) In order to get RAW data, go to :
> > > > >
> > > > >
> > > >
> > 
http://www.bic.mni.mcgill.ca/brainweb/selection_normal.html
> > > > >
> > > > > - Select the Image modality you prefer : T1, T2, 
PD
> > > > > - Select "Slice Thickness" = 1mm
> > > > > - Select "Noise" = 3
> > > > > - Select "non-uniformity" = 20
> > > > >
> > > > > then click in Download.
> > > > > That will prompt you to another web page where you
> > have
> > > > > a header file (which is different from the 
MetaImage
> > > > header),
> > > > > and a new set of selections:
> > > > >
> > > > > - Select "File format" = raw byte (this is very
> > > > important)
> > > > > - Select "Compression" = gunzip (you'll get a .gz
> > file)
> > > > >
> > > > > and fill out your name, institution and e-mail
> > > > > this will help them to get funding for continuing
> > > > > with their project. :-)
> > > > >
> > > > > Then, click on "Start download"
> > > > >
> > > > > you will be prompted to provide a file name for 
the
> > data.
> > > > >
> > > > > Then, sit back, relax and take your coffee while 
the
> > > > > about 5Mb got copied into your machine.
> > > > >
> > > > > When you are done with the download, decompress 
the
> > > > > file with "gunzip". You should get a text header 
and
> > > > > a raw data file.
> > > > >
> > > > >
> > > > > 2) In order to create the MetaImage header, cut 
paste
> > > > > the following lines in a "new" file with extension
> > > > > ".mhd".
> > > > >
> > > > >
> > > > > NDims = 3
> > > > > DimSize = 181 217 180
> > > > > ElementType = MET_UCHAR
> > > > > ElementSpacing = 1.0 1.0 1.0
> > > > > ElementByteOrderMSB = False
> > > > > ElementDataFile = brainweb165a10f17.raw
> > > > >
> > > > >
> > > > >
> > > > > Now,
> > > > > replace the values in front of DimSize for the 
image
> > size
> > > > > that is indicated in the text header file that you
> > > > > got from BrainWeb. You should use the values 
indicated
> > > > > under the "length" column as : ( xspace, yspace,
> > zspace).
> > > > >
> > > > > Keep the MET_UCHAR because you selected "raw byte
> > > > > (unsigned)" at BrainWeb.
> > > > >
> > > > > Change the "ElementDataFile" = "brainweb...." for
> > > > > the name of the raw data file that you just 
downloaded
> > > > > from the BrainWeb project.
> > > > >
> > > > >
> > > > >
> > > > > 3) That's it !
> > > > >
> > > > >
> > > > >
> > > > > Now you should be able to load this file from the
> > > > > GaussianFilter program. Select "File->Open" from
> > > > > the bar menu, and look for the ".mhd" header file.
> > > > >
> > > > > Make sure that the raw data file and the header 
file
> > > > > are in the same directory.
> > > > >
> > > > >
> > > > > Take into account that the load will take a couple
> > > > > of seconds because the file is about 5Mb.
> > > > >
> > > > > You might want also to check the amount of RAM 
memory
> > > > > in your machine to make sure that it can handle 
all
> > > > > the intermediary images.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Please let us know if you encounter any 
dificulties
> > > > > creating this data file.
> > > > >
> > > > >
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > > > Luis
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > Insight-users mailing list
> > > > > Insight-users at public.kitware.com
> > > > > 
http://public.kitware.com/mailman/listinfo/insight-
> > users
> > > > >
> > > > >
> > > >
> > 
_________________________________________________________
> > > > Le journal des abonnés Caramail -
> > http://www.carazine.com
> > > >
> > > >
> > >
> > > --
> > > Luis Ibanez CB#:
> > 7060
> > > Research Assistan Professor phone:
> > (919) 843 5436
> > > Division of Neurosurgery fax:
> > (919) 966 6627
> > > University of North Carolina at Chapel Hill email:
> > ibanez at cs.unc.edu
> > > Chapel Hill, NC 27599-7060
> > http://www.cs.unc.edu/~ibanez
> > >
> > >
> > > _______________________________________________
> > > Insight-users mailing list
> > > Insight-users at public.kitware.com
> > > http://public.kitware.com/mailman/listinfo/insight-
users
> > >
> > >
> > 
_________________________________________________________
> > Le journal des abonnés Caramail - 
http://www.carazine.com
> > 
> > 
> 
> -- 
> Luis Ibanez CB#: 
7060
> Research Assistan Professor phone: 
(919) 843 5436
> Division of Neurosurgery fax: 
(919) 966 6627
> University of North Carolina at Chapel Hill email: 
ibanez at cs.unc.edu
> Chapel Hill, NC 27599-7060 
http://www.cs.unc.edu/~ibanez
> 
> 
> 
>
_________________________________________________________
Le journal des abonnés Caramail - http://www.carazine.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Brain.mhd
Type: application/octet-stream
Size: 138 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20020107/b79c97ce/attachment.obj>


More information about the Insight-users mailing list