Hi Xavier,

Are you skipping the initialization in mitk::RenderingManager or in the
respective file-open methods in QmitkMainTemplate? InitializeViews() is
also called during application startup, before any dataset is loaded. It
is however necessary to initialize to a dataset in order to have useful
geometries etc. (i.e., InitializeViews() has to be executed when the
first dataset is loaded). When implementing the skipping e.g. in
QmitkMainTemplate::fileOpenGetFactoryOutput(...), MITK seems to produce
the desired behavior in my configuration.

Re-orienting the SliceNavigationControllers manually as you suggest
should also work. You can use the convenience function
SliceNavigationController::ReorientSlices(...):just save the current
center point and the normals of all three planes before loading and,
using this method, restore them afterwards. However, note that the slice
stack will nevertheless be oriented with respect to the *new* dataset.
For datasets differing in dimensions, this means that the second dataset
will now provide the extent and orientation.

Please let us know if you have any further questions!


Regards,
Mathias



-----Original Message-----
From: Xavier Planes [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 08, 2008 11:08 AM
To: [email protected]
Subject: Re: [mitk-users] InitializeViews resets the orientation of the
2Dplanes

Hi Mathias,

        Thanks for your quick answer!. If I understood correctly, you
propose to call InitializeViews( ) for the first loaded data and disable
it
for the additional loaded data. I've tried this and It seems that It
doesn't
work because some classes are not initialized correctly. I get this
error:

        WARNING: In
F:\CVS\MITK_SVN\mitk\Core\Rendering\mitkImageMapper2D.cpp, line 689
        ImageMapper2D (0D4BB878): reslicer returned empty image

        I think we should initialize all the SliceNavigationControllers
using the ComputeVisibleBoundingGeometry3D( ) function. However, I would
like to backup the current orientation of each 2D plane geometry of each
2D
view and restore the orientation once the Initialization has finished. 

       One solution could be to create an operation OpROTATE and call it
for
each SliceNavigationController. What do you think?

Thanks!
Xavi


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to