Hi Klaus, thanks for your reply. Yes, the image is made out of 3 uchar MET_UCHAR components, saved in MetaImage format and it partly works.
The QmitkSliceWidget show wonderful colored slices but the QmitkRenderWindow displays only gray planes. So far, I could not figure how to persuade the QmitkRenderWindow to display colors as well. The windowing property looks kind of strange, but as a standard window/level property is created when loading the data and adding it to the storage, it should be the same for both widgets, right? Any help would be very appreciated. I put a breakpoint at * mitkImageMapper2D.cpp:714 and the condition "if ( pic->bpe == 24 ) // RGB image" evaluates to true. Thanks, Jan Fritzsche Klaus wrote: > Hi Jan, > RGB should be supported, at least if you use 3 uchar components. You could > take a look at mitkPixelType.cpp for a deeper understanding. > Regards, > Klaus > > -----Ursprüngliche Nachricht----- > Von: Jan [mailto:[email protected]] > Gesendet: Dienstag, 6. Januar 2009 12:14 > An: Neuhaus Jochen > Cc: [email protected] > Betreff: Re: [mitk-users] 3D view with 3 orthogonal > slices(withoutQmitkSliceWidget) > > Hi Jochen, > > ups, could it be that mitk::Image does not support RGB images? > >> ../mitk-0.10.0/Core/DataStructures/mitkImage.cpp, line 1336 >> Pixel type N3itk6VectorIhLj3EEE not supported by AccessByItk > > Thanks, > 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 ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
