Hi again I decided to go the easy way and read from the hard disk. So I get the path of the already loaded series, but I get the error<br><br>&nbsp;Could not open file /Users/osirix/Documents/Emmanouil/MyTestImages/MRkid/05050914/.1<br><br>the path is /Users/osirix/Documents/Emmanouil/MyTestImages/MRkid/05050914/<br>even when I hardcode the path i get the same result. Do you know what might be wrong? (btw is the <font size="-1">last forward slash </font>necessary ? )&nbsp;  <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>One thing you can do is create a vtkImageImport object for each DICOM <br>image, this will allow you to create a vtkImageData from each DICOM that <br>you have stored in memory.  Then, you can use vtkImageAppend to create <br>an image volume out of the series of images.  The output of <br>vtkImageAppend can
 be used by vtkImageReslice.<br><br> - David<br><br><br>Emmanouil Moschidis wrote:<br>&gt; Before being able to use some parts of the code I have to solve a <br>&gt; different problem. (I posted a new question but either it was not <br>&gt; quite clear or nobody has done that before (?)  )<br>&gt;<br>&gt; I work within a DICOM viewer so the DICOM series are already loaded (I <br>&gt; do not read from a file like in case of the vtkImageReader2). Actually <br>&gt; every DICOM image is stored in a custom class and all together in a <br>&gt; NSArray (yes it is objective-C). So I want to load the images from the <br>&gt; NSArray to the vtkImageReader2 object... I am not sure how should I do <br>&gt; that.<br>&gt;<br>&gt; Maybe first I need to load them into a vtkImageData object? (still I <br>&gt; haven't found any example for that)<br>&gt;<br>&gt; And then again I have the problem how to get the output properly. But <br>&gt; I guess these questions do not belong to this
 class.<br>&gt;<br>&gt; */David Gobbi <dgobbi@atamai.com>/* wrote:<br>&gt;<br>&gt;     Hi Emmanouil,<br>&gt;<br>&gt;     The best example for what you are trying to do is probably this one:<br>&gt;<br>&gt;     VTK/Examples/ImageProcessing/Cxx/ImageSlicing.cxx<br>&gt;<br>&gt;     This example is only in the CVS version of VTK, it isn't in the VTK 5<br>&gt;     release.<br>&gt;<br>&gt;     What I do with tracking systems is use the coordinate/quaternion from<br>&gt;     the tracking system to create a vtkTransform, then I concatenate that<br>&gt;     transform with a vtkMatrix4x4 from the patient registration, and then<br>&gt;     feed the resulting transform to vtkImageReslice as the<br>&gt;     ResliceTransform.<br>&gt;<br>&gt;     If you have looked at the class page for vtkImageReslice, you will<br>&gt;     notice that there are two methods for setting orientations:<br>&gt;     SetResliceAxes() and SetResliceTransform().<br>&gt;<br>&gt;     For tracking, I always set
 ResliceTransform to the<br>&gt;     position/orientation<br>&gt;     of the tool (in patient coordinates), and then set the ResliceAxes<br>&gt;     according to how I want to orient the slice relative to<br>&gt;     orientation of<br>&gt;     the tool. In that way, the ResliceAxes is used to choose the tool<br>&gt;     axes<br>&gt;     along which you will be extracting the slice.<br>&gt;<br>&gt;     The tricky thing with vtkImageReslice is getting the OutputOrigin,<br>&gt;     OutputSpacing, and OutputExtent set properly for your application.<br>&gt;     Together, these parameters can be used to describe an output slice<br>&gt;     plane<br>&gt;     with a particular pixel spacing. So for example:<br>&gt;<br>&gt;     OutputOrigin = (-127.5, -127.5, 0.0)<br>&gt;     OutputSpacing = (1.0, 1.0, 1.0)<br>&gt;     OutputExtent = (0, 255, 0, 255, 0, 0)<br>&gt;<br>&gt;     These describe a 256x256 output slice with 1mm pixel spacing. The<br>&gt;     first<br>&gt;     pixel is at
 (-127.5,-127.5,0) in the "output coordinate system" of<br>&gt;     vtkImageReslice. The centre of the slice is at (0,0,0) in the "output<br>&gt;     coordinate system" of vtkImageReslice.<br>&gt;<br>&gt;     Now, the original input volume is in the "input coordinate system" of<br>&gt;     vtkImageReslice. We can call the input coordinate system "x" and the<br>&gt;     output coordinate system "x'". The relationship between these<br>&gt;     coordinates is as follows:<br>&gt;<br>&gt;     x = T*M*x' where "T" is ResliceTransform and "M" is ResliceMatrix<br>&gt;<br>&gt;     So this tells you that, if "M" is chosen to be a pure rotation<br>&gt;     matrix,<br>&gt;     and if "T" contains the position of the tool point in input image<br>&gt;     coordinates, then the point x' = (0,0,0), which is in the centre<br>&gt;     of our<br>&gt;     output plane, will correspond to the point x = tool_point. So, we<br>&gt;     will<br>&gt;     be extracting a slice through the tool point
 position.<br>&gt;<br>&gt;     I know that is probably not the best description, let me know if<br>&gt;     things<br>&gt;     aren't quite clear.<br>&gt;<br>&gt;     - David<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;     Emmanouil Moschidis wrote:<br>&gt;     &gt; Hello<br>&gt;     &gt;<br>&gt;     &gt; I want to use the vtkImageReslice class for reading a series of<br>&gt;     slices<br>&gt;     &gt; and exctracting one slice based on coordinates and quaternions<br>&gt;     &gt; received from a tracking system.<br>&gt;     &gt;<br>&gt;     &gt; Is there any specific documentation and/or any working examples for<br>&gt;     &gt; this class? It is very powerful yet the only usable information<br>&gt;     I have<br>&gt;     &gt; found is the class reference webpage.<br>&gt;     &gt;<br>&gt;     &gt; Any hint about how to proceed towards the insight of it would be<br>&gt;     &gt; highly appreciated<br>&gt;     &gt;<br>&gt;     &gt; thanks<br>&gt;     &gt;<br>&gt;    
 &gt;<br>&gt;     ------------------------------------------------------------------------<br>&gt;     &gt; Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge<br>&gt;     &gt; to<br>&gt;     &gt; see what's on, when.<br>&gt;     &gt;<br>&gt;     ------------------------------------------------------------------------<br>&gt;     &gt;<br>&gt;     &gt; _______________________________________________<br>&gt;     &gt; This is the private VTK discussion list.<br>&gt;     &gt; Please keep messages on-topic. Check the FAQ at:<br>&gt;     http://www.vtk.org/Wiki/VTK_FAQ<br>&gt;     &gt; Follow this link to subscribe/unsubscribe:<br>&gt;     &gt; http://www.vtk.org/mailman/listinfo/vtkusers<br>&gt;     &gt;<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt; Be a PS3 game guru.<br>&gt; Get your game face on with the latest PS3 news and previews at Yahoo! <br>&gt; Games. <http: us.rd.yahoo.com=""
 evt="49936/*http://videogames.yahoo.com"> <br><br></http:></dgobbi@atamai.com></blockquote><br><p>&#32;
      <hr size=1>Yahoo! oneSearch: Finally, <a href="http://us.rd.yahoo.com/evt=48252/*http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC"> mobile search 
that gives answers</a>, not web links.