<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244188</link>
    <title>MATLAB Central Newsreader - sagittal slice from a txt file</title>
    <description>Feed for thread: sagittal slice from a txt file</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>Tue, 10 Feb 2009 11:21:02 -0500</pubDate>
      <title>sagittal slice from a txt file</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244188#627296</link>
      <author>Nico zanette</author>
      <description>Hello&lt;br&gt;
I'm in trouble, I need to obtain a MR image from a txt file. &lt;br&gt;
The file contains a single column of data, with each row representing a different voxel in the grid. The data file was generated using the following ordering of grid cells: &lt;br&gt;
&lt;br&gt;
for kk=1:s3 &lt;br&gt;
&amp;nbsp;&amp;nbsp;for jj=1:s2 &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for ii=1:s1 &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fprintf(fid,'%1.1f\n',ARRAY(ii,jj,kk)); &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end &lt;br&gt;
&amp;nbsp;&amp;nbsp;end &lt;br&gt;
end &lt;br&gt;
where the dimension of ARRAY is [s1 x s2 x s3] &lt;br&gt;
&lt;br&gt;
I need to transform this file into a 3d image. After this i need to take sagittal slices from the 3d image.&lt;br&gt;
&lt;br&gt;
Somebody can help me?&lt;br&gt;
&lt;br&gt;
Thanks.</description>
    </item>
    <item>
      <pubDate>Tue, 10 Feb 2009 12:11:02 -0500</pubDate>
      <title>Re: sagittal slice from a txt file</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244188#627305</link>
      <author>David </author>
      <description>&quot;Nico zanette&quot; &amp;lt;zannakill@hotmail.com&amp;gt; wrote in message &amp;lt;gmrnuu$hdo$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello&lt;br&gt;
&amp;gt; I'm in trouble, I need to obtain a MR image from a txt file. &lt;br&gt;
&amp;gt; The file contains a single column of data, with each row representing a different voxel in the grid. The data file was generated using the following ordering of grid cells: &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; for kk=1:s3 &lt;br&gt;
&amp;gt;   for jj=1:s2 &lt;br&gt;
&amp;gt;     for ii=1:s1 &lt;br&gt;
&amp;gt;       fprintf(fid,'%1.1f\n',ARRAY(ii,jj,kk)); &lt;br&gt;
&amp;gt;     end &lt;br&gt;
&amp;gt;   end &lt;br&gt;
&amp;gt; end &lt;br&gt;
&amp;gt; where the dimension of ARRAY is [s1 x s2 x s3] &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I need to transform this file into a 3d image. After this i need to take sagittal slices from the 3d image.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Somebody can help me?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks.&lt;br&gt;
&lt;br&gt;
well, i would guess the first step is to reverse the writing process to read the data back into the workspace.  Then its just a simple matter of displaying it however you want.</description>
    </item>
    <item>
      <pubDate>Tue, 10 Feb 2009 13:48:02 -0500</pubDate>
      <title>Re: sagittal slice from a txt file</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244188#627326</link>
      <author>Nico zanette</author>
      <description>&quot;David&quot; &amp;lt;dave@bigcompany.com&amp;gt; wrote in message &amp;lt;gmrqsl$lnt$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Nico zanette&quot; &amp;lt;zannakill@hotmail.com&amp;gt; wrote in message &amp;lt;gmrnuu$hdo$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hello&lt;br&gt;
