<div dir="ltr">Does the sample application that get build in vtk.jar with the box widget works? <div>Meaning you can grab the control balls to resize the box?<div><br></div><div>The main is vtk.sample.rendering.JoglConeRendering </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 3, 2017 at 4:02 PM, Kevin Milner <span dir="ltr"><<a href="mailto:kmilner@usc.edu" target="_blank">kmilner@usc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
OK I have finally successfully rebuilt VTK with Java support from
git/master (details in below thread that I left off of the list),
but unfortunately both Picking issues still exist:<br>
<br>
*
vtkJoglPanelComponent.<wbr>getRenderWindowInteractor().<wbr>GetEventPosition()
still returns bogus y values (e.g. >1300 for a window of height
700)<br>
* once the above is addressed via previously described workaround,
VTK still thinks that I clicked halfway between where I actually
clicked and the lower left corner of the window (as demonstrated in
this video: <a class="m_-2536177620592840609moz-txt-link-freetext" href="http://sendvid.com/yqz1qww2" target="_blank">http://sendvid.com/yqz1qww2</a>)<br>
<br>
So unfortunately Sebastien's commit didn't solve my issues.<br>
<br>
I'm testing on a MacBook Pro (Retina, 13-inch, Early 2013) with OSX
Yosemite 10.10.5, but have experienced the same behavior on other
Macs.<br>
<br>
Any other ideas? Any information that I can provide that would be
helpful?<br>
<br>
Thanks,<br>
Kevin<div><div class="h5"><br>
<br>
<div class="m_-2536177620592840609moz-cite-prefix">On 02/03/2017 12:41 PM, Sebastien
Jourdain wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">can you try on git/master? I remember something
about the wrapper that was buggy at some point. </div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Feb 3, 2017 at 1:18 PM, Kevin
Milner <span dir="ltr"><<a href="mailto:kmilner@usc.edu" target="_blank">kmilner@usc.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> I'm running into some
compilation issues trying to build the latest version,
both on the Mac and on Linux. Have you encountered this?<br>
<br>
VTK-7.1.0/build/java/vtk/sampl<wbr>e/rendering/JoglConeRendering.<wbr>java:77:
error: cannot find symbol<br>
scalarBar.GetScalarBarActor().<wbr>SetTitle("Example");<br>
^<br>
symbol: method GetScalarBarActor()<br>
location: variable scalarBar of type vtkScalarBarWidget<br>
<br>
I'm using the latest JOGL jars, 2.3, specifying paths to
jogl-all.jar and gluegen-rt.jar.<br>
<br>
Thanks,<br>
Kevin
<div>
<div class="m_-2536177620592840609h5"><br>
<br>
<div class="m_-2536177620592840609m_-411300970050104058moz-cite-prefix">On
02/02/2017 09:35 AM, Sebastien Jourdain wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">We have, and our dashboard were
producing them for a while, but when we switch to
buildbot all that went away.
<div><br>
<div>In fact, I would even love to publish them
to maven but never get funding support for it.
And very few people at Kitware know how to
deal with Java.</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Feb 2, 2017 at
10:30 AM, Kevin Milner <span dir="ltr"><<a href="mailto:kmilner@usc.edu" target="_blank">kmilner@usc.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hmm,
OK, I didn't actually build the libraries
(one of my colleagues did), I just looked in
my VTK lib folder on the Mac and there were
files named, for example,
"libvtkalglib-7.0.1.dylib", so that's where
I got 7.0.1 from. But they were built right
around July 2016 so I imagine that they
don't include the fix! I'll report back
tomorrow once I figure out how to build it
on a Mac. I'm not sure which OS the Mac I'm
using for testing is but I imagine that it's
not Sierra as it's a couple years old and
likely has not been kept up to date. I'm a
Linux user and not up to date on anything
Mac related. Will report back tomorrow.<br>
<br>
Have you guys ever considered releasing
binaries of VTK-Java? Would be really
helpful!<br>
<br>
Thanks,<br>
Kevin
<div>
<div class="m_-2536177620592840609m_-411300970050104058h5"><br>
<br>
<div class="m_-2536177620592840609m_-411300970050104058m_-3896837838259265310moz-cite-prefix">On
2/2/2017 9:23 AM, Sebastien Jourdain
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">It seems like 7.1.0
does have my change but not 7.0.0.
Which make me think it might be a
Sierra issue if you are using 7.1
not 7.0.1 since the latter does not
exist.
<div><br>
</div>
<div>Which OS are you on? (When you
will get back to it ;-)</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Feb
2, 2017 at 10:13 AM, Kevin Milner
<span dir="ltr"><<a href="mailto:kmilner@usc.edu" target="_blank">kmilner@usc.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Thanks
Sebastien!<br>
<br>
I'm not near a Mac today but
will try rebuilding tomorrow
to see if your fix does the
trick. I'm currently on
7.0.1, is your patch included
in the 7.1 release or should I
check out the latest dev
version? I'll report back to
the list when I find out if it
works.<br>
<br>
Thanks a lot,<br>
Kevin
<div>
<div class="m_-2536177620592840609m_-411300970050104058m_-3896837838259265310h5"><br>
<br>
<div class="m_-2536177620592840609m_-411300970050104058m_-3896837838259265310m_7993404926329824404moz-cite-prefix">On
2/1/2017 4:58 PM,
Sebastien Jourdain
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Kevin,
<div><br>
</div>
<div>The issue seems
to be related to the
retina display and
maybe macOS sierra.</div>
<div><br>
</div>
<div>Which version of
VTK are you using? I
know that I fixed
some picking issue
on mac with retina
display before
Sierra. </div>
<div><br>
</div>
<div>The change I'm
talking about is:</div>
<div><br>
</div>
<div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">commit
b6df993770cfcd9a69a48a2730415a<wbr>992d698c5b<br>
Author: Sebastien
Jourdain <<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.co<wbr>m</a>><br>
Date: Fri Jul 8
09:45:58 2016
-0400<br>
Fix VTK/Java
JOGL<br>
<br>
- Update JOGL
version to 2.32<br>
- Update
documentation on
how to download
the JOGL jars with
Maven<br>
- Add support
for Retina display<br>
</blockquote>
</div>
<div><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(0,0,0);color:rgb(255,213,0);font-family:menlo;font-size:11px"><br>
</span></div>
<div>Ideally, you
should make sure you
have this commit in
your VTK and that is
working on system
older than Sierra.
Then if Sierra is
the issue, I think
more advanced
debugging may be
require. Although,
VTK compiled on an
older OS should work
just fine on
Sierra. <span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(0,0,0);color:rgb(255,213,0);font-family:menlo;font-size:11px"><br>
</span></div>
<div><br>
</div>
<div>Let me know if
you find out more
about it.</div>
<div><br>
</div>
<div>Seb</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On
Wed, Feb 1, 2017 at
5:19 PM, Kevin
Milner <span dir="ltr"><<a href="mailto:kmilner@usc.edu" target="_blank">kmilner@usc.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.
I develop a VTK
Java application
for visualizing
georeferenced
earthquake data,
SCEC-VDO (<a href="http://scecvdo.usc.edu/" rel="noreferrer" target="_blank">http://scecvdo.usc.edu/</a>).
One of the
important features
of this software
is the ability to
click on elements
of the 3D view to
perform actions or
view information.
This works
perfectly on
Windows and Linux,
but does not work
on Macs. I believe
that this is due
to an internal bug
in the Mac version
of VTK. We use the
vtkJoglPanelComponent to embed the 3D view into our Java application.<br>
<br>
Here is the code
that I use to pick
items (where
renderWindow is a
vtkJoglPanelComponent):<br>
<br>
renderWindow.getComponent().ad<wbr>dMouseListener(new
MouseAdapter() {<br>
public
void
mousePressed(MouseEvent
e) {<br>
int[] clickPos =
renderWindow.getRenderWindowIn<wbr>teractor().GetEventPosition();<br>
<br>
int x =
clickPos[0];<br>
int y =
clickPos[1];<br>
<br>
cellPicker.Pick(x,
y, 0,
renderWindow.getRenderer());<br>
if
(cellPicker.GetActor() != null) {<br>
// do stuff<br>
...<br>
}<br>
}<br>
});<br>
<br>
The first bug is
that the y value
of
getRenderWindowInteractor().Ge<wbr>tEventPosition()
is just flat out
wrong on the Mac
(correct on
Windows and
Linux). For
example, if I
click near the top
of my window with
height 700, if
will give me a y
value that is
greater than 1300!
It should actually
be very small, as
y should be zero
at the top of the
window and 700 at
the bottom of the
window. I can get
around this, and
make it match the
position on
Linux/Windows with
the following fix
using the
mouseEvent (e) and
the height of the
3D view component:<br>
<br>
int height =
renderWindow.getComponent().ge<wbr>tHeight();<br>
int calcY =
(height -
e.getY()) - 1;<br>
int x = e.getX();<br>
int y = calcY;<br>
<br>
Now when I click
on a location in
the 3D viewer, the
x/y coordinates
match the results
on Linux/Windows.
But picking actors
still doesn't
work. Instead, VTK
thinks that I have
clicked somewhere
roughly between
where I actually
clicked and the
bottom left
corner. So if I
click on the top
right corner of
the viewer, it
thinks that I
clicked in the
middle. If I click
on the top left,
if thinks that I
clicked middle
left. If I click
on the middle of
the viewer, it
thinks that I
clicked 1/4 up and
right of the lower
left corner. I
have posted a
video which
demonstrates this
bug:<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__sendvid.com_yqz1qww2&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=Ut0P5Kplo2cIO9V0et1UBQ&m=PGkWSB3OSZwzyAuWZpoUrTh6vHu2mHd7spHGazrOstc&s=dGJsjDO5nIImoI6O_DyWJiDnyBMEcib-RQEYnrPh9rY&e=" rel="noreferrer" target="_blank">http://sendvid.com/yqz1qww2</a><br>
<br>
In this video,
whatever actor is
clicked turns red.
This works as
expected on
Windows/Linux,
both with and
without the x/y
fix mentioned
above. Without the
previous fix on a
Mac, the behavior
is similar but
centered around
the top left
corner and
sometimes doesn't
detect clicks at
all (due to y
values which make
no sense).<br>
<br>
Any ideas what
could be going on?
I have experienced
this behavior on
all 4 Mac's on
which I have tried
the software.<br>
<br>
Thanks,<br>
Kevin Milner<br>
______________________________<wbr>_________________<br>
Powered by <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=Ut0P5Kplo2cIO9V0et1UBQ&m=PGkWSB3OSZwzyAuWZpoUrTh6vHu2mHd7spHGazrOstc&s=bMSpXvNrm0lSJOzozn_AYDBXkpcWuKJqOIhcO2U9yyg&e=" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other
Kitware
open-source
projects at <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.kitware.com_opensource_opensource.html&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=Ut0P5Kplo2cIO9V0et1UBQ&m=PGkWSB3OSZwzyAuWZpoUrTh6vHu2mHd7spHGazrOstc&s=puuEFo08Br6VIW-jlXbB2NrI0NJURbszNJqXQ-UwRfM&e=" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep
messages on-topic
and check the VTK
FAQ at: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.vtk.org_Wiki_VTK-5FFAQ&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=Ut0P5Kplo2cIO9V0et1UBQ&m=PGkWSB3OSZwzyAuWZpoUrTh6vHu2mHd7spHGazrOstc&s=Hc-JN_k805uBFV8S-TRyFDHuUk3CHrXUpjl0jkl-III&e=" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list
archives at: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3Dvtkusers&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=Ut0P5Kplo2cIO9V0et1UBQ&m=PGkWSB3OSZwzyAuWZpoUrTh6vHu2mHd7spHGazrOstc&s=avoi9QTUdibmomOnfKDIzKnsxhhgi_6aGezMOsU5sxg&e=" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link
to
subscribe/unsubscribe:<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_vtkusers&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=Ut0P5Kplo2cIO9V0et1UBQ&m=PGkWSB3OSZwzyAuWZpoUrTh6vHu2mHd7spHGazrOstc&s=jqHgE2FZMbPie2ZrXUZmovFaZhOLkt9s1njUN1kKKg4&e=" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>