Hi Vincent,<br><br>Couple of things you might want to look into-<br><br>1) Validity time of the transform that is set to the MeshObject.<br>2) View Camera parameters<br><br>-Andinet<br><br><div><span class="gmail_quote">On 10/24/07, 
<b class="gmail_sendername">Vincent Gratsac</b> <<a href="mailto:vincent.gratsac@irisa.fr">vincent.gratsac@irisa.fr</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi igstk-users,<br><br>I'm currently trying to apply a texture on a surface.<br>So I developed a new class called TexturedMeshObjectRepresentation which<br>inherits MeshObjectRepresentation.<br>This class does the same thing than its super class, but I added this
<br>code at the end of the CreateActors method :<br><br>>   if( m_TextureFileNameIsSet )<br>>     {<br>>       vtkPNMReader *pnmReader = vtkPNMReader::New();<br>>       pnmReader->SetFileName(m_TextureFileName.c_str());
<br>><br>>       if(!  pnmReader->CanReadFile(m_TextureFileName.c_str()))<br>>     {<br>>       igstkLogMacro( CRITICAL,"Unable to read texture file\n" );<br>>       return ;<br>>     }<br>>
<br>>       vtkTexture* texture = vtkTexture::New();<br>>       texture->SetInput( pnmReader->GetOutput() );<br>>       texture->InterpolateOn();<br>><br>>       meshActor->SetTexture(texture);<br>
>     }<br>><br>>   this->AddActor( meshActor );<br><br>where m_TextureFileName contains the name of the corresponding PNM file.<br><br>The resulting surface representation is black.<br>I tried to write a simple VTK executable in order to test this code, and
<br>it works correctly...<br><br>So does anyone know where can be the problem ?<br><br>Thank you and have a nice day !<br><br>--<br>Vincent Gratsac<br>----------------------------------------------------<br>Unité/Projet VisAGeS U746
<br>INSERM/INRIA/CNRS/U. de Rennes I<br>IRISA<br>Campus de Beaulieu, 35042 Rennes Cedex, France<br><br>Ph:  +33 (0) 2 23 23 49 20/ Fax: +33/0 2 99 84 71 71<br>email: <a href="mailto:Vincent.Gratsac@irisa.fr">Vincent.Gratsac@irisa.fr
</a><br><a href="http://www.irisa.fr/visages/">http://www.irisa.fr/visages/</a><br>-----------------------------------------------------<br><br>_______________________________________________<br>IGSTK-Users mailing list<br>
<a href="mailto:IGSTK-Users@public.kitware.com">IGSTK-Users@public.kitware.com</a><br><a href="http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users">http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
</a><br></blockquote></div><br>