<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>wow! it works! <IMG class="wlEmoticon wlEmoticon-partysmile"
style="BORDER-TOP-STYLE: none; BORDER-BOTTOM-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none"
alt=Party src="cid:73A1B73C9EA8435D8DDE458300829C4A@int.cineca.it"></DIV>
<DIV> </DIV>
<DIV>thank you so much!</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> </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:50 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>Yes, I suspect the class needs to be fixed. If you have a VTK build
you can try editing vtkFollower.cxx to include the following line
<DIV> </DIV>
<DIV>
<DIV> this->Device->SetTexture(this->GetTexture());</DIV></DIV>
<DIV> </DIV>
<DIV>around line number 272 (right before the ComputeMatrix call)</DIV>
<DIV> </DIV>
<DIV>if that works I can put in a fix </DIV>
<DIV> </DIV>
<DIV>Ken</DIV></DIV>
<DIV class=gmail_extra>
<DIV> </DIV>
<DIV class=gmail_quote>On Fri, Aug 12, 2016 at 1:37 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>thx for your answer <IMG
style="BORDER-TOP-STYLE: none; BORDER-BOTTOM-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none"
alt=Sorriso src="cid:050065AD47AC434E9770120A0B215BD0@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><B>From:</B> <A title=ken.martin@kitware.com
href="mailto:ken.martin@kitware.com" target=_blank>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"
target=_blank>Roberto Gori</A> </DIV>
<DIV><B>Cc:</B> <A title=vtk-developers@vtk.org
href="mailto:vtk-developers@vtk.org" target=_blank>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<vtkPlaneSource<WBR>> plane
=<BR>vtkSmartPointer<vtkPlaneSource<WBR>>::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>::N<WBR>ew();<BR>texture->SetInputConnection(jP<WBR>EGReader->GetOutputPort());<BR><BR>vtkSmartPointer<vtkTextureMapT<WBR>oPlane>
texturePlane
=<BR>vtkSmartPointer<vtkTextureMapT<WBR>oPlane>::New();<BR>texturePlane->SetInputConnecti<WBR>on(plane->GetOutputPort());<BR><BR>vtkSmartPointer<vtkPolyDataMap<WBR>per>
planeMapper
=<BR>vtkSmartPointer<vtkPolyDataMap<WBR>per>::New();<BR>planeMapper->SetInputConnectio<WBR>n(texturePlane->GetOutputPort(<WBR>));<BR><BR>vtkSmartPointer<vtkFollower>
texturedPlane
=<BR>vtkSmartPointer<vtkFollower>::<WBR>New();<BR>texturedPlane->SetMapper(plane<WBR>Mapper);<BR>texturedPlane->SetTexture(text<WBR>ure);<BR><BR><BR>//
Visualize the textured plane<BR>vtkSmartPointer<vtkRenderer> renderer
=<BR>vtkSmartPointer<vtkRenderer>::<WBR>New();<BR>renderer->AddActor(texturedPla<WBR>ne);<BR><BR>renderer->SetBackground(.1,
.2, .3); // Background color dark
blue<BR>renderer->ResetCamera();<BR><BR>texturedPlane->SetCamera(rende<WBR>rer->GetActiveCamera());<BR><BR><BR>vtkSmartPointer<vtkRenderWindo<WBR>w>
renderWindow
=<BR>vtkSmartPointer<vtkRenderWindo<WBR>w>::New();<BR>renderWindow->AddRenderer(rend<WBR>erer);<BR><BR>vtkSmartPointer<vtkRenderWindo<WBR>wInteractor>
renderWindowInteractor
=<BR>vtkSmartPointer<vtkRenderWindo<WBR>wInteractor>::New();<BR>renderWindowInteractor->SetRen<WBR>derWindow(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/opensou<WBR>rce/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/mail<WBR>man/listinfo/vtk-developers</A><BR><BR><BR></BLOCKQUOTE></DIV><SPAN
class=HOEnZb><FONT color=#888888><BR><BR clear=all>
<DIV> </DIV>-- <BR>
<DIV data-smartmail="gmail_signature">Ken Martin PhD
<DIV>Chairman & CFO<BR>Kitware Inc.<BR>28 Corporate Drive<BR>Clifton Park
NY 12065<BR><A href="tel:518%20371%203971" target=_blank
value="+15183713971">518 371 3971</A>
<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></FONT></SPAN></DIV></DIV></DIV></DIV></DIV></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>