[Insight-users] raw data to .img

Atwood, Robert C r.atwood at imperial.ac.uk
Wed Mar 14 06:51:45 EST 2007


According to

 http://www.bic.mni.mcgill.ca/brainweb/about_data_formats.html 

"The header information is not downloaded, but just displayed at the top of the download page"
You may need to write your own header based on the information displayed in the webpage when you download. Here's one I did for my own purposes, allowing the raw, unsigned, byte file called 'thr_Vthin.raw' to be easily read by an ITK file reader, you would need to change ElementDataFile to point to your file, I believe this needs to be the last line in the file. In my case the voxel spacing is uniform  so you would need to change ElementSpacing accordingly (and of course DimSize)
I just save this text in 'thr_Vthin.mhd' and use that filename in myreader->SetFileName()
 

ObjectType = Image
NDims = 3
BinaryData = True
BinaryDataByteOrderMSB = False
TransformMatrix = 1 0 0 0 1 0 0 0 1
Offset = 0 0 0
CenterOfRotation = 0 0 0
AnatomicalOrientation = RPI
ElementSpacing = 1 1 1
DimSize = 100 100 100
ElementType = MET_UCHAR
ElementDataFile = thr_Vthin.raw

> -----Original Message-----
> From: insight-users-bounces+r.atwood=imperial.ac.uk at itk.org 
> [mailto:insight-users-bounces+r.atwood=imperial.ac.uk at itk.org]
>  On Behalf Of Jesús Spí­nola
> Sent: 14 March 2007 11:05
> To: Xavier Penya
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] raw data to .img
> 
> You can read them with a Meta header file ( *.mhd, *.mha ). 
> I'm sure the corresponding *mhd's for that datasets are also 
> available in the brainweb webpage. Then you can read them 
> with the itkImageFileReader class. 
> 
> Hope it helps!
> 
> 
> On 3/14/07, Xavier Penya <xavierpenya at hotmail.com> wrote:
> 
> 	I have download some samples from the Simulated Brain 
> Database 
> (http://www.bic.mni.mcgill.ca/brainweb/selection_normal.html 
> ) and I can just download them in the formats .rawb, .raws or .mnc.
> 	
> 	I need to read them with the ITK library, so I don't 
> now how can I convert them.
> 	
> 	Thanks a lot,
> 	
> 	    Xavier
> 	
> 	
> ________________________________
> 
> 	Busca desde cualquier página Web con una protección 
> excepcional. Consigue la Barra de herramientas de Windows 
> Live hoy mismo y GRATUITAMENTE. Pruébalo 
> <http://www.toolbar.live.com> 
> 
> 	_______________________________________________
> 	Insight-users mailing list
> 	Insight-users at itk.org
> 	http://www.itk.org/mailman/listinfo/insight-users 
> <http://www.itk.org/mailman/listinfo/insight-users> 
> 	
> 	
> 
> 
> 


More information about the Insight-users mailing list