<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--
@font-face
        {font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
span.PlainTextChar
        {font-family:"Calibri","sans-serif"}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" lang="EN-US" link="blue" vlink="purple">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><font size="2"><br>
</font><br>
<div><style type="text/css">p, li { white-space: pre-wrap; }
BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}</style><font size="2">The
 same example can be trivially done in ParaView using a ProgrammableSource<br>
<br>
<br>
programmableSource1 = ProgrammableSource()<br>
programmableSource1.OutputDataSetType = 'vtkImageData'<br>
programmableSource1.Script = 'import numpy as np\nimport zipfile\n\nexecutive = self.GetExecutive()\noutInfo = executive.GetOutputInformation(0)\nexts = [executive.UPDATE_EXTENT().Get(outInfo, i) for i in xrange(6)]\n\noutput.SetExtent(exts)\n\ndata = np.fromstring(zipfile.ZipFile(\'N36W113.hgt.zip\').read(\'N36W113.hgt\'),
 \'>i2\')\ndata = data.astype(np.float32)\ndata[data == -32768] = data[data > 0].min()\n\noutput.PointData.append(data, "scalar")'<br>
programmableSource1.ScriptRequestInformation = 'executive = self.GetExecutive ()\noutInfo = executive.GetOutputInformation(0)\n\ndims = [1201, 1201, 1]\noutInfo.Set(executive.WHOLE_EXTENT(), 0, dims[0]-1 , 0, dims[1]-1 , 0, dims[2]-1)\noutInfo.Set(vtk.vtkDataObject.SPACING(),
 1, 1, 1)\noutInfo.Set(vtk.vtkDataObject.ORIGIN(), 0,0,0)\n'<br>
<br>
Jean/CSCS<br>
<br>
</font></div>
</div>
</body>
</html>