Hi Xavier,
Thanks for this report. As you have correctly described, the views are
initialized in Qmitk each time a new (image) dataset is loaded in order
to take the geometry of the new data into account. This behavior is
currently hard-coded, but it should be straightforward to implement the
behavior that you need.
InitializeViews()is called from several methods in QmitkMainTemplate
(for normal image loading, fileOpenGetFactoryOutput() is called). Here
are two ideas how the desired behavior could be realized:
1. Add a global option in the preferences specifying loading
behavior (reinitialize view for each dataset loaded or only for first
dataset), and query this option in the respective QmitkMainTemplate
methods
2. Provide the QmitkMainTemplate methods with an additional
(optional) bool parameter controlling whether to reinitialize or not.
The default behavior would then be to reinitialize, but in specific
situations (e.g. in the FileOpen-Button-Callback method of your own
functionality), the alternate behavior could be invoked.
Note that in both cases it will be necessary to call InitializeViews()
at least for the *first* dataset to make sure that MITK geometries are
configured in a reasonable fashion.
If you have plans of implementing either (or both) of these options, we
will be glad to include the changes in future versions of MITK!
Regards,
Mathias
From: Xavier Planes [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2008 3:09 PM
To: [email protected]
Subject: [mitk-users] InitializeViews resets the orientation of the 2D
planes
Hi all,
Each time a new data is opened, the function
RenderingManager::InitializeViews( ) is called. This function updates
all the SliceNavigationController instances:
snc->SetInputWorldGeometry( geometry );
snc->Update();
snc->GetSlice()->SetPos( snc->GetSlice()->GetSteps() / 2 );
My problem is that if the user modifies the orientation
of the 2D plane geometries in the 2D views (SliceNavigationController in
plane rotation mode), and a new data is opened, the orientation is set
to the default.
Is there any way to keep the orientation of the 2D planes?
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