Hi Frederico,
if you need to display only one additional resampled plane in the 3D
window, the following trick might help:
// get the 3D window
mitk::BaseRenderer::Pointer renderer =
this->GetRenderWindowPart()->GetQmitkRenderWindow(QString("3d"))->GetRenderer();
// with "plane" being the PlaneGeometry that describes the position of
your slice
// and "image" being the 3D image volume you want to reslice
plane->SetReferenceGeometry(image->GetGeometry());
// part 1 of the trick: tell the renderer to use this as its worldgeometry
renderer->SetWorldGeometry(plane);
// part 2 of the trick: add the DataNode containing the worldgeometry of
the renderer to the DataStorage
mitk::DataNode::Pointer planenode =
renderer->GetCurrentWorldGeometry2DNode();
this->GetDataStorageReference()->GetDataStorage()->Add(planenode);
Maybe there is also another, more elegant solution to the problem. This
may require a (maybe not yet existing) mapper for rendering 2D images in
3D.
Best,
Ivo
On 09.04.2013 21:15, Federico Milano wrote:
> Hi. We are trying to write a reslicing plugin. Given a 3D volume and
> the position and normal of a plane we want to obtain the slice of the
> volume determined by that plane. I'm using ExtractSliceFilter and it
> is working fine. The problem is that we are also trying to visualize
> this plane in the 3D view, together with the full volume, but we are
> not being able to do it. If we do a reinit on the slice then we see it
> in 2D, but I cannot see the volume:
>
> http://screencast.com/t/78Xx15u0r
>
> If we try to see it in a plane in the 3D view I get:
>
> http://screencast.com/t/umBOrTWL
>
> We would like to see the plane (with the slice projected on it) in the
> 3D view, and being able to see at the same time the 3 planes of the
> whole volume. Is this possible?
>
> We would really appreciate any hint.
>
> Best regards
>
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users