Hi, <div><font face="arial, helvetica, sans-serif">Sorry about the incomplete e-mail. </font></div><div><font face="arial, helvetica, sans-serif">For part A in question &#39;How is the fiber stored</font>&#39;, the header information is given as: </div>
<div><ul style="font-size:13.333333969116211px;font-family:Verdana,Arial,Helvetica,sans-serif;background-color:rgb(255,255,255)"><li style="font-size:1em;list-style-type:none">int <b>nFiberLength</b>; // fiber length<span class="anchor" id="line-28"></span></li>
<li style="font-size:1em;list-style-type:none">unsigned char <b>cReserved</b>;<span class="anchor" id="line-29"></span></li><li style="font-size:1em;list-style-type:none">RGB_TRIPLE <b>rgbFiberColor</b>; // R-G-B, 3 bytes totally<span class="anchor" id="line-30"></span></li>
<li style="font-size:1em;list-style-type:none">int <b>nSelectFiberStartPoint</b>;<span class="anchor" id="line-31"></span></li><li style="font-size:1em;list-style-type:none">int <b>nSelectFiberEndPoint</b>;<span class="anchor" id="line-32"></span></li>
<li style="font-size:1em;list-style-type:none">XYZ_TRIPLE <b>xyzFiberCoordinate</b>[nFiberLength]; //x-y-z, 3 float data and then next fiber data..</li></ul><div><font face="arial, helvetica, sans-serif">For part A in question &#39;How do you read in individual fiber coordinates outside the DTI Studio Environment&#39;: </font></div>
<div><ul style="font-size:13.333333969116211px;font-family:Verdana,Arial,Helvetica,sans-serif;background-color:rgb(255,255,255)"><li style="font-size:1em;list-style-type:none">// move file pointer 128, where fiber-data starts;<span class="anchor" id="line-89"></span></li>
<li style="font-size:1em;list-style-type:none">fileIn.Seek(128,CFile::begin);<span class="anchor" id="line-90"></span></li><li style="font-size:1em;list-style-type:none">int nAryIdx = 0;<span class="anchor" id="line-91"></span><p class="line862" style="font-size:1em;margin:0.25em 0px">
for (i=0; i&lt;stFiberFileHeader.nFiberNr; i++) {<span class="anchor" id="line-92"></span></p><ul style="font-size:1em"><li style="font-size:1em;list-style-type:none"><p class="line862" style="font-size:1em;margin:0.25em 0px">
fileIn.Read(&amp;m_stAryFiber[nAryIdx].<b>nLength</b>, sizeof(int)); // read length<span class="anchor" id="line-93"></span></p></li><li style="font-size:1em;list-style-type:none"><p class="line862" style="font-size:1em;margin:0.25em 0px">
fileIn.Read(&amp;m_stAryFiber[nAryIdx].<b>nSelStatus</b>, sizeof(BYTE)); // read sel-status<span class="anchor" id="line-94"></span></p></li><li style="font-size:1em;list-style-type:none"><p class="line862" style="font-size:1em;margin:0.25em 0px">
fileIn.Read(&amp;m_stAryFiber[nAryIdx].<b>rgbColor</b>, sizeof(RGB_TRIPLE)); // read color<span class="anchor" id="line-95"></span></p></li><li style="font-size:1em;list-style-type:none"><p class="line862" style="font-size:1em;margin:0.25em 0px">
fileIn.Read(&amp;m_stAryFiber[nAryIdx].<b>nSelLenStart</b>, sizeof(int)); // read fiber-sel-start<span class="anchor" id="line-96"></span></p></li><li style="font-size:1em;list-style-type:none"><p class="line862" style="font-size:1em;margin:0.25em 0px">
fileIn.Read(&amp;m_stAryFiber[nAryIdx].<b>nSelLenEnd</b>, sizeof(int)); // read fiber-sel-end<span class="anchor" id="line-97"></span></p></li><li style="font-size:1em;list-style-type:none"><p class="line862" style="font-size:1em;margin:0.25em 0px">
if (m_nFiberFileVersion &gt;= 2005) // new version<span class="anchor" id="line-98"></span></p><ul style="font-size:1em"><li style="font-size:1em;list-style-type:none"><p class="line862" style="font-size:1em;margin:0.25em 0px">
fileIn.Read(&amp;m_stAryFiber[nAryIdx].xyzPtROI, sizeof(XYZ_TRIPLE));// read ROI point<span class="anchor" id="line-99"></span></p></li></ul>// read fiber-chain data<span class="anchor" id="line-100"></span></li><li style="font-size:1em;list-style-type:none">
m_stAryFiber[nAryIdx].<b>pxyzChain</b> = new XYZ_TRIPLE[m_stAryFiber[nAryIdx].nLength];<span class="anchor" id="line-101"></span></li><li style="font-size:1em;list-style-type:none">fileIn.Read(m_stAryFiber[nAryIdx].pxyzChain, sizeof(XYZ_TRIPLE)*m_stAryFiber[nAryIdx].nLength); // if slicing sequencing is in negative, adjusting z-component before saving the data if (stFiberFileHeader.enumSliceSequencing == NEGATIVE_Seq) {<span class="anchor" id="line-102"></span><ul style="font-size:1em">
<li style="font-size:1em;list-style-type:none"><p class="line862" style="font-size:1em;margin:0.25em 0px">for (int j=0; j&lt;m_stAryFiber[nAryIdx].nLength; j++)<span class="anchor" id="line-103"></span></p><ul style="font-size:1em">
<li style="font-size:1em;list-style-type:none">m_stAryFiber[nAryIdx].pxyzChain[j].z = (stFiberFileHeader.nImgSlices-1) - m_stAryFiber[nAryIdx].pxyzChain[j].z;<span class="anchor" id="line-104"></span></li></ul></li></ul>} nAryIdx ++;<span class="anchor" id="line-105"></span></li>
</ul>} fileIn.Close();</li></ul></div>As you can see, there are slight differences in the names given. Could someone please tell me which is correct? I am trying to convert from a .trk file to a .dat file (I am able to read in the information from the dat file correctly, but cannot write out the track info without this knowledge). </div>
<div>Thank you, </div><div><br></div><div>Deepa </div><div><br></div><div><br></div><div><br></div><div><div class="gmail_quote">On Mon, Mar 4, 2013 at 9:17 PM, Deepa Krishnaswamy <span dir="ltr">&lt;<a href="mailto:deepa.krishnaswamy1@gmail.com" target="_blank">deepa.krishnaswamy1@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, <div>On the FAQ page about the structure of a fiber.dat file, I believe that there is conflicting information about the fields in the struct header. </div>
<div>For part A in </div>
</blockquote></div><br></div>