<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>thx for your answer <IMG class="wlEmoticon wlEmoticon-smile"
style="BORDER-TOP-STYLE: none; BORDER-BOTTOM-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none"
alt=Sorriso src="cid:CE1190B085064691AFBC569FAD487336@int.cineca.it"></DIV>
<DIV> </DIV>
<DIV>you are right but the result is the same.</DIV>
<DIV> </DIV>
<DIV>it works using a vtkActor instead of a vtkFollower.</DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=ken.martin@kitware.com
href="mailto:ken.martin@kitware.com">Ken Martin</A> </DIV>
<DIV><B>Sent:</B> Friday, August 12, 2016 7:02 PM</DIV>
<DIV><B>To:</B> <A title=r.gori@cineca.it href="mailto:r.gori@cineca.it">Roberto
Gori</A> </DIV>
<DIV><B>Cc:</B> <A title=vtk-developers@vtk.org
href="mailto:vtk-developers@vtk.org">VTK Developers</A> </DIV>
<DIV><B>Subject:</B> Re: [vtk-developers] possible bug in vtk 7.1 -
OpenGL2</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV dir=ltr>What happens if you remove the TextureMapToPlane? PlaneSource
generates texture coordinate by default. So connect that directly to the mapper
and what happens?</DIV>
<DIV class=gmail_extra>
<DIV> </DIV>
<DIV class=gmail_quote>On Fri, Aug 12, 2016 at 12:21 PM, Roberto Gori <SPAN
dir=ltr><<A href="mailto:r.gori@cineca.it"
target=_blank>r.gori@cineca.it</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>sorry for cross-posting but no one is answering to my question on the
vtkusers list.</DIV>
<DIV> </DIV>
<DIV><FONT face="Times New Roman">As you can see running this code the plane
is visualized without texture.</FONT></DIV>
<DIV><FONT face="Times New Roman"></FONT> </DIV>
<DIV><FONT face="Times New Roman">I think the problem is in rendering a
texture on a vtkFollower. </FONT></DIV>
<DIV><FONT face="Times New Roman">Can someone open a bug on
Mantis?</FONT> </DIV>
<DIV><FONT face="Times New Roman"><FONT
face=Calibri></FONT></FONT> </DIV>
<DIV><BR>#include <vtkImageData.h><BR>#include
<vtkJPEGReader.h><BR>#include <vtkPolyDataMapper.h><BR>#include
<vtkPolyData.h><BR>#include <vtkSmartPointer.h><BR>#include
<vtkTextureMapToPlane.h><BR>#include
<vtkPlaneSource.h><BR>#include <vtkTexture.h><BR>#include
<vtkRenderer.h><BR>#include <vtkRenderWindow.h><BR>#include
<vtkRenderWindowInteractor.h><BR>#include
<vtkFollower.h><BR>#include <vtkVersion.h><BR><BR>int main ( int
argc, char *argv[] )<BR>{<BR>// Parse command line arguments<BR>if ( argc != 2
)<BR>{<BR>std::cerr << "Usage: " << argv[0] << " Filename"
<< std::endl;<BR>return EXIT_FAILURE;<BR>}<BR><BR>std::cout <<
"VTK version:" << vtkVersion::GetVTKVersion() <<
std::endl;<BR><BR>std::string inputFilename = argv[1];<BR><BR>// Read the
image which will be the texture<BR>vtkSmartPointer<vtkJPEGReader>
jPEGReader
=<BR>vtkSmartPointer<vtkJPEGReader><WBR>::New();<BR>jPEGReader->SetFileName
( inputFilename.c_str() );<BR><BR>// Create a
plane<BR>vtkSmartPointer<<WBR>vtkPlaneSource> plane
=<BR>vtkSmartPointer<<WBR>vtkPlaneSource>::New();<BR>plane->SetCenter(0.0,
0.0, 0.0);<BR>plane->SetNormal(0.0, 0.0, 1.0);<BR><BR>// Apply the
texture<BR>vtkSmartPointer<vtkTexture> texture
=<BR>vtkSmartPointer<vtkTexture>::<WBR>New();<BR>texture->SetInputConnection(<WBR>jPEGReader->GetOutputPort());<BR><BR>vtkSmartPointer<<WBR>vtkTextureMapToPlane>
texturePlane
=<BR>vtkSmartPointer<<WBR>vtkTextureMapToPlane>::New();<BR>texturePlane-><WBR>SetInputConnection(plane-><WBR>GetOutputPort());<BR><BR>vtkSmartPointer<<WBR>vtkPolyDataMapper>
planeMapper
=<BR>vtkSmartPointer<<WBR>vtkPolyDataMapper>::New();<BR>planeMapper-><WBR>SetInputConnection(<WBR>texturePlane->GetOutputPort())<WBR>;<BR><BR>vtkSmartPointer<vtkFollower>
texturedPlane
=<BR>vtkSmartPointer<vtkFollower>::<WBR>New();<BR>texturedPlane->SetMapper(<WBR>planeMapper);<BR>texturedPlane->SetTexture(<WBR>texture);<BR><BR><BR>//
Visualize the textured plane<BR>vtkSmartPointer<vtkRenderer> renderer
=<BR>vtkSmartPointer<vtkRenderer>::<WBR>New();<BR>renderer->AddActor(<WBR>texturedPlane);<BR><BR>renderer->SetBackground(.1,
.2, .3); // Background color dark
blue<BR>renderer->ResetCamera();<BR><BR>texturedPlane->SetCamera(<WBR>renderer->GetActiveCamera());<BR><BR><BR>vtkSmartPointer<<WBR>vtkRenderWindow>
renderWindow
=<BR>vtkSmartPointer<<WBR>vtkRenderWindow>::New();<BR>renderWindow->AddRenderer(<WBR>renderer);<BR><BR>vtkSmartPointer<<WBR>vtkRenderWindowInteractor>
renderWindowInteractor
=<BR>vtkSmartPointer<<WBR>vtkRenderWindowInteractor>::<WBR>New();<BR>renderWindowInteractor-><WBR>SetRenderWindow(renderWindow);<BR><BR>renderWindow->Render();<BR><BR>renderWindowInteractor->Start(<WBR>);<BR><BR>return
EXIT_SUCCESS;<BR>}<BR></DIV>
<DIV> </DIV>
<DIV> </DIV></DIV></DIV></DIV><BR>______________________________<WBR>_________________<BR>Powered
by <A href="http://www.kitware.com" rel=noreferrer
target=_blank>www.kitware.com</A><BR><BR>Visit other Kitware open-source
projects at <A href="http://www.kitware.com/opensource/opensource.html"
rel=noreferrer
target=_blank>http://www.kitware.com/<WBR>opensource/opensource.html</A><BR><BR>Search
the list archives at: <A href="http://markmail.org/search/?q=vtk-developers"
rel=noreferrer
target=_blank>http://markmail.org/search/?q=<WBR>vtk-developers</A><BR><BR>Follow
this link to subscribe/unsubscribe:<BR><A
href="http://public.kitware.com/mailman/listinfo/vtk-developers"
rel=noreferrer
target=_blank>http://public.kitware.com/<WBR>mailman/listinfo/vtk-<WBR>developers</A><BR><BR><BR></BLOCKQUOTE></DIV><BR><BR
clear=all>
<DIV> </DIV>-- <BR>
<DIV class=gmail_signature data-smartmail="gmail_signature">Ken Martin PhD
<DIV>Chairman & CFO<BR>Kitware Inc.<BR>28 Corporate Drive<BR>Clifton Park NY
12065<BR>518 371 3971
<DIV> </DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: tahoma,sans-serif">This
communication, including all attachments, contains confidential and legally
privileged information, and it is intended only for the use of the
addressee. Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any action
taken in reliance on it is prohibited and may be unlawful. If you received this
communication in error please notify us immediately and destroy the original
message. Thank
you.</SPAN></DIV></DIV></DIV></DIV></DIV></DIV></DIV></BODY></HTML>