<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
06.05.2010 10:33, ABHISHEK GUPTA yazmış:
<blockquote
 cite="mid:p2w527c52201005060033u849c8a57i7ed9fb5bc80fc703@mail.gmail.com"
 type="cite">
  <div>Hi sercani,</div>
  <div> </div>
  <div>I am new to VTK and not using VTKImageViewer2.</div>
  <div> </div>
  <div>I am using classes VTKImageData, VTKImageTransform
and VTKImageReslice.</div>
  <div> </div>
  <div>Any idea how can i do it using above classes.</div>
  <div> </div>
  <div>Thanks</div>
  <div>Abhishek</div>
  <div> </div>
  <div>Any idea how to <br>
  <br>
  </div>
  <div class="gmail_quote">On Thu, May 6, 2010 at 12:13 PM, sercani <span
 dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:sercanimailgroups@gmail.com" target="_blank">sercanimailgroups@gmail.com</a>&gt;</span>
wrote:<br>
  <blockquote
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"
 class="gmail_quote">06.05.2010 08:12, Abhishek_Gupta yazmış:
    <div><br>
    <blockquote
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"
 class="gmail_quote">Am implementing the MPR functionality using VTK
libraries and bit confused<br>
how to calculate the patient orientations in the sagital and coronal
view<br>
when the DICOM image was in Axial view. I was able to display the<br>
orientations from the DICOM file using the formulas provided in the<br>
      <a moz-do-not-send="true"
 href="http://www.dclunie.com/medical-image-faq/html/part2.html"
 target="_blank">http://www.dclunie.com/medical-image-faq/html/part2.html</a>
site by Mr. Clunie.<br>
Using this i get the orientation of the image of that particular DICOM
image<br>
but how should i calculate the orientations for the other views except
the<br>
one present in the DICOM file when reconstructed using the VTK.<br>
  <br>
    </blockquote>
    </div>
Hi Abhistek;<br>
If you are using vtkImageViewer2 for MPR rendering you can find their
orientations like this:<br>
    <br>
First find all axial (XY plane) orientations for left, top, right ,
bottom, front and back sides of vtkImageViewer2 and insert them into an
array or stringlist etc. and do these calculations for other views:<br>
    <br>
enum tagSCREEN<br>
{<br>
LEFT=0,<br>
TOP,<br>
RIGHT,<br>
BOTTOM,<br>
FRONT,<br>
BACK<br>
}ESCREEN;<br>
    <br>
//Sagittal<br>
StringList getOrientationAnnotationForYZPlane()<br>
{<br>
StringList xy=getOrientationAnnotationForXYPlane();//axial orientations<br>
    <br>
StringList list;<br>
list.insert(LEFT,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(TOP));<br>
list.insert(TOP,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(BACK));<br>
list.insert(RIGHT,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(BOTTOM));<br>
list.insert(BOTTOM,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(FRONT));<br>
list.insert(FRONT,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(LEFT));<br>
list.insert(BACK,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(RIGHT));<br>
return list;<br>
}<br>
//Coronal<br>
StringList getOrientationAnnotationForXZPlane()<br>
{<br>
StringList xy=getOrientationAnnotationForXYPlane();//axial orientations<br>
    <br>
StringList list;<br>
list.insert(LEFT,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(LEFT));<br>
list.insert(TOP,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(BACK));<br>
list.insert(RIGHT,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(RIGHT));<br>
list.insert(BOTTOM,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(FRONT));<br>
list.insert(FRONT,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(TOP));<br>
list.insert(BACK,<a moz-do-not-send="true" href="http://xy.at/"
 target="_blank">xy.at</a>(BOTTOM));<br>
return list;<br>
}<br>
    <font color="#888888"><br>
Sercani....<br>
    <br>
    </font></blockquote>
  </div>
  <br>
</blockquote>
Just create an instance of vtkImageViewer2 and set its renderwindow and
interactors, then set the viewer-&gt;SetSliceOrientation(int
orientation); according to your mpr rendering...for axial rendering
orientation should be 2, sagittal=0, coronal =1;<br>
<br>
But of course if you have already implement the mpr rendering using
vtkImageTransform and vtkImageReslice you can set the stringlists
according to your transforms...The ones that i send are for
vtkImageViewer2's transforms, you can just control the values if they
are true, if not you can modify them for your transforms.The ones that
i send were only examples for giving the logic of orientation...<br>
</body>
</html>