>
> You can also try to explicitly update your SliceNavigationController so
>> that the sliders and steppers are updated too.
>>
>
> No, that controller is updated, just the geometry that it accesses is
> incorrect. I am trying to localize where it gets wrong. I found that
> mitk::DataStorage::ComputeBoundingGeometry3D(...) gives back a wrong time
> step number, but the real cause can happen even earlier.
>
The problem is in this function. My initialization is correct, but this
function creates a new TimeSlicedGeometry, and this new one is used by the
image navigator. Look at this code (mitkDataStorage.cpp, line 367-378):
// minimal time bounds of a single time step for all geometries
TimeBounds minTimeBounds;
minTimeBounds[0] = 0;
minTimeBounds[1] = 1;
// compute the number of time steps
unsigned int numberOfTimeSteps = 1;
if (maximalTime!=0) // make sure that there is at least one time sliced
geometry in the data storage
{
minTimeBounds[0] = minimalTime;
minTimeBounds[1] = minimalTime + minimalIntervallSize;
numberOfTimeSteps = (maximalTime-minimalTime)/minimalIntervallSize;
}
Before this a the shortest time interval is searched for, and here the time
step is calculated simply by dividing the whole time range by the length of
the shortest interval. Around line 400 this is set as the number of time
steps:
timeSlicedGeometry = TimeSlicedGeometry::New();
timeSlicedGeometry->InitializeEvenlyTimed(geometry,numberOfTimeSteps);
So, this behaviour seems to be intentional. I do not know, however, if it
is good to force evenly timed time steps.
In my code I call this function explicitly if the data manager selection
changes. I have to do this because of a bug that I reported here:
http://bugs.mitk.org/show_bug.cgi?id=10234
So after the selection changes, if an image with different time bounds is
selected then I have to reinitalize the views with this new geometry. What
I can do now is that I write an own function to calculate the new geometry.
The problem is that this function is called from a lot of places within
MITK, e.g. by the Global Reinit.
Do you think this calculation can be changed? Shall we report it as a bug?
Thanks,
Miklos
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users