<!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=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2><FONT face="Times New Roman" size=3>Hi
Patrick,</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2><FONT face="Times New Roman"
size=3></FONT></FONT> </DIV>
<DIV><FONT face=Verdana size=2><FONT face="Times New Roman" size=3>I found that
another vtk dlls exists in the default path, which cause the fltk
app can not execute, when</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2><FONT face="Times New Roman" size=3>I copy the
compiled vtk dlls into the path of fltk app, which works well.
</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2><FONT face="Times New Roman"
size=3></FONT></FONT> </DIV>
<DIV><FONT face=Verdana size=2><FONT face="Times New Roman" size=3>But on the
slice index jumping problem, it seems that it exists. If you launch the
app</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2><FONT face="Times New Roman"
size=3>FourViewTrackingWithCT compiled in debug mode( I have not tried in
release mode),</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2><FONT face="Times New Roman" size=3>and load
dataset IGSTK/Testing/Data/Input/E000192</FONT></FONT></DIV>
<DIV><FONT face=Verdana size=2><FONT face="Times New Roman" size=3>then let left
mouse click on the sagittal view plane, you will see that. I first change the
sagittal</FONT></FONT></DIV>
<DIV>index to 511, then click once, the index is 511, then I click it again, the
index changes to 510.</DIV>
<DIV>When I continue click left mouse on it, it will change to 509, 508, ...
When it change to 464, it</DIV>
<DIV>will never change. When I change the sagittal slice to another slice, then
click, the slice changes</DIV>
<DIV>again.</DIV>
<DIV> </DIV>
<DIV>I found this is not due to TransformPhysicalPointToIndex function, but in
igstkView.cxx</DIV>
<DIV><FONT face=Verdana size=2> </FONT><FONT face=Verdana
size=2>
m_PointPicker->GetPickPosition( data );</FONT></DIV>
<DIV><FONT face=Verdana size=2>which compute z buffer depth from
vtkOpenGLRenderWindow.cxx</FONT></DIV>
<DIV>int vtkOpenGLRenderWindow::GetZbufferData( int x1, int y1, int x2, int
y2,<BR>
float* z_data )</DIV>
<DIV> glReadPixels( x_low, y_low,
<BR>
width,
height,<BR>
GL_DEPTH_COMPONENT,
GL_FLOAT,<BR>
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
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><FONT face=Verdana size=2></FONT><FONT face=Verdana size=2> </DIV>
<DIV>
<HR>
</DIV></FONT>
<DIV><FONT face=Verdana><FONT size=2>On 2006-06-15 22:55:33 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>1. You should update both IGSTK and
IGSTKSandbox (bug fix is in the</DIV>
<DIV>IGSTK, I have also changed the example
app in IGSTKSandbox to use the</DIV>
<DIV>ContinuousIndex)</DIV>
<DIV> </DIV>
<DIV>2. You might need to cmake the
IGSTKSandbox again, this will take the</DIV>
<DIV>latest code from IGSTK to IGSTKSandbox
build directory, and then compile</DIV>
<DIV>the IGSTKSandbox. (You have to run the
cmake on IGSTKSandbox again,</DIV>
<DIV>after you update the IGSTK)</DIV>
<DIV> </DIV>
<DIV>I have tested this on the same
platform here, it works out fine here.
If</DIV>
<DIV>you still have problem with this. Can
you be more specific on 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 all fltk app
can </DIV>
<DIV>> not run ( this app</DIV>
<DIV>> is compiled in debug mode,
VC.Net2003 fltk-1-1.7 or fltk-1.1.12-16-05).</DIV>
<DIV>> </DIV>
<DIV>> Then I switched to VC6 and
compiled it. But I found that jumping
problem </DIV>
<DIV>> still exists.</DIV>
<DIV>> and m_CTImageObserver- >GetCTImage()- >IsInside(
p ) will incorrectly </DIV>
<DIV>> report to 0 when</DIV>
<DIV>> sagittal slice is 0, so it
will report "Picked point 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) function
and a</DIV>
<DIV>> ContinuousIndexType is being
added to the ImageSpatialObject's
API.</DIV>
<DIV>> </DIV>
<DIV>> Now if you take
the pick position and
use the continuous </DIV>
<DIV>> index to</DIV>
<DIV>> reslice the image, it
will be much smoother
and won't jump.</DIV>
<DIV>> </DIV>
<DIV>> Please update your IGSTK
main and Sandbox 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
TransformPhysicalPointToIndex </DIV>
<DIV>> function, which </DIV>
<DIV>> > belongs to
Bug# 738,</DIV>
<DIV>> > but it seems
that this critial bug
has not been fixed.</DIV>
<DIV>> > </DIV>
<DIV>> > When I load
IGSTK\Sandbox-Release-8\Testing\Data\E000192,</DIV>
<DIV>> > press the
left mouse button on
the sagittal view in
</DIV>
<DIV>> > FourViewsTrackingWithCT
app continuously,</DIV>
<DIV>> > then the
index changes little bye
one, 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 says "Picked point </DIV>
<DIV>> outside </DIV>
<DIV>> > image". I
tracked this bug,</DIV>
<DIV>> > and found
that it is due to
index 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
orthogonal image </DIV>
<DIV>> slice.</DIV>
<DIV>> > </DIV>
<DIV>> > I also found
this behaviour will occur
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 problem, but sagittal
</DIV>
<DIV>> view does </DIV>
<DIV>> > not change
when mouse pressed. It
is because</DIV>
<DIV>> > that certain
origin and spacing parameters
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>> > 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></FONT></DIV></BODY></HTML>