&amp;gt; &amp;gt; I'm in trouble, I need to obtain a MR image from a txt file. &lt;br&gt;
&amp;gt; &amp;gt; The file contains a single column of data, with each row representing a different voxel in the grid. The data file was generated using the following ordering of grid cells: &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; for kk=1:s3 &lt;br&gt;
&amp;gt; &amp;gt;   for jj=1:s2 &lt;br&gt;
&amp;gt; &amp;gt;     for ii=1:s1 &lt;br&gt;
&amp;gt; &amp;gt;       fprintf(fid,'%1.1f\n',ARRAY(ii,jj,kk)); &lt;br&gt;
&amp;gt; &amp;gt;     end &lt;br&gt;
&amp;gt; &amp;gt;   end &lt;br&gt;
&amp;gt; &amp;gt; end &lt;br&gt;
&amp;gt; &amp;gt; where the dimension of ARRAY is [s1 x s2 x s3] &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I need to transform this file into a 3d image. After this i need to take sagittal slices from the 3d image.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Somebody can help me?&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; well, i would guess the first step is to reverse the writing process to read the data back into the workspace.  Then its just a simple matter of displaying it however you want.&lt;br&gt;
&lt;br&gt;
In the command window I load the txt file withe the LOAD command, but I don't know how to obtain the 3d image. Using the PLOT command, the mathlab give me only a 3d figure totally blank, only with the x,y,z axys. I'm sure that the txt file is really load by mathlab. </description>
    </item>
    <item>
      <pubDate>Tue, 10 Feb 2009 13:52:01 -0500</pubDate>
      <title>Re: sagittal slice from a txt file</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244188#627327</link>
      <author>David </author>
      <description>&quot;Nico zanette&quot; &amp;lt;zannakill@hotmail.com&amp;gt; wrote in message &amp;lt;gms0ii$qb9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;David&quot; &amp;lt;dave@bigcompany.com&amp;gt; wrote in message &amp;lt;gmrqsl$lnt$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;Nico zanette&quot; &amp;lt;zannakill@hotmail.com&amp;gt; wrote in message &amp;lt;gmrnuu$hdo$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Hello&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I'm in trouble, I need to obtain a MR image from a txt file. &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; The file contains a single column of data, with each row representing a different voxel in the grid. The data file was generated using the following ordering of grid cells: &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; for kk=1:s3 &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;   for jj=1:s2 &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;     for ii=1:s1 &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;       fprintf(fid,'%1.1f\n',ARRAY(ii,jj,kk)); &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;     end &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;   end &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; end &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; where the dimension of ARRAY is [s1 x s2 x s3] &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I need to transform this file into a 3d image. After this i need to take sagittal slices from the 3d image.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Somebody can help me?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Thanks.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; well, i would guess the first step is to reverse the writing process to read the data back into the workspace.  Then its just a simple matter of displaying it however you want.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; In the command window I load the txt file withe the LOAD command, but I don't know how to obtain the 3d image. Using the PLOT command, the mathlab give me only a 3d figure totally blank, only with the x,y,z axys. I'm sure that the txt file is really load by mathlab. &lt;br&gt;
&lt;br&gt;
what are the dimensions of the data when you have loaded it back into the workspace?  and exactly what plot command do you use?</description>
    </item>
    <item>
      <pubDate>Tue, 10 Feb 2009 14:15:03 -0500</pubDate>
      <title>Re: sagittal slice from a txt file</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244188#627341</link>
      <author>Nico zanette</author>
      <description>&quot;David&quot; &amp;lt;dave@bigcompany.com&amp;gt; wrote in message &amp;lt;gms0q1$c6p$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Nico zanette&quot; &amp;lt;zannakill@hotmail.com&amp;gt; wrote in message &amp;lt;gms0ii$qb9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &quot;David&quot; &amp;lt;dave@bigcompany.com&amp;gt; wrote in message &amp;lt;gmrqsl$lnt$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &quot;Nico zanette&quot; &amp;lt;zannakill@hotmail.com&amp;gt; wrote in message &amp;lt;gmrnuu$hdo$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Hello&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; I'm in trouble, I need to obtain a MR image from a txt file. &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; The file contains a single column of data, with each row representing a different voxel in the grid. The data file was generated using the following ordering of grid cells: &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; for kk=1:s3 &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;   for jj=1:s2 &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;     for ii=1:s1 &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;       fprintf(fid,'%1.1f\n',ARRAY(ii,jj,kk)); &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;     end &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt;   end &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; end &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; where the dimension of ARRAY is [s1 x s2 x s3] &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; I need to transform this file into a 3d image. After this i need to take sagittal slices from the 3d image.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Somebody can help me?&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &amp;gt; Thanks.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; well, i would guess the first step is to reverse the writing process to read the data back into the workspace.  Then its just a simple matter of displaying it however you want.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; In the command window I load the txt file withe the LOAD command, but I don't know how to obtain the 3d image. Using the PLOT command, the mathlab give me only a 3d figure totally blank, only with the x,y,z axys. I'm sure that the txt file is really load by mathlab. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; what are the dimensions of the data when you have loaded it back into the workspace?  and exactly what plot command do you use?&lt;br&gt;
&lt;br&gt;
&amp;gt;&amp;gt; whos&lt;br&gt;
&amp;nbsp;&amp;nbsp;Name         Size                            Bytes  Class&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;ARRAY       20x4x2                            1280  double array&lt;br&gt;
&amp;nbsp;&amp;nbsp;ans          1x1                                 8  double array&lt;br&gt;
&amp;nbsp;&amp;nbsp;ii           1x1                                 8  double array&lt;br&gt;
&amp;nbsp;&amp;nbsp;index        1x1                                 8  double array&lt;br&gt;
&amp;nbsp;&amp;nbsp;jj           1x1                                 8  double array&lt;br&gt;
&amp;nbsp;&amp;nbsp;kk           1x1                                 8  double array&lt;br&gt;
&amp;nbsp;&amp;nbsp;mtype 27842650x1                         222741200  double array&lt;br&gt;
&amp;nbsp;&amp;nbsp;s1           1x1                                 8  double array&lt;br&gt;
&amp;nbsp;&amp;nbsp;s2           1x1                                 8  double array&lt;br&gt;
&amp;nbsp;&amp;nbsp;s3           1x1                                 8  double array&lt;br&gt;
&lt;br&gt;
Grand total is 27842818 elements using 222742544 bytes&lt;br&gt;
&lt;br&gt;
the txt file is called mtype, it is such a big file.&lt;br&gt;
I try, simply, with &amp;gt;&amp;gt;plot (mtype);&lt;br&gt;
i try also by plotting only x or y axys with no results.</description>
    </item>
    <item>
      <pubDate>Tue, 10 Feb 2009 15:12:01 -0500</pubDate>
      <title>Re: sagittal slice from a txt file</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244188#627356</link>
      <author>David </author>
      <description>&quot;Nico zanette&quot; &amp;lt;zannakill@hotmail.com&amp;gt; wrote in message &amp;lt;gms257$b9t$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;   Name         Size                            Bytes  Class&lt;br&gt;
