Yes, providing specialized mappers for your intended use case is one solution.
The question is what you want to achieve? Why are you using the extra slice? Do
you want to show the user something on that slice? Then maybe it is okay to
live with the current solution but as a workaround display a PlanarFigure on
top of your extra slice to emphasize the region of interest in the extra slice?
From: Hongzhi Lan [mailto:hong...@stanford.edu]
Sent: Mittwoch, 23. März 2016 11:34
To: Kislinskiy, Stefan; mitk-users@lists.sourceforge.net
Subject: Re: [mitk-users] Showing an arbitrary reslice of 3D image in
QmitkSliceWidget
Thanks! You mean, for PlaneGeometry I may need to write alternatives for
PlaneGeometryDataMapper2D and PlaneGeometryDataVtkMapper3D?
If using PlanarFigure, can I show an arbitrary reslice of 3D image in both
QmitkSliceWidget and 3D view in QmitkStdMultiWidget? Are there any examples
about how to use PlanarFigure to do this?
Thanks,
Hongzhi
________________________________
From: Kislinskiy, Stefan
<s.kislins...@dkfz-heidelberg.de<mailto:s.kislins...@dkfz-heidelberg.de>>
Sent: Tuesday, March 22, 2016 4:17 AM
To: Hongzhi Lan;
mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: RE: [mitk-users] Showing an arbitrary reslice of 3D image in
QmitkSliceWidget
Hi Hongzhi,
the size/geometry of the slice is fine (you can check this by Reinit on the
slice in the Data Manager. However, the standard PlaneGeometry mappers do not
work as you may expect. They use the reference geometry bounds or the world
bounds to cut the planes in shape. You could try to write your own
PlaneGeometry mapper(s) for your PlaneGeometry node or try a different approach
which requires less work, e.g., use a rectangular PlanarFigure to highlight the
ROI in your image slice.
Best,
Stefan
From: Hongzhi Lan [mailto:hong...@stanford.edu]
Sent: Dienstag, 22. März 2016 07:55
To: mitk-users@lists.sourceforge.net<mailto:mitk-users@lists.sourceforge.net>
Subject: [mitk-users] Showing an arbitrary reslice of 3D image in
QmitkSliceWidget
Hello everyone,
I'm tring to show an arbitrary reslice of 3D image in QmitkSliceWidget and also
3D view in QmitkStdMultiWidget at the same time.
The orientation of the reslice looks fine, but in QmitkSliceWidget and 3D view
QmitkStdMultiWidget the sizes are not right (see the attachments). It should be
a small square(40x40) (see the source code below).
I really need some help on thie issue. I'm using MITK 2015.05.2 and Ubuntu 14.
Thanks!
Hongzhi
The code is as below:
======================
QmitkSliceWidget* m_SliceWidget=new QmitkSliceWidget(parent);
m_SliceWidget->SetDataStorage(dataStorage);
mitk::PlaneGeometry::Pointer planegeometry = mitk::PlaneGeometry::New();
mitk::Point3D origin;
mitk::Vector3D right, bottom, normal;
mitk::FillVector3D(origin, 1.0, 1.0, 1.0);
mitk::FillVector3D(right, 1.0, 0, 0);
mitk::FillVector3D(bottom, 0, 1.0, 1.0);
planegeometry->InitializeStandardPlane(40,40, right.GetVnlVector(),
bottom.GetVnlVector());
planegeometry->SetOrigin(origin);
mitk::SlicedGeometry3D::Pointer slicedGeo3D=mitk::SlicedGeometry3D::New();
slicedGeo3D->InitializeSlicedGeometry(1);
slicedGeo3D->SetPlaneGeometry(planegeometry,0);
slicedGeo3D->SetReferenceGeometry(node_image3D->GetData()->GetTimeGeometry()->GetGeometryForTimeStep(0));
m_SliceWidget->GetSliceNavigationController()->SetInputWorldGeometry3D(slicedGeo3D);
m_SliceWidget->GetSliceNavigationController()->SetViewDirection(mitk::SliceNavigationController::Original);
m_SliceWidget->GetSliceNavigationController()->Update();
GetDataStorage()->Add(m_SliceWidget->GetRenderer()->GetCurrentWorldPlaneGeometryNode());
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users