Hi Marco,

thanks for that.... yes it helps, up to a point. This sort of thing appears to 
work:

    vtkRenderWindow* vtkWindow = m_RenderWindow->GetVtkRenderWindow();
    mitk::BaseRenderer::Pointer baseRenderer = 
mitk::BaseRenderer::GetInstance(vtkWindow);
    mitk::SliceNavigationController::Pointer controller = 
baseRenderer->GetSliceNavigationController();

    controller->Update(mitk::SliceNavigationController::Frontal, true, true, 
false);
    controller->GetSlice()->SetPos(sliceNumber);

    baseRenderer->GetDisplayGeometry()->Fit();
    mitk::RenderingManager::GetInstance()->RequestUpdate(vtkWindow);

appears to work.  But where does the controller get its idea of geometry from? 
Same question for the BaseRenderer?

Imagine you have two 3D images, which have similar but not identical numbers of 
voxels, image dimensions and image orientations. Imagine that they are mostly 
overlapping, but there is clearly some mis-alignment, and the axes are not 
aligned.

If I had two render windows, such as I have in my new editor, and when I drag 
and drop 1 image onto a render window, I want the "geometry" to be that of the 
image, not of the combined bounding box. So I need to be able to slice through 
3D space, in axial, coronal or sagittal direction, aligned with the image axes, 
which may well be misaligned with the world coordinate system.  Now, if I drag 
and drop the other image onto another window, this other window should have 
independent geometry that is aligned with the second image, and will be 
different to the first image.

Then, if I drag and drop both images onto 1 window, I would like the geometry 
to be that of the first image, not of some combined volume so that for the 
first image you are slicing exactly in alignment with the axial, coronal or 
sagittal places, but for the second image we just reslice the matching plane, 
which may well be misaligned with the natural image planes of the second image, 
as it is mis-registered to the first.

So, I think I need to know exactly how to set up a slicing through an image, 
and Im struggling a bit.  The example in org.mitk.gui.qt.examples simply uses 
the SliceNavigationController.  But if you have two images, the bounding box 
seems too large. Also, if i start using anything like:

controller->SetInputWorldGeometry(<some geometry>);
controller->GetCreatedWorldGeometry()
baseRenderer->SetWorldGeometry(<some geometry>);
baseRenderer->GetCurrentWorldGeometry()
baseRenderer->GetCurrentWorldGeometry2D()

then my images just disappear.

Do you have any further suggestions, as at the moment Im just guessing.

Thanks

Matt





On 15 Dec 2011, at 12:45, Marco Nolden wrote:

Hi Matt,

there is an example view, QmitkViewInitializationView, located in the new 
org.mitk.gui.qt.examples plugin. In the OnApply method you can find some code 
using the SliceNavigationController. Does that help?

Best,
Marco


On 12/15/2011 01:36 PM, Clarkson, Matt wrote:
Hi there,

Please can anyone tell me what is the best way to set up an initial view, or 
rather the best source of that information, as I can't seem to get it right?

For example, when a new image is loaded into ExtApp, the QmitkStdMultiWidget 
sets up the correct views for Axial, Coronal and Sagittal views and the 
corresponding 3D view. I need something like that.

However, I have my own QmitkRenderingWindow inside my own editor, and when I 
drag and drop an image onto a window, I need to set up the correct slice, 
correct zoom, correct camera position etc.
I have also tried looking at the tutorial examples, and Step6 I think uses 
QmitkSliceWidget, but I have tried copying that, and I must be missing the 
point somewhere.

Please does anyone have some suggestions, of the most logical way to accumulate 
the right information to understand how to set these views from scratch?

Thanks ever so much.

Matt



------------------------------------------------------------------------------
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.
But none more important than the need to reduce IT complexity
while improving strategic productivity.  Learn More!
http://www.accelacomm.com/jaw/sdnl/114/51507609/
_______________________________________________
mitk-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/mitk-users


--
----------------------------------------------------------------------
Dipl.-Inform. Med. Marco Nolden
Deutsches Krebsforschungszentrum       (German Cancer Research Center)
Div. Medical & Biological Informatics          Tel: (+49) 6221-42 2325
Im Neuenheimer Feld 280                        Fax: (+49) 6221-42 2345
D-69120 Heidelberg                             eMail: 
[email protected]<mailto:[email protected]>


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to