[Insight-users] metaIO in ITK

Wen Shi wsa18 at sfu.ca
Wed Mar 18 17:39:31 EDT 2009


Hi Guys,

I am confused by converting RAW image to Meta images.

When I was reading the software guide, it argues that:
"The direct use of raw file is strongly discouraged in medical imaging. It is always better to create
a header for a raw file by using any of the file formats that combine a text header file and a raw
binary file, like itk::MetaImageIO"

Then I refer to the documentation of MataImage, then I found a example:

/** We create a simple 3D metaObject with some properties */
 MetaObject tObj(3); // Create a 3D metaObject
 tObj.FileName("testObject.txt"); // Define the name of the file
 tObj.Comment("TestObject"); // Add some comments
 tObj.ObjectTypeName("Object"); // Define the type of the object
 tObj.ObjectSubTypeName("MinorObject"); // and the subtype as well
........................................
...........................................


I am kind of confused. in the guide it says we need to create a "header file"
What's the "header file"? is it some code header file similar to the above example ?
If you want to read in a RAW image, you write such a header file and include it to the program project?
(Like modify the "tObj.FileName("testObject.txt")" to be "tObj.FileName("testObject.raw")")?

Besides there is a .mhd file accompany the .raw file. How to deal with this pair of files?

Thanks a lot 

Wen Shi


More information about the Insight-users mailing list