Hi Juan, the plane is a child of my image node (do you mean child in the sense that the plane is a child node of the image node in the DataTree?). When I run the debugger I can see that the ImageMapper2D of my image node gets evaluated but it seems like the image that gets extracted as texture is invalid (just my impression from the member values of all the classes involved, I might have got that wrong). So I reckon I got a problem with the mitk::ImageMapper2D.
I set the default properties for the image node like this: imageMapper2D->SetDefaultProperties(imageNode); This did not change anything. The image node was set to visible beforehand anyway. Just to make sure if I get that right. I set up an ordinary mitk::Image as data in an ordinary mitk::DataTreeNode. Then I set up an mitk::ImageMapper2D for the image node which kind of gets me a 2D view of my mitk::Image. This view will be used as texture for a plane (mitk::Geometry2DData) which has the mapper mitk::Geometry2DDataVtkMapper3D. Right? Cheers, Marcel Juan A. Moya schrieb: > Hi Marcel, > Check that the standard plane is child of your image node. > Check that the image node has the default properties (like visible true) > > > Juan Antonio Moya > Scientific developer > Computational Imaging Lab, Pompeu Fabra University > Networking Research Center on Bioengineering, Biomaterials and Nanomedicine > (CIBER-BBN) > > Information & Communication Technologies Department - D. 313 > Pompeu Fabra University, Pg. Circumval·lació 8 > 08003 Barcelona - Spain > Phone +34 935 421350 > -----Mensaje original----- > De: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] En nombre de Marcel > Schenderlein > Enviado el: martes, 04 de marzo de 2008 17:23 > Para: [email protected] > Asunto: [mitk-users] Create an arbitrary plane with a texture > (Geometry2DDataVtkMapper3D, ImageMapper2D) > > Hi list, > > what I want to do is the following: get a plane in space which I can > place wherever I like and which shows an image which is a slice from an > mitk::Image. > > So far I can see the plane but not the image/texture on it. > > > I did the following: > > nodeIt = > mitk::DataTreeHelper::FindIteratorToNode(m_TreeIterator,currentNode); > > planeGeometry = mitk::PlaneGeometry::New(); > planeGeometry->InitializeStandardPlane(someRightVector,someDownVector); > planeGeometry->SetBounds(someBounds); > > planeData = mitk::Geometry2DData::New(); > planeData->SetGeometry2D(planeGeometry); > > mapper = mitk::Geometry2DDataVtkMapper3D::New(); > mapper->SetDataIteratorForTexture( > nodeIt.GetPointer() ); // -- is that correct? > > planeNode = mitk::DataTreeNode::New(); > planeNode->SetData(planeData); > planeNode->SetMapper(mitk::BaseRenderer::Standard3D, mapper); > > imageMapper2D = mitk::ImageMapper2D::New(); > currentNode->SetMapper(mitk::BaseRenderer::Standard2D, imageMapper2D); > > nodeIt->Add(planeNode); > > > > > Any ideas what goes wrong? Do I have to use Geometry2DDataVtkMapper3D in > another way? Do I have to initialize the ImageMapper2D and how would I > do that? > > Thanks in advance for every help! > > Cheers, Marcel > > > -- --------------------------------------------- Dipl.-Ing. Marcel Schenderlein Institute of Measurement, Control and Microtechnology Ulm University Albert Einstein Allee 41 89081 Ulm, Germany Phone: +49 (0) 731 50 26338 FAX: +49 (0) 731 50 26301 Mobile: +49 (0) 176 217 33668 Email: [EMAIL PROTECTED] web: http://www.uni-ulm.de/in/mrm ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
