<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=FR link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt;font-family:Arial'>Hi,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt;font-family:Arial'>I wish to apply a texture (an image) to a digital
elevation model (fichier.vtk). Is what somebody could help me because I do not
find an example.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt;font-family:Arial'>I use VTK-4.4 and C++.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt;font-family:Arial'>Actually, the result is my Dem have a color of the
first pixel of my texture.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face=Arial><span lang=EN-GB style='font-size:
12.0pt;font-family:Arial'>Why apply the texture in my 3D objet ?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
7.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
7.0pt;font-family:Arial'>Actual code is :<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
7.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkPolyDataMapper.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkActor.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkRenderWindow.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkRenderer.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkRenderWindowInteractor.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkDataSetReader.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkDoubleArray.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkStructuredPoints.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkPoints.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkPointData.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkStructuredGrid.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkCellData.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkStructuredGridGeometryFilter.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkPolyDataNormals.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkTexture.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkJPEGReader.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkLookupTable.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>#include &quot;vtkImageData.h&quot;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>int main()<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>{<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; //Setup parameters<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; const char* m_filename =
&quot;C:/fichier.vtk&quot;;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; </span></font><font size=1 face=Arial><span
style='font-size:8.0pt;font-family:Arial'>double m_maxvizu = 400;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:8.0pt;
font-family:Arial'>&nbsp; double m_minvizu = -4000;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:8.0pt;
font-family:Arial'>&nbsp; </span></font><font size=1 face=Arial><span
lang=EN-GB style='font-size:8.0pt;font-family:Arial'>double m_elevation =
30000;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; //Setup texture<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; const char* m_image = &quot;C:/image.jpg&quot;;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkJPEGReader *reader = vtkJPEGReader::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; reader-&gt;SetFileName(m_image);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkLookupTable* VTKtable =
vtkLookupTable::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; VTKtable-&gt;SetNumberOfColors(1000);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; VTKtable-&gt;SetTableRange(0,1000);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; VTKtable-&gt;SetSaturationRange(0,0);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; VTKtable-&gt;SetHueRange(0,1);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; VTKtable-&gt;SetValueRange(0,1);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; VTKtable-&gt;SetAlphaRange(1,1);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; VTKtable-&gt;Build();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkImageData* ima = reader-&gt;GetOutput();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkTexture* VTKtexture = vtkTexture::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; VTKtexture-&gt;SetInput(ima);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; VTKtexture-&gt;InterpolateOn();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; VTKtexture-&gt;SetLookupTable(VTKtable);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; // Create VTK renderer<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkRenderer* Ren1 = vtkRenderer::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkRenderWindow* RenWin1 =
vtkRenderWindow::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; RenWin1-&gt;AddRenderer(Ren1);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; RenWin1-&gt;SetSize(1200,1000);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; // Create VTK interactor<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkRenderWindowInteractor *iren =
vtkRenderWindowInteractor::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; iren-&gt;SetRenderWindow(RenWin1);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; // Create VTK DataSetReader<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkDataSetReader* m_datasetreader;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; m_datasetreader = vtkDataSetReader::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; m_datasetreader-&gt;SetFileName(m_filename);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; m_datasetreader-&gt;Update();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; // Get Dataset dimensions<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkDataSet* m_points =
m_datasetreader-&gt;GetOutput();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; int dimx =
m_datasetreader-&gt;GetStructuredPointsOutput()-&gt;GetDimensions()[0];<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; int dimy =
m_datasetreader-&gt;GetStructuredPointsOutput()-&gt;GetDimensions()[1];<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; // Allocate vtkPoint structure<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkPoints* m_point = vtkPoints::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; m_point-&gt;SetNumberOfPoints(dimx*dimy);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; // Allocate scalar array<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkDoubleArray* m_array =
vtkDoubleArray::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; m_array-&gt;SetNumberOfComponents(1);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; m_array-&gt;SetNumberOfTuples(dimx*dimy);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; // Fill point and scalar array<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; for (int y=0;y&lt;dimy;y++)&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; for (int x=0;x&lt;dimx;x++)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int offset = x+y*dimx;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double m_coord[3];<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_points-&gt;GetPoint
(offset,m_coord);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int offset2 =
x+y*(dimx-1);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double* m_value =
m_points-&gt;GetPointData()-&gt;GetTuple(offset);&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (m_value[0] &gt;
m_maxvizu)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_value[0]
= m_maxvizu;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (m_value[0] &lt;
m_minvizu)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_value[0]
= m_minvizu;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_array-&gt;SetTuple1(offset2,100-((((double)m_value[0]-m_minvizu)/(m_maxvizu-m_minvizu))*100));<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
m_point-&gt;InsertPoint(offset,m_coord[0],m_coord[1],(((double)m_value[0]-m_minvizu)/(m_maxvizu-m_minvizu))*m_elevation);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; // Create vtkStructuredGrid for vizualisation<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkStructuredGrid* m_grid =
vtkStructuredGrid::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; </span></font><font size=1 face=Arial><span
style='font-size:8.0pt;font-family:Arial'>m_grid-&gt;SetDimensions(dimx,dimy,1);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:8.0pt;
font-family:Arial'>&nbsp; //m_grid-&gt;GetCellData()-&gt;SetScalars(m_array);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// affichage des gradients de couleurs<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span style='font-size:8.0pt;
font-family:Arial'>&nbsp; </span></font><font size=1 face=Arial><span
lang=EN-GB style='font-size:8.0pt;font-family:Arial'>m_grid-&gt;SetPoints(m_point);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkStructuredGridGeometryFilter*&nbsp;
m_gridgeometry = vtkStructuredGridGeometryFilter::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; m_gridgeometry-&gt;SetInput(m_grid);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp;&nbsp;</span></font><font size=1 face=Arial><span
lang=DE style='font-size:8.0pt;font-family:Arial'>// Create normals for better
vizualisation<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=DE style='font-size:8.0pt;
font-family:Arial'>&nbsp; vtkPolyDataNormals *normals =
vtkPolyDataNormals::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=DE style='font-size:8.0pt;
font-family:Arial'>&nbsp; </span></font><font size=1 face=Arial><span
lang=EN-GB style='font-size:8.0pt;font-family:Arial'>normals-&gt;SetInput(m_gridgeometry-&gt;GetOutput());<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; normals-&gt;ComputeCellNormalsOn();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; normals-&gt;Update();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; // Create mapper<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkPolyDataMapper* m_mapper =
vtkPolyDataMapper::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; m_mapper-&gt;SetInput(normals-&gt;GetOutput());<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; m_mapper-&gt;SetScalarRange(0,100);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; // Create actor<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; vtkActor*&nbsp;&nbsp; m_actor = vtkActor::New();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; m_actor-&gt;SetTexture(VTKtexture);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; m_actor-&gt;SetMapper(m_mapper);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; //m_actor-&gt;PickableOn();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; // Rendering<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; Ren1-&gt;AddActor(m_actor);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; Ren1-&gt;SetBackground(0.5,0.5,0.5); <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; RenWin1-&gt;Render();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; iren-&gt;Start();<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>&nbsp; return 0;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 face=Arial><span lang=EN-GB style='font-size:
8.0pt;font-family:Arial'>}<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<div align=center>

