<!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 color=#000000 size=2>Hi Patrick,</FONT></DIV>
<DIV><FONT face=Verdana color=#000000 size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#000000 size=2>Thank you very much!</FONT></DIV>
<DIV><FONT face=Verdana color=#000000 size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#000000 size=2>But I am not keep clicking on the
same point. Would you like to share me with</FONT></DIV>
<DIV><FONT face=Verdana color=#000000 size=2>a Win32 executable
FourViewsTrackingWithCT app for me to have a test? </FONT></DIV>
<DIV><FONT color=#000000> <FONT face=Verdana
size=2> </FONT></FONT></DIV>
<DIV><FONT face=Verdana color=#000000 size=2>Thanks!</FONT></DIV>
<DIV><FONT face=Verdana color=#000000 size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#000000 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-18 06:10:51 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 guess the problem is you keep
clicking on the same point: The
first</DIV>
<DIV>time you click on a point, vtk's
z buffer store the value, where
the</DIV>
<DIV>ray intersects with the image plane.
but NOTICE here, we put an
sphere</DIV>
<DIV>on that clicking point, if you do
not moving the mouse, the second</DIV>
<DIV>time you click again, it actually will
return the point on the sphere</DIV>
<DIV>you have clicked. that's why the slice
is still jumping. if 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 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, 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, which
works well.</DIV>
<DIV>> </DIV>
<DIV>> But on the slice index jumping
problem, it seems that it exists. If
you </DIV>
<DIV>> launch the app</DIV>
<DIV>> FourViewTrackingWithCT compiled in debug
mode( I have not 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 will see
that. </DIV>
<DIV>> I first change the sagittal</DIV>
<DIV>> index to 511, then click once,
the index is 511, then I click
it again, </DIV>
<DIV>> the index changes to 510.</DIV>
<DIV>> When I continue click left mouse
on it, it will change to 509,
508, ... </DIV>
<DIV>> When it change to 464, it</DIV>
<DIV>> will never change. When I change
the sagittal slice to another slice,
</DIV>
<DIV>> then click, the slice changes</DIV>
<DIV>> again.</DIV>
<DIV>> </DIV>
<DIV>> I found this is not due to
TransformPhysicalPointToIndex 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 x2, int y2,</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 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 IGSTKSandbox
(bug fix is </DIV>
<DIV>> in the</DIV>
<DIV>> IGSTK, I have also
changed the example app
in IGSTKSandbox to </DIV>
<DIV>> use the</DIV>
<DIV>> ContinuousIndex)</DIV>
<DIV>> </DIV>
<DIV>> 2. You might need
to cmake the IGSTKSandbox
again, this will </DIV>
<DIV>> take the</DIV>
<DIV>> latest code from IGSTK
to IGSTKSandbox build
directory, and </DIV>
<DIV>> then compile</DIV>
<DIV>> the IGSTKSandbox. (You
have to run the cmake
on IGSTKSandbox </DIV>
<DIV>> again,</DIV>
<DIV>> after you update the
IGSTK)</DIV>
<DIV>> </DIV>
<DIV>> I have tested this
on the same platform
here, it works out </DIV>
<DIV>> fine here. If</DIV>
<DIV>> you still have problem
with this. Can you
be 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, I found that </DIV>
<DIV>> all fltk app can
</DIV>
<DIV>> > not run (
this app</DIV>
<DIV>> > is compiled
in debug mode, VC.Net2003
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. But I
found that </DIV>
<DIV>> jumping problem </DIV>
<DIV>> > still exists.</DIV>
<DIV>> > and m_CTImageObserver-
>GetCTImage()- >IsInside( p )
will </DIV>
<DIV>> incorrectly </DIV>
<DIV>> > report to 0
when</DIV>
<DIV>> > sagittal slice
is 0, so it will
report "Picked point </DIV>
<DIV>> outside image".</DIV>
<DIV>> > </DIV>
<DIV>> > Thanks !</DIV>
<DIV>> > </DIV>
<DIV>> > Fucang</DIV>
<DIV>> > </DIV>
<DIV>> > </DIV>
<DIV>> >
------------------------------------------------------------------------</DIV>
<DIV>> > On 2006-06-15
01:10:05 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>> > A new
TransformPhysicalPointToContinuousIndex(p,index)
</DIV>
<DIV>> function and
a</DIV>
<DIV>> > ContinuousIndexType
is being
added to the
</DIV>
<DIV>> ImageSpatialObject's
API.</DIV>
<DIV>> > </DIV>
<DIV>> > Now if
you take
the pick
position and use
</DIV>
<DIV>> the continuous
</DIV>
<DIV>> > index
to</DIV>
<DIV>> > reslice the
image, it
will be much
smoother </DIV>
<DIV>> and won't
jump.</DIV>
<DIV>> > </DIV>
<DIV>> > Please
update your IGSTK
main 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 due
to </DIV>
<DIV>> TransformPhysicalPointToIndex </DIV>
<DIV>> > function,
which </DIV>
<DIV>> > >
belongs to
Bug# 738,</DIV>
<DIV>> > >
but it
seems that 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 button
on the
</DIV>
<DIV>> sagittal view
in </DIV>
<DIV>> > >
FourViewsTrackingWithCT app
continuously,</DIV>
<DIV>> > >
then the
index changes little
bye one,
</DIV>
<DIV>> when the
index of </DIV>
<DIV>> > sagittal
viewer </DIV>
<DIV>> > >
was changed
to 0, I
press the</DIV>
<DIV>> > >
mouse button
onto the sagittal
image, it
</DIV>
<DIV>> says "Picked
point </DIV>
<DIV>> > outside
</DIV>
<DIV>> > >
image". I
tracked this
bug,</DIV>
<DIV>> > >
and found
that it is
due to
index </DIV>
<DIV>> round up
problem.</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
For example,
the origin is
-153.6640625,</DIV>
<DIV>> > >
the spacing
is 0.671875</DIV>
<DIV>> > >
the physical
coordinate is
16.3203</DIV>
<DIV>> > >
so the
according index
is</DIV>
<DIV>> > >
(16.3203+153.6640625)/0.671875 =
252.9999813953,</DIV>
<DIV>> > >
it was
truncated to
252.</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
Then resliceImage
function will
change the </DIV>
<DIV>> orthogonal image
</DIV>
<DIV>> > slice.</DIV>
<DIV>> > >
</DIV>
<DIV>> > >
I also
found this behaviour
will occur
</DIV>
<DIV>> when certain
DICOM </DIV>
<DIV>> > dataset
is </DIV>
<DIV>> > >
loaded. When
I load other
DICOM dataset,</DIV>
<DIV>> > >
the axial
and coronal slice
will have
</DIV>
<DIV>> problem, but
sagittal </DIV>
<DIV>> > view
does </DIV>
<DIV>> > >
not change
when mouse pressed.
It is
</DIV>
<DIV>> because</DIV>
<DIV>> > >
that certain
origin and 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>> > >
IGSTK-Users mailing
list</DIV>
<DIV>> > >
IGSTK-Users@public.kitware.com</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
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>