Hi Nil,

BoundingObject's inheritance from Surface is admittedly a kind of a hack. The 
problem is, that it contains no surface data, i.e., it is empty (in contrast to 
objects inheriting from BoundingObject, e.g., Plane). All surface saving 
facilities in MITK just save the actual surface data (triangles and so on). You 
see the problem? :-) - There is nothing to save. What you would need is a 
serializer for BoundingObjects. Unfortunately there is no such serializer at 
the moment.

A solution could be the following: As it is not recommended to change the 
source tree of MITK you could define your own BoundingBox type in your module 
that inherits from BoundingObject and provide/register a serializer for it. 
Insert your BoundingBoxes to the data manager. All BoundingBoxes in the data 
manager would then be saved by MITK's scene IO.

Best,
    Stefan

________________________________________
Von: Nil Goyette [[email protected]]
Gesendet: Donnerstag, 14. Februar 2013 20:28
An: [email protected]
Betreff: [mitk-users] Serialize BoundingObject

Hi,

I'm trying to serialize a BoundingObject so we can load and save
bounding boxes. For some reasons, there are two ways to save a
BoundingObject : IOUtils::SaveSurface and
CommonFunctionality::SaveSurface, and one way to load a surface :
IOutils::LoadSurface. I'm guessing using Surface should work because a
BoundingObject is a Surface.

I have been trying for days now to load the bounding box as it was when
I saved it, but I always have the same problem. It goes to the right
place with the right size and I can move it (Ctrl + left click), but
when I try to resize it (Ctrl + right click), it moves really fast and
reshapes itself.

I thought I was lucky to find an example in this page
http://docs.mitk.org/0.99.1/QmitkBoundingObjectWidget_8cpp_source.html,
but the Save() and Load() method are commented out. So, how am I
supposed to serialize a BoundingObject? Is it currently possible?

Thanks for your time.

Nil Goyette, M.Sc.
www.imeka.ca

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to