Before being able to use some parts of the code I have to solve a different problem. (I posted a new question but either it was not quite clear or nobody has done that before (?)&nbsp; ) <br><br>I work within a DICOM viewer so the DICOM series are already loaded (I do not read from a file like in case of the vtkImageReader2). Actually every DICOM image is stored in a custom class and all together in a NSArray (yes it is objective-C). So I want to load the images from the NSArray to the vtkImageReader2 object... I am not sure how should I do that. <br><br>Maybe first I need to load them into a vtkImageData object? (still I haven't found any example for that)<br><br>And then again I have the problem how to get the output properly. But I guess these questions do not belong to this class.<br><br><b><i>David Gobbi &lt;dgobbi@atamai.com&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Hi
 Emmanouil,<br><br>The best example for what you are trying to do is probably this one:<br><br>VTK/Examples/ImageProcessing/Cxx/ImageSlicing.cxx<br><br>This example is only in the CVS version of VTK, it isn't in the VTK 5 <br>release.<br><br>What I do with tracking systems is use the coordinate/quaternion from <br>the tracking system to create a vtkTransform, then I concatenate that <br>transform with a vtkMatrix4x4 from the patient registration, and then <br>feed the resulting transform to vtkImageReslice as the ResliceTransform.<br><br>If you have looked at the class page for vtkImageReslice, you will <br>notice that there are two methods for setting orientations: <br>SetResliceAxes() and SetResliceTransform().<br><br>For tracking, I always set ResliceTransform to the position/orientation <br>of the tool (in patient coordinates), and then set the ResliceAxes <br>according to how I want to orient the slice relative to orientation of <br>the tool.  In that way, the
 ResliceAxes is used to choose the tool axes <br>along which you will be extracting the slice.<br><br>The tricky thing with vtkImageReslice is getting the OutputOrigin, <br>OutputSpacing, and OutputExtent set properly for your application.  <br>Together, these parameters can be used to describe an output slice plane <br>with a particular pixel spacing.   So for example:<br><br>OutputOrigin =  (-127.5, -127.5, 0.0)<br>OutputSpacing = (1.0, 1.0, 1.0)<br>OutputExtent = (0, 255, 0, 255, 0, 0)<br><br>These describe a 256x256 output slice with 1mm pixel spacing.  The first <br>pixel is at (-127.5,-127.5,0) in the "output coordinate system" of <br>vtkImageReslice.  The centre of the slice is at (0,0,0) in the "output <br>coordinate system" of vtkImageReslice.<br><br>Now, the original input volume is in the "input coordinate system" of <br>vtkImageReslice.  We can call the input coordinate system "x" and the <br>output coordinate system "x'".  The relationship between these
 <br>coordinates is as follows:<br><br>x = T*M*x'    where "T" is ResliceTransform and "M" is ResliceMatrix<br><br>So this tells you that, if "M" is chosen to be a pure rotation matrix, <br>and if "T" contains the position of the tool point in input image <br>coordinates, then the point x' = (0,0,0), which is in the centre of our <br>output plane, will correspond to the point x = tool_point.  So, we will <br>be extracting a slice through the tool point position.<br><br>I know that is probably not the best description, let me know if things <br>aren't quite clear.<br><br> - David<br><br><br><br><br>Emmanouil Moschidis wrote:<br>&gt; Hello<br>&gt;<br>&gt; I want to use the vtkImageReslice class for reading a series of slices <br>&gt; and exctracting one slice based on coordinates and quaternions <br>&gt; received from a tracking system.<br>&gt;<br>&gt; Is there any specific documentation and/or any working examples for <br>&gt; this class? It is very powerful yet the only
 usable information I have <br>&gt; found is the class reference webpage.<br>&gt;<br>&gt; Any hint about how to proceed towards the insight of it would be <br>&gt; highly appreciated<br>&gt;<br>&gt; thanks<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt; Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge <br>&gt; <http: us.rd.yahoo.com="" evt="47093/*http://tv.yahoo.com/collections/222">to <br>&gt; see what's on, when.<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; This is the private VTK discussion list. <br>&gt; Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; http://www.vtk.org/mailman/listinfo/vtkusers<br>&gt;   <br><br></http:></blockquote><br><p>&#32;

<hr size=1>Be a PS3 game guru.<br>Get your game face on with <a href="http://us.rd.yahoo.com/evt=49936/*http://videogames.yahoo.com">the latest PS3 news and previews at Yahoo! Games.</a>