<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> </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> </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> </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> </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> </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 "vtkPolyDataMapper.h"<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 "vtkActor.h"<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 "vtkRenderWindow.h"<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 "vtkRenderer.h"<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 "vtkRenderWindowInteractor.h"<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 "vtkDataSetReader.h"<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 "vtkDoubleArray.h"<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 "vtkStructuredPoints.h"<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 "vtkPoints.h"<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 "vtkPointData.h"<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 "vtkStructuredGrid.h"<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 "vtkCellData.h"<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 "vtkStructuredGridGeometryFilter.h"<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 "vtkPolyDataNormals.h"<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'>#include "vtkTexture.h"<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 "vtkJPEGReader.h"<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 "vtkLookupTable.h"<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 "vtkImageData.h"<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'>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'> //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'> const char* m_filename =
"C:/fichier.vtk";<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'> </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'> 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'> </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> </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'> //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'> const char* m_image = "C:/image.jpg";<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'> 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> </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'> reader->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> </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'> 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'> VTKtable->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'> VTKtable->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'> VTKtable->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'> VTKtable->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'> VTKtable->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'> VTKtable->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'> VTKtable->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> </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'> vtkImageData* ima = reader->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> </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'> 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'> VTKtexture->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'> VTKtexture->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'> VTKtexture->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> </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'> // 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'> 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'> 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'> RenWin1->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'> RenWin1->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> </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'> // 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'> 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'> iren->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> </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'> // 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'> 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'> 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'> m_datasetreader->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'> m_datasetreader->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> </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'> // 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'> vtkDataSet* m_points =
m_datasetreader->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'> int dimx =
m_datasetreader->GetStructuredPointsOutput()->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'> int dimy =
m_datasetreader->GetStructuredPointsOutput()->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> </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'> // 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'> 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'> m_point->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> </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'> // 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'> 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'> m_array->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'> m_array->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> </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'> // 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'> for (int y=0;y<dimy;y++) <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'> for (int x=0;x<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'> {<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'> 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'> 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'> m_points->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'> <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'> 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'> double* m_value =
m_points->GetPointData()->GetTuple(offset); <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'> if (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'> 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> </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'> if (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'> 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> </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'> m_array->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'>
m_point->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'> }<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'> // 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'> 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'> </span></font><font size=1 face=Arial><span
style='font-size:8.0pt;font-family:Arial'>m_grid->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'> //m_grid->GetCellData()->SetScalars(m_array);
// 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'> </span></font><font size=1 face=Arial><span
lang=EN-GB style='font-size:8.0pt;font-family:Arial'>m_grid->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> </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'> vtkStructuredGridGeometryFilter*
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'> m_gridgeometry->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> </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'> </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'> 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'> </span></font><font size=1 face=Arial><span
lang=EN-GB style='font-size:8.0pt;font-family:Arial'>normals->SetInput(m_gridgeometry->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'> normals->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'> normals->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> </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'> // 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'> 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'> m_mapper->SetInput(normals->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'> m_mapper->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> </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'> // 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'> vtkActor* 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'> m_actor->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'> m_actor->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'> //m_actor->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> </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'><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'> // 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'> Ren1->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'> Ren1->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'> RenWin1->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> </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'> iren->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> </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'> 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> </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> </o:p></span></font></p>
<p><font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </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> </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> </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> </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> </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 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> </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> </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'> </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> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face="Times New Roman"><span lang=EN-GB
style='font-size:10.0pt'> </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> </o:p></span></font></p>
</div>
</body>
</html>