[Insight-users] IBSR Data

Lydia Ng lng at insightful.com
Thu Jul 1 00:38:05 EDT 2004


Yasser,

This is a partial solution to what you want. The first step is to be able to
read the *.img files as a 3D itk::Image and then the second step is to create
the *.dcm files.

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

Each *.img in the IBSR dataset represent one 2D slice (in raw unsigned short
format) of a 3D volume.

If you want to read them into an ITK image you will have to convert/massage
them into a form that ITKIO can handle.

The most straightforward thing to do is to create a meta header for it.
The meta header is an ascii file. For example, for the 1_24 dataset a meta
header would look something like this:
--------------------------------

ObjectType = Image
NDims = 3
DimSize = 256 256 65
ElementType = MET_USHORT
HeaderSize = -1
ElementSpacing = 1 1 3
ElementByteOrderMSB = True
ElementDataFile = 1_24_%d.img -1 63 1

------------------------------------------
I.e the overall 3D image is (256 x 256) x 65 slices by composing files
1_24_-1.img, 1_24_0.img, 1_24_1.img, ... 1_24_63.img

The following is a table of starting slice, ending slice and number of total
slices you should use for each IBSR dataset if you want it to match up with
the corresponding IBSR segmentation file:

1_24  -1  63 65 
11_3   1  63 63 
110_3  0  63 64 
111_2  0  63 64 
112_2  1  63 63 
12_3   1  63 63 
13_3   1  63 63 
15_3   1  60 60 
16_3   1  60 60 
17_3   1  63 63 
191_3  1  63 63 
2_4    1  65 65 
202_3  1  63 63 
205_3  1  63 63 
4_8    7  67 61 
5_8    1  60 60 
6_10   1  63 63 
7_8    1  60 60 
8_4    1  63 63 

---------------------------------------------
Once you got the 3D image into ITK you possibly use the recently checked in 
itkGDCMImageIO - I am not familiar with GDCM - perhaps you post a specific
question on how to use this IO class.

Another (much less elegant) option is to write the image out back out as a
.mhd with one contiguous raw image file. I know that Osiris
(http://www.expasy.org/www/UIN/html1/projects/osiris/osiris.html)
let you read in a contiguous raw image file -- you have to fill in a form to
to tell it the dimension and spacing -- and it let write it back out as *.dcm
(but I don't know how much of the dicom fields are used / filled in).

Hope this help,
Lydia


-----Original Message-----
From: yasser salman [mailto:yass71 at yahoo.com] 
Sent: Wednesday, June 30, 2004 3:58 AM
To: insight-users at itk.org
Subject: [Insight-users] IBSR Data

hi luis 
can i found any software converting *.img to dicom
images
thanx..,yasser




More information about the Insight-users mailing list