Open chaabaj opened 10 years ago
Thanks @chaabaj , for the suggestion. It make sense for the igtl::MessageBase class to have a way to point a memory area allocated externally. I'll work on it later this week to address it.
For images, you could try the itk::ImageMessage2 class. You can find an example in Examples/Imager/ImagerClient2.cxx Currently the class is separated from the irk::ImageMessage class, because I'm not sure if the API is good enough for the developers.
Yes i have tested to divise my igtl message data by block of 16k when igtl message size > 512k and the result was not great. It cost 50ms in additional for data size equal 65mb when i split message. I think the goal of the igtl::ImageMessage2 is to show the image unless you don't have all image data and the application don't have to wait the entire image data. The performance problem is more the copy between zeromq message data from a zeromq socket and igtl message data.
I'm using zeromq to exchange message between 2 application and i want to set the pack pointer and the body pack pointer with the message i have received. I have to copy in entire message i have received from zmq to the igtl message. It cause unnecessary copy (example : ImageMessage, PolyData).