<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0>
 <tr>
  <td bgcolor=white style='background:white;padding:.75pt .75pt .75pt .75pt'>
  <table class=MsoNormalTable border=0 cellspacing=6 cellpadding=0>
   <tr>
    <td colspan=2 bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
    style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>
    </td>
    <td rowspan=6 valign=top bgcolor=white style='background:white;padding:
    0cm 0cm 0cm 0cm'>
    <p class=MsoNormal align=center style='text-align:center'><font size=2
    face="Times New Roman"><span lang=EN-GB style='font-size:10.0pt'><img
    width=70 height=140 id="_x0000_i1025"
    src="cid:image001.gif@01C581A6.5875B330" vspace=14></span></font><font
    size=3><span lang=EN-GB style='font-size:12.0pt'><o:p></o:p></span></font></p>
    </td>
    <td bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
    style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>
    </td>
   </tr>
   <tr>
    <td valign=top bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal><i><u><font size=2 face=Arial><span lang=EN-GB
    style='font-size:10.0pt;font-family:Arial;font-style:italic'>Headquarters</span></font></u></i><font
    size=3><span lang=EN-GB style='font-size:12.0pt'><o:p></o:p></span></font></p>
    </td>
    <td valign=top bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal align=right style='text-align:right'><font size=2
    face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'>7
    rue Galilée<br>
    75116 Paris<br>
    France</span></font><font size=3><span lang=EN-GB style='font-size:12.0pt'><o:p></o:p></span></font></p>
    </td>
    <td valign=top bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal><b><font size=2 face=Arial><span lang=EN-GB
    style='font-size:10.0pt;font-family:Arial;font-weight:bold'>VisioTerra</span></font></b><span
    lang=EN-GB><br>
    </span><font face=Arial><span lang=EN-GB style='font-family:Arial'>Scientific
    Consulting for Earth Observation</span></font><font size=3><span
    lang=EN-GB style='font-size:12.0pt'><o:p></o:p></span></font></p>
    </td>
   </tr>
   <tr>
    <td colspan=2 bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
    style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>
    </td>
    <td bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
    style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>
    </td>
   </tr>
   <tr>
    <td valign=top bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal><i><u><font size=2 face=Arial><span lang=EN-GB
    style='font-size:10.0pt;font-family:Arial;font-style:italic'>Office</span></font></u></i><font
    size=3><span lang=EN-GB style='font-size:12.0pt'><o:p></o:p></span></font></p>
    </td>
    <td valign=top bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal align=right style='text-align:right'><font size=2
    face=Arial><span style='font-size:10.0pt;font-family:Arial'>23&nbsp;rue
    Alfred Nobel<br>
    77455 Champs sur marne<br>
    France</span></font> <font size=3><span style='font-size:12.0pt'><o:p></o:p></span></font></p>
    </td>
    <td valign=top bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal><b><font size=2 face=Arial><span lang=EN-GB
    style='font-size:10.0pt;font-family:Arial;font-weight:bold'>Alain SIMAC</span></font></b><span
    lang=EN-GB><br>
    </span><font face=Arial><span lang=EN-GB style='font-family:Arial'>Engineer
    student</span></font><font size=3><span lang=EN-GB style='font-size:12.0pt'><o:p></o:p></span></font></p>
    </td>
   </tr>
   <tr>
    <td colspan=2 bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal align=right style='text-align:right'><font size=2
    face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'><a
    href="http://www.visioterra.fr/" title="http://www.visioterra.fr/">http://www.visioterra.fr/</a></span></font><font
    size=3><span lang=EN-GB style='font-size:12.0pt'><o:p></o:p></span></font></p>
    </td>
    <td colspan=2 bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB
    style='font-size:10.0pt;font-family:Arial'><a
    href="mailto:alain.simac@visioterra.com">alain.simac@visioterra.com</a></span></font><span
    lang=EN-GB> </span><font size=3><span lang=EN-GB style='font-size:12.0pt'><o:p></o:p></span></font></p>
    </td>
   </tr>
   <tr>
    <td colspan=2 bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal align=right style='text-align:right'><font size=2
    face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial'>tel
    +33-1-43 02 80 81<br>
    fax +33-1-43 02 85 88<br>
    cell +33-6-07 84 84 56</span></font><font size=3><span lang=EN-GB
    style='font-size:12.0pt'><o:p></o:p></span></font></p>
    </td>
    <td bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
    style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>
    </td>
    <td bgcolor=white style='background:white;padding:0cm 0cm 0cm 0cm'>
    <p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-GB
    style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></p>
    </td>
   </tr>
  </table>
  <p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-GB
  style='font-size:12.0pt'><o:p></o:p></span></font></p>
  </td>
 </tr>
</table>

</div>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-GB
style='font-size:10.0pt'>&nbsp;</span></font><font size=3><span lang=EN-GB
style='font-size:12.0pt'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-GB
style='font-size:10.0pt'>&nbsp;</span></font><font size=3><span lang=EN-GB
style='font-size:12.0pt'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-GB
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>