<div dir="ltr">Hi Cory,<div>Thanks for the reply. This looks like a perfect way forward.</div><div><br></div><div>I am following this</div><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/FieldData</a><br></div><div><br></div><div>and am having troubles with this approach. The field data doesn't seem to be set properly. I can see the field data *name* in paraview when I load my mesh, but it has an NA value. </div><div><br></div><div><br></div><div>What I'm doing is:</div><div><br></div><div><div>std::string _srs_wkt = "my projection data here";</div><div>vtkSmartPointer<vtkStringArray> proj4 = vtkSmartPointer<vtkStringArray>::New();</div><div>proj4->SetNumberOfComponents(1);</div><div>proj4->SetName("proj4");</div><div>proj4->InsertNextValue(_srs_wkt);</div><div><br></div><div>vtkSmartPointer<vtkUnstructuredGrid> _vtk_unstructuredGrid = vtkSmartPointer<vtkUnstructuredGrid>::New();</div><div><br></div><div>//... build up _vtk_unstructuredGrid etc.</div><div><br></div><div> _vtk_unstructuredGrid->GetFieldData()->AddArray(proj4);</div><div><br></div><div> //validate<br></div><div> vtkStringArray* test = vtkStringArray::SafeDownCast(_vtk_unstructuredGrid->GetFieldData()->GetArray("proj4"));</div><div> </div><div> //test is NULL</div></div><div><br></div><div>any ideas?</div><div>Thanks</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(102,102,102)">Chris Marsh</span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">PhD Candidate</span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)"></span><a href="http://chrismarsh.ca/" style="color:rgb(102,102,102)" target="_blank">chrismarsh.ca</a><br style="color:rgb(102,102,102)"><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">13 Kirk Hall</span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">University of Saskatchewan</span><br style="color:rgb(102,102,102)"></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 9 November 2016 at 01:31, Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Chris,<br>
<br>
Usually we stuff this kind of data into the generic field data (arrays<br>
not associated with points of cells) in the data set. The VTU<br>
reader/writer supports reading/writing field data.<br>
<br>
HTH,<br>
Cory<br>
<div><div class="h5"><br>
On Tue, Nov 8, 2016 at 6:15 PM, Chris Marsh <<a href="mailto:chris.marsh@usask.ca">chris.marsh@usask.ca</a>> wrote:<br>
> Hi,<br>
><br>
> I would like to add some extra meta-data to a pvd file. Specifically, a<br>
> proj4 string containing information about the coordinate system projection<br>
> of the data contained in a vtu file.<br>
><br>
> Is there a recommended way to do this?<br>
><br>
> Cheers<br>
> Chris<br>
><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<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Cory Quammen<br>
Staff R&D Engineer<br>
Kitware, Inc.<br>
</font></span></blockquote></div><br></div>