<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
<STYLE>
<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@ËÎÌå";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Verdana;
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
/* Page Definitions */
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
layout-grid:15.6pt;}
div.Section1
{page:Section1;}
-->
</STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Verdana size=2>Hi Patrick,</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>I synchronized the IGSTK and Sandbox cvs and
recompiled it from scratch. </FONT></DIV>
<DIV><FONT face=Verdana size=2>The DrawPickedPoint is using continuous index
now.</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>But I can reproduce the problem with the
executable you sent me. I just sent </FONT></DIV>
<DIV><FONT face=Verdana size=2>you an animation to picture this
problem.</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Thanks a lot!</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>Fucang</FONT></DIV>
<DIV><FONT face=Verdana size=2> </DIV>
<DIV>
<HR>
</DIV></FONT>
<DIV><FONT face=Verdana><FONT size=2>On 2006-06-19 02:50:55 Patrick
Cheng</FONT></FONT></DIV>
<DIV><FONT face=Verdana><FONT size=2>Subject: Re:
[IGSTK-Users] Viewer Problem due to
TransformPhysicalPointToIndex</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>
<DIV>Hi Fucang,</DIV>
<DIV> </DIV>
<DIV>I fixed the problem in the IGSTK
main repository, by adding</DIV>
<DIV>TransformPhysicalPointToContinuousIndex() function, into
the</DIV>
<DIV>igstkImageSpatialObject class.</DIV>
<DIV> </DIV>
<DIV>But the example application you are
running is in the Sandbox.</DIV>
<DIV> </DIV>
<DIV>You might need to check on two
things:</DIV>
<DIV> </DIV>
<DIV>First, after you update the IGSTK main
repository, you have to CMake</DIV>
<DIV>the Sandbox again, this way, the
Sandbox will get the latest source</DIV>
<DIV>from main repository,</DIV>
<DIV> </DIV>
<DIV>Second, you have updated the
FourViewsTrackingWithCT application in</DIV>
<DIV>the Sandbox. You can double check by
looking into the</DIV>
<DIV>DrawPickedPoint() function in the
FourViewsTrackingWithCT .cxx file.</DIV>
<DIV>See whether it's using the continuous
index.</DIV>
<DIV> </DIV>
<DIV>I will send you the executables in
another separate email, because</DIV>
<DIV>this email goes to the mailing
list.</DIV>
<DIV> </DIV>
<DIV>Patrick</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Fucang Jia wrote:</DIV>
<DIV>> Hi Patrick,</DIV>
<DIV>> </DIV>
<DIV>> Thank you very much!</DIV>
<DIV>> </DIV>
<DIV>> But I am not keep clicking
on the same point. Would you like
to share me </DIV>
<DIV>> with</DIV>
<DIV>> a Win32 executable FourViewsTrackingWithCT
app for me to have a test?</DIV>
<DIV>> </DIV>
<DIV>> Thanks!</DIV>
<DIV>> </DIV>
<DIV>> Fucang</DIV>
<DIV>> </DIV>
<DIV>>
------------------------------------------------------------------------</DIV>
<DIV>> On 2006-06-18 06:10:51 Patrick
Cheng</DIV>
<DIV>> Subject: Re: [IGSTK-Users]
Viewer Problem due to </DIV>
<DIV>> TransformPhysicalPointToIndex</DIV>
<DIV>> </DIV>
<DIV>> Hi Fucang,</DIV>
<DIV>> </DIV>
<DIV>> I guess the problem
is you keep clicking
on the same point: </DIV>
<DIV>> The first</DIV>
<DIV>> time you click on
a point, vtk's z
buffer store the value,
</DIV>
<DIV>> where the</DIV>
<DIV>> ray intersects with the
image plane. but NOTICE
here, we put </DIV>
<DIV>> an sphere</DIV>
<DIV>> on that clicking point,
if you do not
moving the mouse, the </DIV>
<DIV>> second</DIV>
<DIV>> time you click again,
it actually will return
the point on </DIV>
<DIV>> the sphere</DIV>
<DIV>> you have clicked. that's
why the slice is
still jumping. if </DIV>
<DIV>> you move</DIV>
<DIV>> you mouse a little
bit, and click on the
same image plane, it</DIV>
<DIV>> shouldn't have an
jumping, i have tested
here without any problem.</DIV>
<DIV>> </DIV>
<DIV>> By default, all the
spatial object in the
view is pickable in </DIV>
<DIV>> IGSTK.</DIV>
<DIV>> </DIV>
<DIV>> Patrick</DIV>
<DIV>> </DIV>
<DIV>> Fucang Jia wrote:</DIV>
<DIV>> > </DIV>
<DIV>> > Hi Patrick,</DIV>
<DIV>> > </DIV>
<DIV>> > I found that
another vtk dlls exists
in the default path,
</DIV>
<DIV>> which </DIV>
<DIV>> > cause the
fltk app can not
execute, when</DIV>
<DIV>> > I copy the
compiled vtk dlls into
the path of fltk
app, </DIV>
<DIV>> which works well.</DIV>
<DIV>> > </DIV>
<DIV>> > But on the
slice index jumping problem,
it seems that it
</DIV>
<DIV>> exists. If you
</DIV>
<DIV>> > launch the
app</DIV>
<DIV>> > FourViewTrackingWithCT
compiled in debug mode(
I have not </DIV>
<DIV>> tried in </DIV>
<DIV>> > release mode),</DIV>
<DIV>> > and load
dataset IGSTK/Testing/Data/Input/E000192</DIV>
<DIV>> > then let
left mouse click on
the sagittal view plane,
you </DIV>
<DIV>> will see that.
</DIV>
<DIV>> > I first
change the sagittal</DIV>
<DIV>> > index to
511, then click once,
the index is 511, then
I </DIV>
<DIV>> click it again,
</DIV>
<DIV>> > the index
changes to 510.</DIV>
<DIV>> > When I
continue click left mouse
on it, it will change
to </DIV>
<DIV>> 509, 508, ...
</DIV>
<DIV>> > When it
change to 464, it</DIV>
<DIV>> > will never
change. When I change
the sagittal slice to </DIV>
<DIV>> another slice, </DIV>
<DIV>> > then click,
the slice changes</DIV>
<DIV>> > again.</DIV>
<DIV>> > </DIV>
<DIV>> > I found this
is not due to
TransformPhysicalPointToIndex </DIV>
<DIV>> function, but </DIV>
<DIV>> > in igstkView.cxx</DIV>
<DIV>> >
m_PointPicker-
>GetPickPosition( data );</DIV>
<DIV>> > which compute
z buffer depth from
vtkOpenGLRenderWindow.cxx</DIV>
<DIV>> > int
vtkOpenGLRenderWindow::GetZbufferData( int x1,
int y1, int </DIV>
<DIV>> x2, int y2,</DIV>
<DIV>> >
</DIV>
<DIV>>
float*
z_data )</DIV>
<DIV>> > glReadPixels(
x_low, y_low,</DIV>
<DIV>> >
width, height,</DIV>
<DIV>> >
GL_DEPTH_COMPONENT,
GL_FLOAT,</DIV>
<DIV>> >
z_data );</DIV>
<DIV>> > </DIV>
<DIV>> > I add a
line</DIV>
<DIV>> > std::cout
< <"z_data is " <
<*z_data < <std::endl;</DIV>
<DIV>> > </DIV>
<DIV>> > when I click
the mouse at one
position, the z_data </DIV>
<DIV>> changes. I think
this </DIV>
<DIV>> > may be the
cause. But</DIV>
<DIV>> > I can not
figure out why now.</DIV>
<DIV>> > </DIV>
<DIV>> > Thanks!</DIV>
<DIV>> > </DIV>
<DIV>> > Fucang</DIV>
<DIV>> > </DIV>
<DIV>> > </DIV>
<DIV>> >
------------------------------------------------------------------------</DIV>
<DIV>> > On 2006-06-15
22:55:33 Patrick Cheng</DIV>
<DIV>> > Subject:
Re: [IGSTK-Users] Viewer
Problem due to </DIV>
<DIV>> > TransformPhysicalPointToIndex</DIV>
<DIV>> > </DIV>
<DIV>> > Hi
Fucang,</DIV>
<DIV>> > </DIV>
<DIV>> > 1. You
should update
both IGSTK
and </DIV>
<DIV>> IGSTKSandbox (bug
fix is </DIV>
<DIV>> > in
the</DIV>
<DIV>> > IGSTK, I
have also
changed the
example app </DIV>
<DIV>> in IGSTKSandbox
to </DIV>
<DIV>> > use
the</DIV>
<DIV>> > ContinuousIndex)</DIV>
<DIV>> > </DIV>
<DIV>> > 2. You
might need
to cmake the
IGSTKSandbox </DIV>
<DIV>> again, this
will </DIV>
<DIV>> > take
the</DIV>
<DIV>> > latest code
from IGSTK
to IGSTKSandbox
build </DIV>
<DIV>> directory, and
</DIV>
<DIV>> > then
compile</DIV>
<DIV>> > the
IGSTKSandbox. (You
have to run
the cmake
</DIV>
<DIV>> on IGSTKSandbox
</DIV>
<DIV>> > again,</DIV>
<DIV>> > after you
update the
IGSTK)</DIV>
<DIV>> > </DIV>
<DIV>> > I have
tested this
on the same
platform </DIV>
<DIV>> here, it
works out </DIV>
<DIV>> > fine
here. If</DIV>
<DIV>> > you still
have problem
with this.
Can you be
</DIV>
<DIV>> more specific
on </DIV>
<DIV>> > the
error</DIV>
<DIV>> > and
difficulty you have
encountered?</DIV>
<DIV>> > </DIV>
<DIV>> > Patrick</DIV>
<DIV>> > </DIV>
<DIV>> > Fucang Jia
wrote:</DIV>
<DIV>> > >
Hi Patrick,</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
Thank you
for your rapid
reply.</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
But after
I synchronized with
CVS version, </DIV>
<DIV>> I found
that </DIV>
<DIV>> > all
fltk app can
</DIV>
<DIV>> > >
not run
( this app</DIV>
<DIV>> > >
is compiled
in debug mode,
VC.Net2003 </DIV>
<DIV>> fltk-1-1.7 or
</DIV>
<DIV>> >
fltk-1.1.12-16-05).</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
Then I
switched to VC6
and compiled
it. </DIV>
<DIV>> But I
found that </DIV>
<DIV>> > jumping
problem </DIV>
<DIV>> > >
still exists.</DIV>
<DIV>> > >
and m_CTImageObserver-
>GetCTImage()- >IsInside(
p </DIV>
<DIV>> ) will
</DIV>
<DIV>> > incorrectly
</DIV>
<DIV>> > >
report to
0 when</DIV>
<DIV>> > >
sagittal slice
is 0, so
it will
report </DIV>
<DIV>> "Picked point
</DIV>
<DIV>> > outside
image".</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
Thanks !</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
Fucang</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
</DIV>
<DIV>>
------------------------------------------------------------------------</DIV>
<DIV>> > >
On 2006-06-15
01:10:05 Patrick
Cheng</DIV>
<DIV>> > >
Subject:
Re:
[IGSTK-Users] Viewer
</DIV>
<DIV>> Problem due
to </DIV>
<DIV>> > >
TransformPhysicalPointToIndex</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
Hi
Fucang,</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
A new
</DIV>
<DIV>> TransformPhysicalPointToContinuousIndex(p,index)
</DIV>
<DIV>> > function
and
a</DIV>
<DIV>> > >
ContinuousIndexType
is
being added
</DIV>
<DIV>> to
the </DIV>
<DIV>> > ImageSpatialObject's
API.</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
Now
if you
take
the
pick </DIV>
<DIV>> position
and
use </DIV>
<DIV>> > the
continuous </DIV>
<DIV>> > >
index
to</DIV>
<DIV>> > >
reslice
the image,
it
will
</DIV>
<DIV>> be
much smoother
</DIV>
<DIV>> > and
won't
jump.</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
Please
update your
IGSTK
main </DIV>
<DIV>> and
Sandbox
</DIV>
<DIV>> > repository
code.</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
Thank
you,</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
Patrick</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
Fucang
Jia wrote:</DIV>
<DIV>> > >
>
Hi,
Patrick,</DIV>
<DIV>> > >
>
</DIV>
<DIV>> > >
>
There
is
a
problem </DIV>
<DIV>> due
to </DIV>
<DIV>> >
TransformPhysicalPointToIndex </DIV>
<DIV>> > >
function,
which
</DIV>
<DIV>> > >
>
belongs
to
Bug#
738,</DIV>
<DIV>> > >
>
but
it
seems that
</DIV>
<DIV>> this
critial bug
has </DIV>
<DIV>> >
not been
fixed.</DIV>
<DIV>> > >
>
</DIV>
<DIV>> > >
>
When
I
load </DIV>
<DIV>> >
IGSTK\Sandbox-Release-8\Testing\Data\E000192,</DIV>
<DIV>> > >
>
press
the
left
mouse </DIV>
<DIV>> button
on
the </DIV>
<DIV>> > sagittal
view
in
</DIV>
<DIV>> > >
>
FourViewsTrackingWithCT
app
</DIV>
<DIV>> continuously,</DIV>
<DIV>> > >
>
then
the
index
changes </DIV>
<DIV>> little
bye
one, </DIV>
<DIV>> > when
the
index
of </DIV>
<DIV>> > >
sagittal
viewer
</DIV>
<DIV>> > >
>
was
changed
to 0,
</DIV>
<DIV>> I
press the</DIV>
<DIV>> > >
>
mouse
button
onto
the </DIV>
<DIV>> sagittal
image,
it </DIV>
<DIV>> > says
"Picked
point </DIV>
<DIV>> > >
outside
</DIV>
<DIV>> > >
>
image".
I
tracked
this </DIV>
<DIV>> bug,</DIV>
<DIV>> > >
>
and
found
that
it </DIV>
<DIV>> is
due to
index
</DIV>
<DIV>> > round
up
problem.</DIV>
<DIV>> > >
>
</DIV>
<DIV>> > >
>
For
example,
the
origin </DIV>
<DIV>> is
-153.6640625,</DIV>
<DIV>> > >
>
the
spacing
is
0.671875</DIV>
<DIV>> > >
>
the
physical
coordinate
</DIV>
<DIV>> is
16.3203</DIV>
<DIV>> > >
>
so
the
according
index </DIV>
<DIV>> is</DIV>
<DIV>> > >
>
(16.3203+153.6640625)/0.671875
= </DIV>
<DIV>> 252.9999813953,</DIV>
<DIV>> > >
>
it
was
truncated to
</DIV>
<DIV>> 252.</DIV>
<DIV>> > >
>
</DIV>
<DIV>> > >
>
Then
resliceImage
function </DIV>
<DIV>> will
change
the </DIV>
<DIV>> > orthogonal
image </DIV>
<DIV>> > >
slice.</DIV>
<DIV>> > >
>
</DIV>
<DIV>> > >
>
I
also
found this
</DIV>
<DIV>> behaviour
will occur
</DIV>
<DIV>> > when
certain
DICOM </DIV>
<DIV>> > >
dataset
is
</DIV>
<DIV>> > >
>
loaded.
When
I
load </DIV>
<DIV>> other
DICOM
dataset,</DIV>
<DIV>> > >
>
the
axial
and
coronal </DIV>
<DIV>> slice
will
have </DIV>
<DIV>> > problem,
but
sagittal </DIV>
<DIV>> > >
view
does
</DIV>
<DIV>> > >
>
not
change
when
mouse </DIV>
<DIV>> pressed.
It
is </DIV>
<DIV>> > because</DIV>
<DIV>> > >
>
that
certain
origin
and </DIV>
<DIV>> spacing
parameters
</DIV>
<DIV>> > trigger
this
problem.</DIV>
<DIV>> > >
>
</DIV>
<DIV>> > >
>
Thanks!</DIV>
<DIV>> > >
>
</DIV>
<DIV>> > >
>
Fucang</DIV>
<DIV>> > >
>
</DIV>
<DIV>> > >
>
</DIV>
<DIV>> > >
>
</DIV>
<DIV>> > </DIV>
<DIV>>
------------------------------------------------------------------------</DIV>
<DIV>> > >
>
</DIV>
<DIV>> > >
>
_______________________________________________</DIV>
<DIV>> > >
>
IGSTK-Users
mailing
list</DIV>
<DIV>> > >
>
IGSTK-Users@public.kitware.com</DIV>
<DIV>> > >
>
</DIV>
<DIV>> <A
href="http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users">http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users</A></DIV>
<DIV>> > >
</DIV>
<DIV>> > </DIV>
<DIV>> </DIV>
<DIV>> -- </DIV>
<DIV>> Patrick Cheng
</DIV>
<DIV>> Work phone: 202-687-2902</DIV>
<DIV>> Software Engineer
</DIV>
<DIV>> Work fax:
202-784-3479</DIV>
<DIV>> Email: cheng@isis.georgetown.edu</DIV>
<DIV>> </DIV>
<DIV>> Imaging Science and
Information Systems (ISIS)
Center</DIV>
<DIV>> Department of Radiology,
Georgetown University Medical
Center</DIV>
<DIV>> 2115 Wisconsin Avenue,
Suite 603, Washington, DC,
20007</DIV>
<DIV>> </DIV>
<DIV> </DIV>
<DIV>-- </DIV>
<DIV>Patrick Cheng
Work
phone: 202-687-2902</DIV>
<DIV>Software Engineer
Work fax:
202-784-3479</DIV>
<DIV>Email: cheng@isis.georgetown.edu</DIV>
<DIV> </DIV>
<DIV>Imaging Science and Information Systems
(ISIS) Center</DIV>
<DIV>Department of Radiology, Georgetown University
Medical Center</DIV>
<DIV>2115 Wisconsin Avenue, Suite 603, Washington,
DC, 20007</DIV>
<DIV> </DIV></FONT></DIV></BODY></HTML>