how to convert DICOM to xyz with intensity value

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to convert DICOM to xyz with intensity value

devm13
This post was updated on .
Good Morning,

I tried to import DICOM Nifti into ImageJ and save to xyz format with getVoxelCloud plugin based on this discussion thread:
https://www.researchgate.net/post/How_can_I_obtain_voxel_coordinates_and_intensity_for_all_voxels_in_a_MRI_image

The Nifti file is 16-bit and can download at: http://bit.ly/2TJb9Gv
I was told it needs to change to image>type>32-bit in order to generate more accurate intensity value. The following is some of the output xyz txt file. The first column is the image serial number, and 2-4 columns are xyz valuve. I did not see the intensity value.

125   33 7 171
126   33 7 264
127   33 7 217
128   33 7 64
129   33 7 68
130   33 7 70
131   33 7 43
132   33 7 92
133   33 7 29
134   33 7 175
135   33 7 353
136   33 7 416
137   33 7 37
138   33 7 259
139   33 7 133
140   33 7 112
141   33 7 45
142   33 7 47

here are the codes of the plugin:
run("Clear Results");

requires("1.32f");
  title = getTitle;
  width = getWidth;
  height = getHeight;
  depth = nSlices;
  getPixelSize(unit, pw, ph, pd);
  path = getDirectory("image");

Vp_tmp = 0;

  f = File.open("");
  for (z=0; z<nSlices; z++) {
     setSlice(z+1);
     for (y=0; y<getHeight; y++) {
         for (x=0; x<getWidth; x++) {
             value = calibrate(getPixel(x,y));
             print(f, x + "  \t" + y + " \t" + z+ " \t" + value);
         }
     }
  }

Does anyone know how to convert a series of DICOM files into xyz coordinate with intensity value?
Thanks
SJ

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html


imagejoutput.JPG (146K) <http://imagej.1557.x6.nabble.com/attachment/5021498/0/imagejoutput.JPG>