Hi all,

I don't know if Peter Neher is still the DiffusionImage expert. If it's the case, hi Peter.

I found this line
fiberPolyData->GetPointData()->AddArray(fiberBundle->GetFiberColors());
in mitkFiberBundleMapper3D in 2015.05 (still in master) and I think this is unfortunate.

It changes the last modified time (MTime) of the polydata, which can make some algorithms execute again. For example, lets say you
1) load a FiberBundle
2) build an Octree in NodeAdded (so, before the mapper does anything)
3) call BuildLocator() on it to avoid the automatic call later.
4) The mapper is called, MTime is updated.
5) BuildLocator() will be called/built again when you use the Octree because it thinks the object was modified.

You're the expert here, so you may know something I don't, but I'm pretty sure a mapper shouldn't modify its mapped object.

I tested removing that line and adding
m_FiberPolyData->GetPointData()->AddArray(GetFiberColors());
in the constructor and in SetFiberPolyData() after the color has been set. It seems good to me. Maybe I'm forgetting some edge cases though.

Nil

------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to