<div dir="ltr"><span style="font-size:14px">Thank you, Andy! I will have a try.</span><br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-14 21:56 GMT+08:00 Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi,<br><br></div>It is using the default settings for a vtkImageGrid which is to set the spacing to 1 in each direction and the origin to (0,0,0). vtkImageData has SetOrigin() and SetSpacing() methods. You can see the class documentation at <a href="http://www.vtk.org/doc/nightly/html/classvtkImageData.html" target="_blank">http://www.vtk.org/doc/<wbr>nightly/html/<wbr>classvtkImageData.html</a>.<br><br></div>Cheers,<br></div>Andy<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Apr 14, 2017 at 7:54 AM, 刘楚高 <span dir="ltr"><<a href="mailto:frank1985876@gmail.com" target="_blank">frank1985876@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">hi, all<div><br></div><div>In Catalyst example "Fortran90FullExample" -> "FECxxAdaptor.cxx"->"<span style="color:rgb(0,0,0);font-family:menlo;font-size:11px">createcpi<wbr>magedata_</span>", the grid is new and has no coordinates. So, how to transfer the simulation grid coordinates to this <span style="color:rgb(0,0,0);font-family:menlo;font-size:11px">vtkImageData </span>grid?</div><div><br></div><div>Thank you!</div><div><br></div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">extern</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)">"C"</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">void</span><span style="font-variant-ligatures:no-common-ligatures"> createcpimagedata_(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">int</span><span style="font-variant-ligatures:no-common-ligatures">* nxstart, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">int</span><span style="font-variant-ligatures:no-common-ligatures">* nxend, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">int</span><span style="font-variant-ligatures:no-common-ligatures">* nx,</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">                                   </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">int</span><span style="font-variant-ligatures:no-common-ligatures">* ny, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">int</span><span style="font-variant-ligatures:no-common-ligatures">* nz)</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">{</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">if</span><span style="font-variant-ligatures:no-common-ligatures"> (!vtkCPPythonAdaptorAPI::GetCo<wbr>ProcessorData())</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">    {</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(209,47,27)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">    vtkGenericWarningMacro(</span><span style="font-variant-ligatures:no-common-ligatures">"Unable to access CoProcessorData."</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">);</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(186,45,162)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">    </span><span style="font-variant-ligatures:no-common-ligatures">return</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">;</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">    }</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,132,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">  </span><span style="font-variant-ligatures:no-common-ligatures">// The simulation grid is a 3-dimensional topologically and geometrically</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,132,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">  </span><span style="font-variant-ligatures:no-common-ligatures">// regular grid. In VTK/ParaView, this is considered an image data set.</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  vtkSmartPointer<vtkImageData> grid = vtkSmartPointer<vtkImageData>:<wbr>:New();</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  grid->SetExtent(*nxstart-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">, *nxend-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">0</span><span style="font-variant-ligatures:no-common-ligatures">, *ny-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">0</span><span style="font-variant-ligatures:no-common-ligatures">, *nz-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">);</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,132,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">  </span><span style="font-variant-ligatures:no-common-ligatures">// Name should be consistent between here, Fortran and Python client script.</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  vtkCPPythonAdaptorAPI::GetCoPr<wbr>ocessorData()->GetInputDescrip<wbr>tionByName(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)">"input"</span><span style="font-variant-ligatures:no-common-ligatures">)->SetGrid(<wbr>grid);</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">  vtkCPPythonAdaptorAPI::GetCoPr<wbr>ocessorData()->GetInputDescrip<wbr>tionByName(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)">"input"</span><span style="font-variant-ligatures:no-common-ligatures">)-><wbr>SetWholeExtent(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">0</span><span style="font-variant-ligatures:no-common-ligatures">, *nx-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">0</span><span style="font-variant-ligatures:no-common-ligatures">, *ny-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">0</span><span style="font-variant-ligatures:no-common-ligatures">, *nz-</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">1</span><span style="font-variant-ligatures:no-common-ligatures">);</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">}</span></p></div><span class="m_-583024156280761596HOEnZb"><font color="#888888"><div><div><br></div>-- <br><div class="m_-583024156280761596m_-6976215014066224012gmail_signature"><div><font size="3" face="'Times New Roman'"><span style="font-size:12px"><span style="font-size:small;font-family:arial">
<div><span style="font-size:medium;font-family:'times new roman'"><span style="font-size:12px">中国空气动力研究与发展中心 <span style="color:rgb(51,51,51);line-height:21px;font-family:arial,helvetica,sans-serif">计算空气动力研究所</span></span></span></div>
<div>Blog: <a href="http://blog.donews.com/frank777" target="_blank">http://blog.donews.com/f<wbr>rank777</a>  <br>MSN: <a href="mailto:frank1985876@hotmail.com" target="_blank">frank1985876@hotmail.com</a></div></span></span></font></div></div>
</div></font></span></div>
<br></div></div>______________________________<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>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaV<wbr>iew</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/paraview</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div><font face="'Times New Roman'" size="3"><span style="font-size:12px"><span style="font-size:small;font-family:arial">
<div><span style="font-size:medium;font-family:'Times New Roman'"><span style="font-size:12px">中国空气动力研究与发展中心 <span style="color:rgb(51,51,51);line-height:21px;font-family:Arial,Helvetica,sans-serif">计算空气动力研究所</span></span></span></div>
<div>Blog: <a href="http://blog.donews.com/frank777" target="_blank">http://blog.donews.com/frank777</a>  <br>MSN: <a href="mailto:frank1985876@hotmail.com" target="_blank">frank1985876@hotmail.com</a></div></span></span></font></div></div>
</div>