[IGSTK-Users] On Orthogonal Viewer Orientation Setup
Patrick Cheng
cheng at isis.georgetown.edu
Wed Mar 15 10:43:48 EST 2006
Hi Fucang,
The orientation and display of medical image is very tricky, Currently
in IGSTK we don't reorient the image volume.
in igstkView2D we different three orthogonal views by manipulating the
camera position. sample code:
/** Select the orientation of the View */
void View2D::RequestSetOrientation( const OrientationType & orientation )
{
m_Orientation = orientation;
double focalPoint[3];
double position[3];
for ( unsigned int cc = 0; cc < 3; cc++)
{
focalPoint[cc] = 0.0;
position[cc] = focalPoint[cc];
}
const double distanceToFocalPoint = 1000;
switch( m_Orientation )
{
case Sagittal:
{
position[0] += distanceToFocalPoint;
m_Camera->SetViewUp ( 0, 0, -1 );
break;
}
case Coronal:
{
position[1] += distanceToFocalPoint;
m_Camera->SetViewUp ( 0, 0, -1 );
break;
}
case Axial:
{
position[2] += distanceToFocalPoint;
m_Camera->SetViewUp ( 0, -1, 0 );
break;
}
}
m_Camera->SetPosition ( position );
m_Camera->SetFocalPoint ( focalPoint );
m_Camera->SetClippingRange( 0.1, 100000 );
m_Camera->ParallelProjectionOn();
}
This is based on an assumption that the axes of image is as follows
(in DICOM 3.0 standard):
X-axis: Right (hand) -> Left (hand)
Y-axis: Anterior (front) -> Posterior (back)
Z-axis: Inferior (feet) -> Superior (head)
This is common is most CT images, however MR images could come in many
different orientations. DICOM uses a direction cosine to specify the
acquisition orientation. for details:
http://xmedcon.sourceforge.net/docs/orient/medcon1.html
There is a itkOrientImageFilter can be used to flip or permute the
axes of an image volume. Given original orientation information (three
letter code or dicom direction cosine) and target orientation
information (three letter code)
http://www.itk.org/Doxygen/html/classitk_1_1OrientImageFilter.html
You can try to reorient the image to standard orientation first and
then see if the image is being displayed correctly.
We will discuss the viewing issue among our developers hoping find a
better solution.
Patrick
Fucang Jia wrote:
> Hello,
>
> I am now trying IGSTK which is a powerful toolkit. And try the
> FourViewsTrackingWithCT example. When a CT series is loaded,
> the viewer can display three orthogonal plane. The axial, sagittal and
> coronal direction is as follows:
> axial: x: Left -> Right y: Anterior -> Posterior
> sagittal: x: Posterior -> Anterior y: Inferior -> Superior
> coronal: x: Left -> Right y: Inferior -> Superior
> the y axis direction is from the top to the bottom of the monitor. I am
> running the application on Win XP.
>
> I do not know how to setup the view as classical view , such as
> VolView and SNAP which display the nose to the left, and patient
> right is screen left.
>
> axial: x: Right -> Left y: Anterior -> Posterior
> sagittal: x: Anterior -> Posterior y: Superior -> Inferior
> coronal: x: Right -> Left y: Superior -> Inferior
>
> If there are some convinent to achieve this effect?
>
> Thanks!
>
> Fucang
> ==================================
> Fucang Jia, PhD
> Department of Biomedical Engineering,
> Zhejiang University,
> Hangzhou, 310027,
> P.R.China
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> IGSTK-Users mailing list
> IGSTK-Users at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
--
Patrick Cheng Work phone: 202-687-2902
Software Engineer Work fax: 202-784-3479
Email: cheng at isis.georgetown.edu
Imaging Science and Information Systems (ISIS) Center
Department of Radiology, Georgetown University Medical Center
2115 Wisconsin Avenue, Suite 603, Washington, DC, 20007
More information about the IGSTK-Users
mailing list