[vtkusers] using vtkSocketCommunicator for server application

Markus Neff markus at noodle.med.yale.edu
Tue Nov 12 18:04:46 EST 2002


Hi Berk !

Thanks a lot for your answer ...

 > > Are there any chances to integrate this into the VTK distribution
 > > some day when the code is tested and cleaned up ?
 > > If this is not the case, I would not spend to much time in making the code
 > > portable to every platform supported by VTK as I only use it on Windows
 > > (I have code there for Windows and general Unix, but I only have
 > > access to Linux to test the Unix parts).
 > 
 > Yes. The features you added sound nice and it would benefit other
 > users. However, we have to make sure that everything works well
 > on various platforms. I can help you with this. 

Sounds good. Since the changes are very "young" I will have to spend
some time on testing them before I can give them away (I just
wanted to ask early if inclusion would be possible at all). But
as soon as I have some reasonably working code, I will contact you
concerning the tests for the other platforms ...


 > > The second question: if it could be added to VTK, should it be
 > > completely compatible to the original class ?. If this is not
 > > necessary, one could integrate things like mutual authentication and
 > > session encryption.
 >
 > Not necessarily. However, if you think of adding advanced features
 > like encryption, I think they should be done either in a helper
 > class which can be plugged in or in a sub-class. This would make
 > maintaining the basic classes easier. 

Would it be allowed to link to some other library like OpenSSL for
encryption or would this prevent inclusion into VTK ?


 > > By the way: if you use the vtkSocketCommunicator in a more VTK like
 > > style (together with "vtkInput/OutputPort"), is it possible to "break up"
 > > very big data objects and transfer them "step by step" ? Could you use
 > > "vtkImageDataStreamer" for this ? Could anyone provide some
 > > examples of this ?
 > 
 > In certain cases, it is possible to do this. The answer depends on
 > what you are trying to achieve. Can you describe your application in
 > more detail ? Are you only using image data ? Are you always using ports
 > or just sending data directly ? Is the client interactive or does it do
 > "batch" processing ?

I am not using Ports right now ...

When I played with "vtkSocketCommunicator" I just noticed that 
when I wanted to transfer very large "vtkImageData" objects that I
run out of memory very soon (as I understood it, there is not only
the ImageData object but also a MarshalString around right before
sending).

My large "vtkImageData" objects are actually medical image sets. I
have to send them out to a client node via network. The data just has to
be transferred once to give the client the data that it needs for its
VTK pipeline. After this transfer, the server should be ready for
other requests (vtkPolyData and some vtkDataArrays but these are
not very big). By now, I drive an own "sort of protocol" for this on
top of the VTK network layer.

With my question about "Ports", I just wanted to find out if there is
some mechanism in VTK that could break up the "vtkImageData"
transparently. Otherwise I would have to break it up by myself.

Thanks for any help in advance !


Markus




More information about the vtkusers mailing list