[Insight-users] TubeSpatialObject in groups

Gavin Baker gavinb+xtk at cs.mu.OZ.AU
Tue, 6 Jan 2004 18:47:26 +1100


Hi Luis,

I wrote a simple test case that shows the problem, which I included below.
If you run it as normal, it will generate gte.mhd which only includes 3
spheres (and not the tube).  If you stick any old junk on the command line,
it will call ComputeBoundingBox() for the tube (which is never called
explicity for the ellipses).  The tube appears only if ComputeBoundingBox()
is called.

I added some code to display the MTime at various points.  It doesn't seem
to change, even after the bounding box is updated.  The mtime of the group
changes after the children are added, and that's about it AFAICS...

Thanks in advance!

Regards,

  :: Gavin

-- 
Gavin Baker                                      Complex Systems Group
http://www.cs.mu.oz.au/~gavinb             The University of Melbourne


On Fri, Jan 02, 2004 at 02:19:34PM -0500, Luis Ibanez wrote:
> 
> Hi Gavin,
> 
> The computation of the BoundingBox is closely
> related to the "Modified" time of each one of
> the SpatialObjects in the group.
> 
> I wonder if the effect that you are observing
> is a consecuence of the order of operations in
> the creation and assignement of spatial objects
> to the group.
> 
> Could you please post a simplified version of your
> code where you find this undesirable behavior ?
> 
> It will be interesting to print out the modified
> types (GetMTime()) of the group and its children....
> 
> 
> Thanks
> 
> 
>    Luis
> 
> 
> -----------------------------
> Gavin Baker wrote:
> 
> >Hi all,
> >
> >Happy New Year...!
> >
> >I have been using the spatial objects classes to generate test data (with
> >great success), and came across some unexpected behaviour.
> >
> >I create a TubeSpatialObject, and if I plug it straight into the
> >SpatialObjectToImageFilter it is rendered into the volume just fine.
> >
> >If I create a group and add the tubes to the group, it doesn't work
> >(ie. nothing comes out in the volume) until I explicitly call
> >ComputeBoundingBox() on the tubes.  
> >
> >If I create a group and add some ellipses in the same manner, it works fine
> >_without_ calling ComputeBoundingBox().  (I haven't changed the child depth
> >for the BB calculation.)
> >
> >I'm not sure if this is an actual bug or not, but I would expect them to
> >behave the same.  There doesn't appear to be much difference in the
> >implementation of the ellipse and tube.  Is it necessary to call
> >ComputeBoundingBox() manually for each object?  If so, I would suggest a
> >small addition to the manual to this effect:
> >
> > [...]
> >
> >Thanks - best regards to all,
> >
> >  :: Gavin
> >