<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; "><div>Great! Thanks! It can be often hard to find what you are not sure you are looking for. :) </div><div><br></div><div>-Josh</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> burlen <<a href="mailto:burlen.loring@gmail.com">burlen.loring@gmail.com</a>><br><span style="font-weight:bold">Date: </span> Thu, 22 Mar 2012 22:41:37 -0600<br><span style="font-weight:bold">To: </span> Joshua Murphy <<a href="mailto:joshua.murphy@lasp.colorado.edu">joshua.murphy@lasp.colorado.edu</a>><br><span style="font-weight:bold">Cc: </span> "<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>" <<a href="mailto:paraview@paraview.org">paraview@paraview.org</a>><br><span style="font-weight:bold">Subject: </span> Re: [Paraview] Question on Information Objects<br></div><div><br></div><div>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000">
hi, information keys are more for passing info between filters
through the pipeline. if all you want is to display a string, you
could make a second output port to your reader that produces a
vtkTable and populate it with the string. This could be displayed in
the pv ui. here's a quick example of what you'd do in your request
data:<br>
<br>
<br>
315 vtkInformation *outInfo;<br>
316 vtkTable *output;<br>
317 vtkStringArray *data;<br>
318 <br>
319 // output port 1 -> bw data<br>
320 outInfo=outputVector->GetInformationObject(0);<br>
321 output<br>
322 =
dynamic_cast<vtkTable*>(outInfo->Get(vtkDataObject::DATA_OBJECT()));<br>
323 data=vtkStringArray::New();<br>
324 data->SetName("BW Data");<br>
325 data->SetNumberOfComponents(1);<br>
326 data->InsertNextValue(bwData.c_str());<br>
327 output->AddColumn(data);<br>
328 data->Delete();<br>
<br>
<br>
<br>
On 03/22/2012 03:38 PM, Joshua Murphy wrote:
<blockquote cite="mid:CB91061F.1027%25joshua.murphy@lasp.colorado.edu" type="cite">
<div><span class="Apple-style-span" style="font-family: Helvetica;
font-size: medium; ">Hello,</span>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">I am
trying to get meta-data information from a file into ParaView.
I have successfully built the information key-value pairs in
the information object in my reader, but I am uncertain how to
get the data out on the ParaView side of things.</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">Example:</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">I want
to get the Calendar date meta-data from my model file. I
added Key to the information object to the results info
object.</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">I set
keys as follows:</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">
<pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><font class="Apple-style-span" color="#7a7a7a"> request->AppendUnique(vtkExecutive::KEYS_TO_COPY(), vtkENLILMetaDataKeys::REFDATE_CAL());</font></pre>
<div><br>
</div>
</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">I have
a function to add the value to the key like such:</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">
<pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><font class="Apple-style-span" color="#929292">void vtkENLILMetaDataKeys::populate_meta_data(vtkInformation* request, vtkInformationStringKey *key, char* value)</font></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><font class="Apple-style-span" color="#929292">{</font></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><font class="Apple-style-span" color="#929292"> request->Set(key, value);</font></pre>
<pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><font class="Apple-style-span" color="#929292">}</font></pre>
<div><br>
</div>
</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">I then
add the values to the keys as follows:</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">
<pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><font class="Apple-style-span" color="#929292"> vtkENLILMetaDataKeys::populate_meta_data(outInfo, vtkENLILMetaDataKeys::REFDATE_CAL(), temp);</font></pre>
<div><br>
</div>
</div>
<div style="font-family: Helvetica; font-size: medium; ">After I
do this, I can successfully pull the placed data from the
information object from within the reader.</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">What I
cannot figure out is how to access this object from within
Paraview.</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">My goal
is to be able to include the calendar date (as text) in the
render view. </div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">Can
someone guide me in the correct direction on how to do this?
I am looking for possibly a python way of getting at this
data.</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">Thanks,</div>
<div style="font-family: Helvetica; font-size: medium; "><br>
</div>
<div style="font-family: Helvetica; font-size: medium; ">Josh</div> <span class="Apple-style-span" style="font-family: Helvetica;
font-size: medium; "><br>
</span></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the ParaView Wiki at: <a class="moz-txt-link-freetext" href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a></pre>
</blockquote>
<br>
</div></div></span></body></html>