[Insight-users] How can I read a .raw file and save it as multi slices/files?

phuong trinh pham ngoc equationsupertrinh at hotmail.com
Tue Nov 3 07:16:22 EST 2009


Hello everyone,
I have a "series2.raw" file together with it's header file "series2.mhd". The content of this ".mhd" file is as follows:

ObjectType = Image 
NDims = 3 
BinaryData = True 
BinaryDataByteOrderMSB = False 
ElementSpacing = 0.449 0.449 0.600 
DimSize = 512 512 246 
ElementType = MET_USHORT 
ElementDataFile = series2.raw

This raw file includes many image files as slices. I received this but did not know anything more about how many slices there are in this ".raw " file. I tried to read this ".raw" file by ITK 2.4.8 through both ".raw" file and ".mhd" file. I think I can read it. However, the problem is the work after that. I do not know how to extract the slices in this raw file correctly. 

1. I used the code from "Examples/IO/DicomSeriesReadSeriesWrite.cxx" to write multiple slices. It did create 245 images but there is big distorsions in all images (slices). I checked on the internet and retrieved many anwsers. It is said that this was caused by the lack of orientation and etc. I found out that we can correct this problem by setting the metadatadictionaryArray through SetMetaDataDitionaryArray. But I do not know how to do it and how I can get the information of this metadatadictionaryarray. Is MetaDataDictionaryArray the list of all slice filenames? If I know how many slices there are in that raw file, CAN ITK help us to extract corectly?

2. Anyone know how to extract the slices from this ".raw" file correctly? I do not need to save it as DICOM slices. All I need is to extract all slices from this .raw file correctly so that I can have all slices as multi images in normal formats such as JPG, BMP or DICOM. 

Thanks in advance! Hope that I can have the answer for this problem which I've tried my best to solve but hopeless :( .
Looking forward to your replies!
Regards,
Phuong Trinh.

 		 	   		  
_________________________________________________________________
Windows Live Hotmail: Your friends can get your Facebook updates, right from Hotmail®.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091103/55ee9601/attachment.htm>


More information about the Insight-users mailing list