<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241743</link>
    <title>MATLAB Central Newsreader - point cloud generation</title>
    <description>Feed for thread: point cloud generation</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 31 Dec 2008 02:53:02 -0500</pubDate>
      <title>point cloud generation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241743#619340</link>
      <author>maya </author>
      <description>can anybody suggest a method to to fiind the co-ordinates of the points on CT slices&lt;br&gt;
(CT slices contain the intensity values of the points)</description>
    </item>
    <item>
      <pubDate>Wed, 31 Dec 2008 03:54:01 -0500</pubDate>
      <title>Re: point cloud generation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241743#619343</link>
      <author>Image Analyst</author>
      <description>&quot;maya&quot; &amp;lt;mayaeapen@googlenews.com&amp;gt; wrote in message &amp;lt;gjemqe$2bq$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; can anybody suggest a method to to fiind the co-ordinates of the points on CT slices&lt;br&gt;
&amp;gt; (CT slices contain the intensity values of the points)&lt;br&gt;
---------------------------------------------------------------------------------&lt;br&gt;
maya:&lt;br&gt;
This will find coordinates of a certain value (88 in this example)&lt;br&gt;
clc;&lt;br&gt;
close all;&lt;br&gt;
% Read in a slice image from MATLAB demo images.&lt;br&gt;
sliceImage = imread('mri.tif');&lt;br&gt;
% Display it.&lt;br&gt;
subplot(1,2,1);&lt;br&gt;
imshow(sliceImage);&lt;br&gt;
&lt;br&gt;
% Let's look for values of 88;&lt;br&gt;
valueToLookFor = 88;&lt;br&gt;
[rows columns] = find(sliceImage == valueToLookFor);&lt;br&gt;
% Every index from 1 to length(rows) gives the row and column&lt;br&gt;
% of a pixel that has value of 100 if you look in the rows() array and the columns()&lt;br&gt;
% array in the same index for each.&lt;br&gt;
&lt;br&gt;
% Binarize the image and display those values with 100.&lt;br&gt;
binarizedImage = (sliceImage == valueToLookFor);&lt;br&gt;
subplot(1,2,2);&lt;br&gt;
imshow(binarizedImage);&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
ImageAnalyst</description>
    </item>
    <item>
      <pubDate>Sat, 03 Jan 2009 02:23:01 -0500</pubDate>
      <title>Re: point cloud generation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241743#619645</link>
      <author>maya </author>
      <description>hai,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;Thanks for giving suggestion.I think i was not clear in the question. My work is to &lt;br&gt;
stack up all the the acquired CT slices along one axis and then find the coordinates of &lt;br&gt;
the points on the stacked image.&lt;br&gt;
Thanks in advance&lt;br&gt;
Maya</description>
    </item>
    <item>
      <pubDate>Sat, 03 Jan 2009 04:19:19 -0500</pubDate>
      <title>Re: point cloud generation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241743#619656</link>
      <author>ImageAnalyst</author>
      <description>maya:&lt;br&gt;
OK thanks,  it's now clear as mud.  What do you mean by&lt;br&gt;
&quot;coordinates&quot;?  The index or voxel coordinates of the &quot;point&quot; are&lt;br&gt;
simply the x,y,z indexes of the array.  If you want &quot;real-world&quot;&lt;br&gt;
coordinates, such as in millimeters, then you have to convert the&lt;br&gt;
x,y,z coordinates  or distances into real-world coordinates using a&lt;br&gt;
spatial calibration that you have done.&lt;br&gt;
Regards,&lt;br&gt;
ImageAnalyst</description>
    </item>
    <item>
      <pubDate>Sat, 03 Jan 2009 17:08:01 -0500</pubDate>
      <title>Re: point cloud generation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241743#619717</link>
      <author>Sven </author>
      <description>ImageAnalyst &amp;lt;imageanalyst@mailinator.com&amp;gt; wrote in message &amp;lt;7a888811-3ce0-4434-a4ef-5d1edf8806d4@f3g2000vbf.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; maya:&lt;br&gt;