&amp;gt;   mtype 27842650x1                         222741200  double array&lt;br&gt;
&amp;gt; I try, simply, with &amp;gt;&amp;gt;plot (mtype);&lt;br&gt;
&amp;gt; i try also by plotting only x or y axys with no results.&lt;br&gt;
&lt;br&gt;
well, i am dissappointed in matlab's plot function for not being able to figure out just what you wanted.  it looks like you'll have to do some more work to format the data so it can figure it out.  First you'll have to reverse the process that put the data into the file in a single column.  check out the 'reshape' function to convert to the original x,y,z sizes.  Then you can start to process slices and do plots with the 'surf' or maybe 'contour' functions instead of 'plot'.</description>
    </item>
    <item>
      <pubDate>Tue, 10 Feb 2009 15:40:17 -0500</pubDate>
      <title>Re: sagittal slice from a txt file</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244188#627366</link>
      <author>Nico zanette</author>
      <description>&quot;David&quot; &amp;lt;dave@bigcompany.com&amp;gt; wrote in message &amp;lt;gms5g1$rj7$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Nico zanette&quot; &amp;lt;zannakill@hotmail.com&amp;gt; wrote in message &amp;lt;gms257$b9t$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt;   Name         Size                            Bytes  Class&lt;br&gt;
&amp;gt; &amp;gt;   mtype 27842650x1                         222741200  double array&lt;br&gt;
&amp;gt; &amp;gt; I try, simply, with &amp;gt;&amp;gt;plot (mtype);&lt;br&gt;
&amp;gt; &amp;gt; i try also by plotting only x or y axys with no results.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; well, i am dissappointed in matlab's plot function for not being able to figure out just what you wanted.  it looks like you'll have to do some more work to format the data so it can figure it out.  First you'll have to reverse the process that put the data into the file in a single column.  check out the 'reshape' function to convert to the original x,y,z sizes.  Then you can start to process slices and do plots with the 'surf' or maybe 'contour' functions instead of 'plot'.&lt;br&gt;
&lt;br&gt;
ok, thanks!&lt;br&gt;
I will try with the reshape and the surf command. &lt;br&gt;
If I've been albe to obtain something i will tell you.&lt;br&gt;
&lt;br&gt;
Thanks a lot</description>
    </item>
    <item>
      <pubDate>Thu, 25 Feb 2010 22:35:20 -0500</pubDate>
      <title>Re: sagittal slice from a txt file</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244188#721347</link>
      <author>John Jack</author>
      <description>&quot;Nico zanette&quot; &amp;lt;zannakill@hotmail.com&amp;gt; wrote in message &amp;lt;gmrnuu$hdo$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello&lt;br&gt;
&amp;gt; I'm in trouble, I need to obtain a MR image from a txt file. &lt;br&gt;
&amp;gt; The file contains a single column of data, with each row representing a different voxel in the grid. The data file was generated using the following ordering of grid cells: &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; for kk=1:s3 &lt;br&gt;
&amp;gt;   for jj=1:s2 &lt;br&gt;
&amp;gt;     for ii=1:s1 &lt;br&gt;
&amp;gt;       fprintf(fid,'%1.1f\n',ARRAY(ii,jj,kk)); &lt;br&gt;
&amp;gt;     end &lt;br&gt;
&amp;gt;   end &lt;br&gt;
&amp;gt; end &lt;br&gt;
&amp;gt; where the dimension of ARRAY is [s1 x s2 x s3] &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I need to transform this file into a 3d image. After this i need to take sagittal slices from the 3d image.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Somebody can help me?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks.&lt;br&gt;
&lt;br&gt;
Hi Nico .... &lt;br&gt;
&lt;br&gt;
I just wonder if you were able to plot the 3D and sagital slice. And which step or command you use... &lt;br&gt;
&lt;br&gt;
Regards&lt;br&gt;
&lt;br&gt;
john</description>
    </item>
  </channel>
</rss>

