<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252"></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>Hello again!</div><div><br></div><div>I just realized that I have a major typo in my first email… I say the excerpt is from getInformation… it is actually from RequestData()… Sorry for the confusion! :)</div><div><br></div><div>-Josh</div><div><br></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> Joshua Murphy <<a href="mailto:joshua.murphy@lasp.colorado.edu">joshua.murphy@lasp.colorado.edu</a>><br><span style="font-weight:bold">Date: </span> Mon, 9 Apr 2012 12:01:29 -0600<br><span style="font-weight:bold">To: </span> burlen <<a href="mailto:burlen.loring@gmail.com">burlen.loring@gmail.com</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 name="qrichtext" content="1"><style type="text/css">
p, li { white-space: pre-wrap; }
</style><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif; "><div style="color: rgb(0, 0, 0); ">Hello,</div><div style="color: rgb(0, 0, 0); "><br></div><div style="color: rgb(0, 0, 0); ">So I am trying to figure out how to add an output port to my Reader, but I am having difficulty.</div><div style="color: rgb(0, 0, 0); "><br></div><div style="color: rgb(0, 0, 0); ">I am trying to create the new output as outlined in the email below, but when I get to the point of adding the column to the table, ParaView segfaults.</div><div style="color: rgb(0, 0, 0); "><br></div><div style="color: rgb(0, 0, 0); ">Having looked through other emails on the list, it looks like the output ports need to be configured somehow, but I am not sure how to do that.</div><div style="color: rgb(0, 0, 0); "><br></div><div style="color: rgb(0, 0, 0); ">My reader creates a vtkStructuredGrid for the data, and I need to add the vtkTable for the meta-data… how do I configure the reader for these two outputs?</div><div style="color: rgb(0, 0, 0); "><br></div><div style="color: rgb(0, 0, 0); "><br></div><div style="color: rgb(0, 0, 0); ">Currently, my getInformation (beginning) looks like this:</div><div style="color: rgb(0, 0, 0); ">------------</div><div style="color: rgb(0, 0, 0); "><br></div><div><p style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></p><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ff55;">vtkInformation</span><span style=" color:#c0c0c0;"> </span><span style=" color:#aaaaaa;">*</span>outInfo<span style=" color:#c0c0c0;"> </span><span style=" color:#aaaaaa;">=</span><span style=" color:#c0c0c0;"> </span>outputVector<span style=" color:#aaaaaa;">-></span>GetInformationObject<span style=" color:#aaaaaa;">(</span><span style=" color:#ff55ff;">0</span><span style=" color:#aaaaaa;">);</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ff55;">vtkStructuredGrid</span><span style=" color:#c0c0c0;"> </span><span style=" color:#aaaaaa;">*</span>output<span style=" color:#c0c0c0;"> </span><span style=" color:#aaaaaa;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ff55;">vtkStructuredGrid</span><span style=" color:#aaaaaa;">::</span>SafeDownCast<span style=" color:#aaaaaa;">(</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span>outInfo<span style=" color:#aaaaaa;">-></span>Get<span style=" color:#aaaaaa;">(</span><span style=" color:#55ff55;">vtkDataObject</span><span style=" color:#aaaaaa;">::</span>DATA_OBJECT<span style=" color:#aaaaaa;">()));</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//TODO:</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">Add</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">Meta</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">Data</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">here</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">first</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">Use</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">VTK</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">Table</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">output</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">Port</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">Following</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">is</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">from</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">discussion</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">on</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">ParaView</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">Mailing</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">List</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//-----------------------------------------------------------</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">315</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">vtkInformation</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">*outInfo;</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">316</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">vtkTable</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">*output;</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">317</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">vtkStringArray</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">*data;</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">318</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">319</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">output</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">port</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">1</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">-></span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">bw</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">data</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">320</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">outInfo=outputVector->GetInformationObject(0);</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">321</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">output</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">322</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">dynamic_cast<vtkTable*>(outInfo->Get(vtkDataObject::DATA_OBJECT()));</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">323</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">data=vtkStringArray::New();</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">324</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">data->SetName("BW</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">Data");</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">325</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">data->SetNumberOfComponents(1);</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">326</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">data->InsertNextValue(bwData.c_str());</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">327</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">output->AddColumn(data);</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">328</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">data->Delete();</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//----------------------------------------------------------</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ff55;">vtkTable</span><span style=" color:#c0c0c0;"> </span><span style=" color:#aaaaaa;">*</span>MetaDataOutput<span style=" color:#aaaaaa;">;</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ff55;">vtkStringArray</span><span style=" color:#c0c0c0;"> </span><span style=" color:#aaaaaa;">*</span>MetaString<span style=" color:#aaaaaa;">;</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">//output</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">port</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">for</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">table</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">data</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">MetaDataOutput<span style=" color:#c0c0c0;"> </span><span style=" color:#aaaaaa;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#ffff55;">dynamic_cast</span><span style=" color:#aaaaaa;"><</span><span style=" color:#55ff55;">vtkTable</span><span style=" color:#aaaaaa;">*>(</span>outInfo<span style=" color:#aaaaaa;">-></span>Get<span style=" color:#aaaaaa;">(</span><span style=" color:#55ff55;">vtkDataObject</span><span style=" color:#aaaaaa;">::</span>DATA_OBJECT<span style=" color:#aaaaaa;">()));</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">MetaString<span style=" color:#c0c0c0;"> </span><span style=" color:#aaaaaa;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ff55;">vtkStringArray</span><span style=" color:#aaaaaa;">::</span>New<span style=" color:#aaaaaa;">();</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">MetaString<span style=" color:#aaaaaa;">-></span><span style=" font-style:italic;">SetName</span><span style=" color:#aaaaaa;">(</span><span style=" color:#ff55ff;">"Meta</span><span style=" color:#c0c0c0;"> </span><span style=" color:#ff55ff;">Data"</span><span style=" color:#aaaaaa;">);</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">MetaString<span style=" color:#aaaaaa;">-></span>InsertNextValue<span style=" color:#aaaaaa;">(</span><span style=" color:#ff55ff;">"This</span><span style=" color:#c0c0c0;"> </span><span style=" color:#ff55ff;">is</span><span style=" color:#c0c0c0;"> </span><span style=" color:#ff55ff;">a</span><span style=" color:#c0c0c0;"> </span><span style=" color:#ff55ff;">Test"</span><span style=" color:#aaaaaa;">);</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">MetaString<span style=" color:#aaaaaa;">-></span>InsertNextValue<span style=" color:#aaaaaa;">(</span><span style=" color:#ff55ff;">"This</span><span style=" color:#c0c0c0;"> </span><span style=" color:#ff55ff;">is</span><span style=" color:#c0c0c0;"> </span><span style=" color:#ff55ff;">Another</span><span style=" color:#c0c0c0;"> </span><span style=" color:#ff55ff;">Test"</span><span style=" color:#aaaaaa;">);</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#55ffff;">//VVVVVVVVV</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">This</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">is</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">making</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">me</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">crash!</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">VVVVVVVVVVVV//</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#55ffff;">//-----</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">Need</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">another</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">output</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">port!</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">How?</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">-------//</span></pre><pre style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">MetaDataOutput->AddColumn(MetaString);</pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">MetaString<span style=" color:#aaaaaa;">-></span><span style=" font-style:italic;">Delete</span><span style=" color:#aaaaaa;">();</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#55ffff;">//structured</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">grid</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">below</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ffff;">here....</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#c0c0c0;"> </span><span style=" color:#55ff55;">vtkStructuredGrid</span><span style=" color:#c0c0c0;"> </span><span style=" color:#aaaaaa;">*</span>structOutput<span style=" color:#c0c0c0;"> </span><span style=" color:#aaaaaa;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#55ff55;">vtkStructuredGrid</span><span style=" color:#aaaaaa;">::</span>SafeDownCast<span style=" color:#aaaaaa;">(</span>output<span style=" color:#aaaaaa;">);</span></pre><pre style="color: rgb(0, 0, 0); margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span style=" color:#aaaaaa;"><br></span></pre></div><div style="color: rgb(0, 0, 0); ">--------------</div><div style="color: rgb(0, 0, 0); "><br></div><div style="color: rgb(0, 0, 0); ">The reader segfaults on MetaDataOutput->AddColumn(MetaString);</div><div style="color: rgb(0, 0, 0); "><br></div><div style="color: rgb(0, 0, 0); ">If someone could point me in the correct direction (or simply tell me how stupid I am being!, and then point in the correct direction!) I would be very grateful! I am sure I have a basic misunderstanding of what is supposed to be happening here!</div><div style="color: rgb(0, 0, 0); "><br></div><div style="color: rgb(0, 0, 0); ">-Josh</div><div style="color: rgb(0, 0, 0); "><br></div><div style="color: rgb(0, 0, 0); "><br></div><div style="color: rgb(0, 0, 0); "><br></div><span id="OLK_SRC_BODY_SECTION" style="color: rgb(0, 0, 0); "><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>
<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></div></div></span></body></html>