Hi Johannes,

You can invoke a "Reset View" by doing the following (Codesnippet from 
QmitkStdMultiWidget->ResetCrosshair(), Line 2005):

    mitk::NodePredicateNot::Pointer pred
    = 
mitk::NodePredicateNot::New(mitk::NodePredicateProperty::New("includeInBoundingBox"
    , mitk::BoolProperty::New(false)));

    mitk::DataStorage::SetOfObjects::ConstPointer rs = 
m_DataStorage->GetSubset(pred);

    // calculate bounding geometry of these nodes
    mitk::TimeSlicedGeometry::Pointer bounds = 
m_DataStorage->ComputeBoundingGeometry3D(rs, "visible");
    
    mitk::RenderingManager::GetInstance()->InitializeViews(bounds);

    // reset interactor to normal slicing
    this->SetWidgetPlaneMode(PLANE_MODE_SLICING);

As you can see this leads into a recalculation of the BoundingBox of the 
WorldGeometry of the Renderers. (Normally the Renderers should already have the 
correct BoundingBox.) 
I am pretty sure that the reason for your cropped plane is that the current 
BoundingBox is too small. By performing a "Reset View" this is corrected. 

How do you load your data into the DataStorage? Normally if you load an 
DataObject into the DataStorage the BoundingBox is recalculated autmatically. 
Maybe you have done something wrong thereby.

Regards
Andreas




-----Ursprüngliche Nachricht-----
Von: Johannes Feulner [mailto:[email protected]] 
Gesendet: Freitag, 29. Juli 2011 14:59
An: Fetzer, Andreas
Betreff: Re: [mitk-users] Curved MPR is cropped for some reason


 Hi Andreas,

 I finally figured out that the code works as is should if I click on  "Reset 
view" in one of the popup menues of the MPRs _before_ the code is  executed. If 
I just load an image, do not click "reset view" and execute  the code, the 
resulting MPRs are cropped. This behaviour is a bit  strange.

 Btw. does someone know how to invoke "Reset view" from within a plugin
 ("bundle") of the MainApp application?

 Best,
 Johannes

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to