[Insight-users] about example---MetaImageImporter

zhuo Chen cz_lj@yahoo.com.cn
Mon, 24 Mar 2003 09:47:35 +0800 (CST)


--0-1261929360-1048470455=:81692
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
Content-Id: 
Content-Disposition: inline

Hi,all ITK users
I want to convert a series of DICOM files to VTK
files.A few days ago, I asked how to realize the
conversion and I got the answer that I must make use
of two examples-------MetaImageImporter and
MetaImageReadWrite.In my using of these two examples,I
encountered some problems.I think I should execute
MetaImageImporter first,and produce a(or some) output
file(s).Next,I use the output file(s) as the input
file(s) of MetaImageReadWrite,and produce a(or some)
VTK file(s).The total number of my DICOM input files
is 18. Every file is about 500k.But after I executed
MetaImageImporter,the program only produced one file
which is less than 1k.I think maybe there some errors
in my input information to the program.In my
accessory,I tell you the information I input to the
program(I think you need read my DICOM file at same
time,but this mailing list doesn't allow such a big
mail,so if some of you can help me,please give me your
own email address and I send the dicom file to you).
Please help me find the errors. Thank you!In the
program, I am puzzled that the program doesn't ask me
to input the directory which the DICOM files locate.
How does the program find my DICOM files?


_________________________________________________________
Do You Yahoo!? 
更多惊喜,同样精彩,NetVista A30 热卖
http://ad.cn.doubleclick.net/clk;5313999;7930402;p?http://www.ibm.com/cn/promotion/pc/netvista_a30/index.shtml
--0-1261929360-1048470455=:81692
Content-Type: text/plain; name="input information.txt"
Content-Description: input information.txt
Content-Disposition: inline; filename="input information.txt"

What is the name of the '.mhd' file that you want to create? 
Please include '.mhd' at the end. ------> DicomtoVtk.mhd

What is the dimensionality of your data<1,2,3,....>? ------>3

Assumeing dimension 0 is the 'x' dimension...
How large is dimension 0 ------>512
How large is dimension 1 ------>512
How large is dimension 2 ------>18 (the total number of DICOM files)

Points in an image represent a measure in physical space.
  Measures in physical space are done using a particular
  aperature spacing - that is, what is the spacing of the 
  points in your data...if you don't know/care,answer 1.
 What is the point spacing in dimension 0? ------>0.44
 What is the point spacing in dimension 1? ------>0.44
 What is the point spacing in dimension 2? ------>5 (the spacing of two DICOM files in Z axis)

Images are taken of a particular location in space.
  That is, they have an origin in space...if you don't
  know/care, answer 0 for each dimension.
 What is the origin in dimension 0? ------>0
 What is the origin in dimension 1? ------>0
 What is the origin in dimension 2? ------>0 (I don't know these information)

Is your data stored using MSB byte ordering?
 Data written on a 'PC' is in 'Little-endian' byte order.
 Data from almost every other machine is in 'Big-endian' byte order.
 If your data  was written on a 'PC', enter 0.
 Otherwise, if you data was written on a Mac/Sun/Other, enter 1.
 ------>0

How many channels are stored at each point in your image?
 For example, RGB images have 3 channels, and most medical images have a single channel.
 ------>1

What is the 'type' of the elements in your data:
0 - signed char <one byte>
1 - unsigned char
2 - signed short <two byte>
3 - unsigned short
4 - signed int <four byte>
5 - unsigned int 
6 - float <four byte>
7 - double <eight byte>
------>4 (I don't know how to choose)

How is the data stored ?
 0 - in one file
 1 - in one file per slice <e.g., like dicom>
------>1

Size of the header that must be skipped to reach the data in the file(s)?
  Enter 0 to not skip a header, -1 to have MetaImageReader automatically
  calculate the headersize assuming the data is at the end of the file,
  or enter the headersize.
------>-1

You've got two options when doing one file per slice:
  0 - Listing the name of each slice in the .mhd file
  1 - Specifying a 'fprintf' style string and min,max,and step values for integers
      to be substituted into that string to specify the numbered files that are slices.
      For example, use data.%3d to match data.000,data.001,data.002...If you don't
      know what we are talking about,choose option 0.
------>0

What is the dimension of the data stored in files?
It must be less than or equal to nDims<3> Enter 2 for typical image slice data.
------>2

Filename of slice 0 ------> DicomtoVtk0
Filename of slice 1 ------> DicomtoVtk1
Filename of slice 2 ------> DicomtoVtk2
Filename of slice 3 ------> DicomtoVtk3
Filename of slice 4 ------> DicomtoVtk4
Filename of slice 5 ------> DicomtoVtk5
Filename of slice 6 ------> DicomtoVtk6
Filename of slice 7 ------> DicomtoVtk7
Filename of slice 8 ------> DicomtoVtk8
Filename of slice 9 ------> DicomtoVtk9
Filename of slice 10 ------> DicomtoVtk10
Filename of slice 11 ------> DicomtoVtk11
Filename of slice 12 ------> DicomtoVtk12
Filename of slice 13 ------> DicomtoVtk13
Filename of slice 14 ------> DicomtoVtk14
Filename of slice 15 ------> DicomtoVtk15
Filename of slice 16 ------> DicomtoVtk16
Filename of slice 17 ------> DicomtoVtk17

You are done!

Please press any key to continue!
--0-1261929360-1048470455=:81692--