[vtkusers] Java servlet + Glassfish + volume rendering applications problem

Emptystack wulihouxiaoshuai at 163.com
Thu Jan 8 20:52:56 EST 2015

Many thanks for your reply. I can describe my architecture in detail. My
system is based on client/server artichitecture. The client is exposed via
an HTML5-based web  interface. On the server side,we used vtk's java wrapped
class to implement volume rendering and deployed it into glassfish by using
java servlet technology.  And the servlet's doGet method is override to
process client's request and generate relevant response. The workflow of my
system is as following.

The client sends an HTTP request to the web server and the web server
converts this request into an HTTPServletRequest object. This
HTTPServletRequest  object is delivered to my java servlet's doGet method.
In this method, the renderin engine is invoked. 

(1)When the first HTTPServletRequest object arrived, the rendering engine
loads the image data and initializes the relevant volume rendering pipeline,
like vtkRenderer and vtkRenderWindow and so on. After this, the
vtkRenderWindowInteractor's Render() method is called to performe volume
rendering. And we can get the resulting pixel data by the vtkRenderWindow's
GetPixelData() method. Then the pixel data is encoded into the
HTTPServletResponse. The web server converts this object to an HTTP response
and returns it to the client. And we can display the resulting image in our
web interface in this first step. 

(2)When the user moves mouse in our HTML5 web interface, the relevant mouse
coordinates is sent to web server and then passed to our servlet's method.
After extracting mouse coordinates from HTTPServletRequest object, the
vtkRenderWindowInteracor's setEventPositon method is called to respond the
mouse moving event. But the web server stopped when the code ran at the
point of vtkRenderWindow's Render() method. That's the place where my
problem happened. 

Hope you can give me some suggestions! 
Best Wishes!

View this message in context: http://vtk.1045678.n5.nabble.com/Java-servlet-Glassfish-volume-rendering-applications-problem-tp5730017p5730037.html
Sent from the VTK - Users mailing list archive at Nabble.com.

More information about the vtkusers mailing list