Hi Jochen,

thanks for the hint, that looks promissing :-)

Best Regards,
Jan


Neuhaus Jochen wrote:
> Hi Jan,
> 
> you could try to use the QmitkStdMultiWidget (see 
> <http://mbi.dkfz-heidelberg.de/mitk/documentation/doxygen/classQmitkStdMultiWidget.html>
>  and Tutorial Step 8). It should take care of plane initialization 
> completely. Maybe it would even be a good idea to use the MITK MainApp 
> instead of writing your own application.
> 
> Regards, 
>  Jochen
> 
> ---
> Jochen Neuhaus
> Deutsches Krebsforschungszentrum
> Medizinische und Biologische Informatik
> Im Neuenheimer Feld 280
> D-69120 Heidelberg
> Tel.: +49 (0) 6221 / 42-2329
> Fax: +49 (0) 6221 / 42-2345
> http://www.dkfz-heidelberg.de/de/mbi/people/Jochen_Neuhaus.html
> 
>> -----Ursprüngliche Nachricht-----
>> Von: Jan [mailto:[email protected]]
>> Gesendet: Montag, 5. Januar 2009 13:52
>> An: [email protected]
>> Betreff: [mitk-users] 3D view with 3 orthogonal slices
>> (withoutQmitkSliceWidget)
>>
>> Hi All,
>>
>> I got stuck and it would be great if you could help me.
>>
>> I modified the Tutorial Step5 program in a way that I do not create the
>> QmitkSliceWidgets anymore. Unfortunately, now the slices in the 3D view
>> are also gone. So I added some code (see below) and voila, the planes
>> are visible again - unfortunately without the content of the image
>> (they
>> are completly black).
>>
>> What I am trying to do is to display some 3D voxel color image in a
>> rotatable 3D view with 3 orthogonal slices. Similar to the yellow view
>> shown in
>> http://www.mitk.org/wiki/Screenshots?action=AttachFile&do=get&target=ve
>> sselTool.png
>>
>>
>> Could you tell me
>> a) how to display the transversal, sagittal and frontal planes in the
>> 3D
>> view (with image content)?
>> b) if there is a more elagant way than the code I wrote below?
>> c) if you know something I could read to learn these things with mitk?
>>
>> Thanks,
>> Jan
>>
>>
>> //*********************************************************************
>> ****
>>   // Part Va: 3D view
>>
>> //*********************************************************************
>> ****
>>
>>   // Create a renderwindow
>>   QmitkRenderWindow renderWindow(&toplevelWidget);
>>
>>   // Tell the renderwindow which (part of) the tree to render
>>   renderWindow.GetRenderer()->SetData(storage);
>>
>>   // Use it as a 3D view
>>   renderWindow.GetRenderer()-
>>> SetMapperID(mitk::BaseRenderer::Standard3D);
>>   const mitk::Geometry3D* geometry3D =
>> renderWindow.GetRenderer()->GetWorldGeometry();
>>   mitk::SlicedGeometry3D::Pointer slicedGeometry3DTransversal =
>> mitk::SlicedGeometry3D::New();
>>   mitk::SlicedGeometry3D::Pointer slicedGeometry3DSagittal =
>> mitk::SlicedGeometry3D::New();
>>   mitk::SlicedGeometry3D::Pointer slicedGeometry3DFrontal =
>> mitk::SlicedGeometry3D::New();
>>   mitk::Geometry2DData::Pointer geometry2DDataTransversal =
>> mitk::Geometry2DData::New();
>>   mitk::Geometry2DData::Pointer geometry2DDataSagittal =
>> mitk::Geometry2DData::New();
>>   mitk::Geometry2DData::Pointer geometry2DDataFrontal =
>> mitk::Geometry2DData::New();
>>   mitk::DataTreeNode::Pointer geometryNodeTransversal =
>> mitk::DataTreeNode::New();
>>   mitk::DataTreeNode::Pointer geometryNodeSagittal =
>> mitk::DataTreeNode::New();
>>   mitk::DataTreeNode::Pointer geometryNodeFrontal =
>> mitk::DataTreeNode::New();
>>
>>   slicedGeometry3DTransversal->InitializePlanes( geometry3D,
>> mitk::PlaneGeometry::Transversal );
>>   slicedGeometry3DSagittal->InitializePlanes( geometry3D,
>> mitk::PlaneGeometry::Sagittal );
>>   slicedGeometry3DFrontal->InitializePlanes( geometry3D,
>> mitk::PlaneGeometry::Frontal );
>>   geometry2DDataTransversal->SetGeometry2D(
>> slicedGeometry3DTransversal->GetGeometry2D( 100 ) );//compute from
>> image
>>   geometry2DDataSagittal->SetGeometry2D(
>> slicedGeometry3DSagittal->GetGeometry2D( 100 ) );//compute from image
>>   geometry2DDataFrontal->SetGeometry2D(
>> slicedGeometry3DFrontal->GetGeometry2D( 100 ) );//compute from image
>>   geometryNodeTransversal->SetData( geometry2DDataTransversal );
>>   geometryNodeSagittal->SetData( geometry2DDataSagittal );
>>   geometryNodeFrontal->SetData( geometry2DDataFrontal );
>>   it.Add( geometryNodeTransversal );
>>   it.Add( geometryNodeSagittal );
>>   it.Add( geometryNodeFrontal );
>>
>>
>> -----------------------------------------------------------------------
>> -------
>> _______________________________________________
>> mitk-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to