Hi Hala,<br><br>I don&#39;t know about the conversion to import others formats in VTK.<br>But slice extraction aren&#39;t a difficult task.<br>Take a look at the class vtkImageReslice.<br>The following pieces of code are in C++ and can helps you to extract the slices.
<br><br>//create the matrices <br>double transversalElements[16] = { <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1, 0, 0, 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, 1, 0, 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, 0, 1, 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, 0, 0, 1 };<br><br>double coronalElements[16] = {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1, 0, 0, 0,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, 0, 1, 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,-1, 0, 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, 0, 0, 1 };<br><br>double sagittalElements[16] ={<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, 0,-1, 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1, 0, 0, 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,-1, 0, 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, 0, 0, 1 };
<br><br><br>// an example of extraction in axial<br>//&#39;ll assume that&#39;s the image are readed and are stored in vtkImageData *m_CurrentImageData:<br>&nbsp;&nbsp;&nbsp; m_CurrentImageData-&gt;UpdateInformation();<br>&nbsp;&nbsp;&nbsp; double point[4];
<br>&nbsp;&nbsp;&nbsp; double temp[4];<br>&nbsp;&nbsp;&nbsp; int extentT[6];<br>&nbsp;&nbsp;&nbsp; double spacingT[3];<br>&nbsp;&nbsp;&nbsp; m_CurrentImageData-&gt;GetSpacing(spacingT);<br>&nbsp;&nbsp;&nbsp; m_CurrentImageData-&gt;GetExtent(extentT);<br>&nbsp;&nbsp;&nbsp; vtkMatrix4x4 *m_Matrix = vtkMatrix4x4::New();
<br>&nbsp;&nbsp;&nbsp; m_Matrix-&gt;DeepCopy(sagittalElements);<br>&nbsp;&nbsp;&nbsp; point[0] = 0.0;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; point[1] = 0.0;<br>&nbsp;&nbsp;&nbsp; //sets the point to the slice to be extracted.<br>&nbsp;&nbsp;&nbsp; point[2] = - m_CurrentImageData-&gt;GetSpacing()[1] *m_SliceNumber;
<br><br>&nbsp;&nbsp;&nbsp; point[3] = 1.0;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_Matrix-&gt;MultiplyPoint(point, temp);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_Matrix-&gt;SetElement(0, 3, temp[0]);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_Matrix-&gt;SetElement(1, 3, temp[1]);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_Matrix-&gt;SetElement(2, 3, temp[2]);
<br>&nbsp;&nbsp; vtkImageReslice *m_Reslicer =&nbsp; vtkImageReslice::New();<br>&nbsp;&nbsp; m_Reslicer-&gt;SetResliceAxes(m_Matrix);<br>&nbsp;&nbsp;&nbsp; vtkImageData *m_ExtractedSlice = m_Reslicer-&gt;GetOutput();<br><br>..................<br><br>With this example and more work, I believe you&#39;ll can extract all the slices. That&#39;s are just a piece of code, are a good idea take more care about, for example, the slice interval.
<br><br>Regards,<br><br>Wagner<br><br><div><span class="gmail_quote">2007/12/4, Hala ALBakour &lt;<a href="mailto:haloul02@yahoo.co.uk">haloul02@yahoo.co.uk</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>I am very new to 3D modelling and vtk, Actually just<br>looking around to find out if vtk would solve my<br>problem, I am wondering if vtk helps to extract 2D<br>slice data (2D image x,y coordinates) from a 3D<br>computer graphical model, originally the 3D model is
<br>imported from a standard file format like 3DS, so in<br>any case I need a plugin which helps importing such<br>file and convert it to vtk data structure,<br><br>Most importantly, does vtk data structure encapsulate<br>
x,y,z coordinates, is it possible to extract x,y<br>values at certain cut offs of z for example, what is<br>the most appropriate rendering mechanism/data<br>structure in vtk that supports this,<br><br>Would it be easier in this case to use other low
<br>levels tools like OpenGL,<br><br>Your help is highly appreciated,<br>Please advise,<br><br>Hala<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__________________________________________________________<br>Sent from Yahoo! - the World&#39;s favourite mail 
<a href="http://uk.mail.yahoo.com">http://uk.mail.yahoo.com</a><br><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br>