&amp;gt; OK thanks,  it's now clear as mud.  What do you mean by&lt;br&gt;
&amp;gt; &quot;coordinates&quot;?  The index or voxel coordinates of the &quot;point&quot; are&lt;br&gt;
&amp;gt; simply the x,y,z indexes of the array.  If you want &quot;real-world&quot;&lt;br&gt;
&amp;gt; coordinates, such as in millimeters, then you have to convert the&lt;br&gt;
&amp;gt; x,y,z coordinates  or distances into real-world coordinates using a&lt;br&gt;
&amp;gt; spatial calibration that you have done.&lt;br&gt;
&amp;gt; Regards,&lt;br&gt;
&amp;gt; ImageAnalyst&lt;br&gt;
&lt;br&gt;
Maya, how about this interpretation of your question:&lt;br&gt;
&lt;br&gt;
You have a voxel volume of n x m x p images, where n x m is the size of one slice, and p is the number of slices. You want to know where, in 3d (xyz mm) space, each pixel is located. Is this correct?&lt;br&gt;
&lt;br&gt;
To find the coordinate location in the &quot;p&quot; direction (ie, Z direction), you can check the dicominfo() results for that slice. Namely:&lt;br&gt;
di = dicominfo(pthSliceFileName);&lt;br&gt;
xyz = di.ImagePositionPatient;&lt;br&gt;
&lt;br&gt;
This xyz variable will now contain the location (in mm) of the corner pixel of your CT slice. Checking the di.PixelSpacing quantity along with the di.Rows and di.Columns can give you the number of pixels and (mm) distance between pixels in the n and m directions.&lt;br&gt;
&lt;br&gt;
Does this help you out at all or am I off target?&lt;br&gt;
&lt;br&gt;
If you get 3 arrays that specify the X, Y, Z locations (in mm) of each of the indices in the n, m, p directions, you can use ImageAnalyst's suggestion above to link from a pixel index to a real 3d XYZ coordinate.&lt;br&gt;
&lt;br&gt;
Cheers,&lt;br&gt;
Sven. </description>
    </item>
    <item>
      <pubDate>Sat, 03 Jan 2009 18:42:30 -0500</pubDate>
      <title>Re: point cloud generation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241743#619733</link>
      <author>ImageAnalyst</author>
      <description>I wasn't talking about using 3 arrays.&lt;br&gt;
&lt;br&gt;
I'm talking about using ONE 3D array where you have 3 indexed&lt;br&gt;
dimensions, one for x, one for y, and one for z.  Or you could have&lt;br&gt;
just one 2D array (if you can't fit the whole 3D image into memory at&lt;br&gt;
one time), just so long as you know what the slice number (z index) of&lt;br&gt;
the current slice is.  Then the &quot;coordinates of the points&quot; (sic, her&lt;br&gt;
words) are just simply the x,y,z coordinates (units are in pixels,&lt;br&gt;
voxels) or in mm if you can convert the x,y,z into mm.  Sven just&lt;br&gt;
paraphrased what I said, so we're in complete agreement.  For example&lt;br&gt;
if you have 0.5 mm per pixel, and you're looking at pixel (100, 200,&lt;br&gt;
50) then in millimeters that would be (50, 100, 25).  It's as simple&lt;br&gt;
as that.  Or it can be.  It can get a little more complex if the z&lt;br&gt;
calibration (slice separation) is not the same as the x,y lateral&lt;br&gt;
resolution, plus the fact that you have to image an object of known&lt;br&gt;
dimensions to determine your spatial calibration in all 3 directions,&lt;br&gt;
not to mention partial volume averaging, beam hardening, and&lt;br&gt;
reconstruction artifacts that complicate things.  But I doubt maya&lt;br&gt;
needs to worry about any of those latter things yet.  You may be able&lt;br&gt;
to read the spatial calibrations out of the header of the (DICOM or&lt;br&gt;
whatever-format) file (if you trust it), or calculate it on your own&lt;br&gt;
using your object of known dimensions (I have seen discrepancies&lt;br&gt;
between the two methods).</description>
    </item>
    <item>
      <pubDate>Sat, 03 Jan 2009 19:01:03 -0500</pubDate>
      <title>Re: point cloud generation</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241743#619737</link>
      <author>Matt </author>
      <description>&quot;maya&quot; &amp;lt;mayaeapen@googlenews.com&amp;gt; wrote in message &amp;lt;gjemqe$2bq$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; can anybody suggest a method to to fiind the co-ordinates of the points on CT slices&lt;br&gt;
&amp;gt; (CT slices contain the intensity values of the points)&lt;br&gt;
&lt;br&gt;
See &quot;help cat&quot; to find out how to stack the slices into a 3D array.&lt;br&gt;
&lt;br&gt;
See &quot;help find&quot; and &quot;help ind2sub&quot; to get the image coordinates. </description>
    </item>
  </channel>
</rss>

