Hi Li,

I took some lines of code from our tutorial step 1. There an image is displayed 
in the center of the center window:

        mitk::TimeSlicedGeometry::Pointer geo = 
ds->ComputeBoundingGeometry3D(ds->GetAll());
        mitk::RenderingManager::GetInstance()->InitializeViews( geo );
These lines will trigger a "reinit" (i.e. a set of the world geometry according 
to your needs).

        mitk::SliceNavigationController::Pointer sliceNaviController = 
renderWindow.GetSliceNavigationController();
        if (sliceNaviController)
                sliceNaviController->GetSlice()->SetPos( 0 );
This code will let you set the slice you want to render. The slice is rendered 
in the center of the render window. 

Even if you use the rotation or swivel mode, the center should always stay the 
image center. Could you tell us exactly what you are doing to get the new 
image? I recommend you to not modify the geometries in the imageVtkMapper2D 
directly. This can be very confusing. 

Best regards
Thomas

-----Original Message-----
From: Liu, Li [mailto:[email protected]] 
Sent: Sonntag, 17. Juni 2012 04:57
To: [email protected]
Subject: [mitk-users] rendering of slice from ExtractSliceFilter

 Hi All,

I got an issue that really bother me for a while. It is a little weird when 
rendering the slice from ExtractSliceFilter embedded in imageVtkMapper2D. The 
orientation of slice plane is set by renderer->SetWorldGeometry(), but it will 
change the display position of slice on rendering window if the plane origin is 
set to some value other than (0,0,0).

For example, if the plane vector is default value (0,0,1), the plane origin is 
set to (120, 120, 120). In rendering window, the slice is moved to left and 
bottom corner rather than stay on the center of rendering window.

Does anybody know how I can let the slice always locates at the center of 
rendering window?

Thanks

Li

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat 
landscape has changed and how IT managers can respond. Discussions will include 
endpoint security, mobile security and the latest in malware threats. 
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to