Hi Rodolfo, <br><br>Thanks for the code! I was actually too looking for how I could get orthogonal views through a volume. I had a question: Does your code allow you to drag and move the orthogonal slices with a mouse, back and forth? If you needed this extra functionality, how would you modify your code? I guess you put some sort of window interactor.
<br><br>Thanks in advance for your help, and thanks again for the code. <br><br><br>Rashed<br><br><div><span class="gmail_quote">On 7/27/06, <b class="gmail_sendername"><a href="mailto:scsrsao@leeds.ac.uk">scsrsao@leeds.ac.uk
</a></b> <<a href="mailto:scsrsao@leeds.ac.uk">scsrsao@leeds.ac.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Luca,
<br> I'm attaching you a piece of code I'm using to generate slice views of a<br>volume, you should only modify the extent of the slice and create one for each<br>of the three orthogonal axis... just add to a typical rendering pipeline and it
<br>should work... hope its useful for you... also, there are some medical examples<br>included in vtk, that should be also useful for you..<br><br> timestepReader = vtkImageReader::New();<br> timestepReader->SetFileName("C:/ramos
<br>ymas/PROY/data/TS21z_VEL_R2_008000.bin");<br> timestepReader->SetFileDimensionality(3);<br> timestepReader->SetDataScalarTypeToFloat();<br> timestepReader->SetDataByteOrderToBigEndian();
<br> timestepReader->SetNumberOfScalarComponents(1);<br> timestepReader->SetDataExtent(0,maxX,0,maxY,0,maxZ);<br> timestepReader->SetDataSpacing(spacing,spacing,spacing);<br> timestepReader->SetDataOrigin(-300000,-150000,-40000);
<br><br> timestepFlip = vtkImageFlip::New();<br> timestepFlip->SetInput((vtkDataObject*)timestepReader->GetOutput());<br> timestepFlip->SetFilteredAxis(1);<br><br> //initialize Z slice stuff
<br> sliceZ = vtkImageDataGeometryFilter::New();<br> sliceZ->SetInput((vtkDataObject*)timestepFlip->GetOutput());<br> sliceZ->SetExtent(0,maxX,0,maxY,maxZ,maxZ);<br><br> sliceZMapper = vtkPolyDataMapper::New();
<br> sliceZMapper->SetInput(sliceZ->GetOutput());<br> sliceZMapper->SetLookupTable(scalarBar);<br> sliceZMapper->SetScalarRange(0.0000001, 3.1192195);<br> sliceZMapper->ScalarVisibilityOn();
<br><br> sliceZActor = vtkActor::New();<br> sliceZActor->SetMapper(sliceZMapper);<br><br>cheers,<br>Rodolfo<br><br>> Date: Tue, 25 Jul 2006 21:51:02 +0100<br>> From: "Luca Pamparana" <
<a href="mailto:deluded.soul@gmail.com">deluded.soul@gmail.com</a>><br>> Subject: [vtkusers] orthogonal views through a volume<br>> To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>> Message-ID:<br>
> <<a href="mailto:9779cb90607251351w2a19f1eaj18c47910270a41d5@mail.gmail.com">9779cb90607251351w2a19f1eaj18c47910270a41d5@mail.gmail.com</a>><br>> Content-Type: text/plain; charset="iso-8859-1"
<br>><br>> Hi everyone,<br>><br>> I found out that the ITK Snap toolkit probably displays the three orthogonal<br>> views through the volume.<br>><br>> I would like to know how I can do that with vtk. Do I have to use the
<br>> vtkImageReslice or is there a better way...<br>><br>> Any help would be greatly appreciated. Also, can anyone recommend a good<br>> medical image processing book that builds on these basics?<br>><br>> Cheers and thanks,
<br>><br>> Luca<br>> -------------- next part --------------<br>> An HTML attachment was scrubbed...<br>> URL:<br>><br><a href="http://public.kitware.com/pipermail/vtkusers/attachments/20060725/34b575c2/attachment-0001.htm">
http://public.kitware.com/pipermail/vtkusers/attachments/20060725/34b575c2/attachment-0001.htm</a><br>><br>> ------------------------------<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><br clear="all"><br>-- <br>Rashed