<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br><br>So the reason why my required filters are greyed out after loading this CAS data set is due to a few lines in the XML file. The streamtracer is an example:<br><br> <DataTypeDomain name="input_type" composite_data_supported="1"><br> <DataType value="vtkDataSet"/><br> </DataTypeDomain><br> <InputArrayDomain name="input_array" attribute_type="point"<br> number_of_components="3"/><br><br>Now I did introduce a "vtkStructuredGrid" into the pipeline,
which inherits from vtkDtaSet, so that shouldn't be a problem with the "DataType" portion above. But what concerns me the "InputArrayDomain" requirement. By default the data set loads in a bunch of 1-component arrays. I thought that by creating the 3-component UVW array (see below), I wouldn't face any issues. But for some reason I still do -- maybe that requirement is unfulfilled?<br><br>If anyone has any ideas, please let me know.<br><br>Sohail<br><br>--- On <b>Wed, 3/2/11, Sohail Shafii <i><sohailshafii@yahoo.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Sohail Shafii <sohailshafii@yahoo.com><br>Subject: Re: [Paraview] Using streamtracer/gradient filters on "multi-block" data set<br>To: "Berk Geveci" <berk.geveci@kitware.com><br>Cc: paraview@paraview.org<br>Date: Wednesday, March 2, 2011, 1:46 PM<br><br><div
id="yiv1702808980"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">Not sure what you mean by that last statement -- do you mean transfer an array to pointdata? I tried to do this:<br><br>input = self.GetInput()<br>output = self.GetOuput()<br><br>output = vtk.vtkStructuredGrid()<br>output.ShallowCopy(input.GetBlock(0))<br><br>// create UVW array (3-component velocity array)<br><br>output.GetPointData().AddArray(UVWArray)<br><br>When I print output, I do see the added array in the point data section with the correct component and tuple count. However, the bounds of the grid are suspect (like -0.1 to 0.3 for x; -0.1 to 2.6e-18 for y) and the grid extent is 0, -1, 0, -1, 0, -1. <br><br>I also tried:<br>
<style type="text/css">#yiv1702808980 p, #yiv1702808980 li {white-space:pre-wrap;}</style>output.GetPointData().SetVectors(UVWArray)<br><br>Didn't work either. Something is still not right here...<br><br>Sohail<br><br>--- On <b>Wed, 3/2/11, Berk Geveci <i><berk.geveci@kitware.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Berk Geveci <berk.geveci@kitware.com><br>Subject: Re: [Paraview] Using streamtracer/gradient filters on "multi-block" data set<br>To: "Sohail Shafii" <sohailshafii@yahoo.com><br>Cc: paraview@paraview.org<br>Date: Wednesday, March 2, 2011, 3:40 AM<br><br><div id="yiv1702808980">I looks like you to apply cell data to point data.<br><br><div class="yiv1702808980gmail_quote">On Tue, Mar 1, 2011 at 9:06 PM, Sohail Shafii <span dir="ltr"><<a rel="nofollow">sohailshafii@yahoo.com</a>></span> wrote:<br>
<blockquote class="yiv1702808980gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">Hi,<br><br>Let me correct myself; the block contained inside is a vtkStructuredGrid. I did a printout what is in the pipeline (self.GetInput()):<br>
<table style="margin: 4px; color: rgb(0, 0, 0);">
<tbody><tr>
<td style="border: medium none;">
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;">vtkMultiBlockDataSet (0x3a7c1d0)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Debug: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Modified Time: 164250</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Reference Count: 2</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Registered Events: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Source: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Information: 0x3a7c230</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Data Released: False</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Global Release Data: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> UpdateTime: 164282</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Release Data: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> UpdateExtent: Initialized</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Update Number Of Pieces: 1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Update Piece: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Update Ghost Level: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> MaximumNumberOfPieces: -1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> ExtentTranslator: (0x3a7df30)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> RequestExactExtent: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Field Data:</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Debug: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Modified Time: 155460</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Reference Count: 1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Registered Events: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Arrays: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Components: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Tuples: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Children: 1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Child 0: vtkUnstructuredGrid</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Debug: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Modified Time: 164208</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Reference Count: 3</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Registered Events: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Source: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Information: 0x4920790</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Data Released: False</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Global Release Data: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> UpdateTime: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Release Data: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> UpdateExtent: Not Initialized</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> MaximumNumberOfPieces: 1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> RequestExactExtent: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Field Data:</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Debug: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Modified Time: 164167</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Reference Count: 1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Registered Events: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Arrays: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Components: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Tuples: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Points: 34943</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Cells: 31488</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Cell Data:</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Debug: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Modified Time: 164206</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Reference Count: 1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Registered Events: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Arrays: 24</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 0 name = PRESSURE</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 1 name = X_VELOCITY</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 2 name = X_VELOCITY_M1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 3 name = X_VELOCITY_M2</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 4 name = Y_VELOCITY</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 5 name = Y_VELOCITY_M1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 6 name = Y_VELOCITY_M2</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 7 name = Z_VELOCITY</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 8 name = Z_VELOCITY_M1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 9 name = Z_VELOCITY_M2</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 10 name = TEMPERATURE</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 11 name = ENTHALPY</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 12 name = ENERGY_M1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 13 name = ENERGY_M2</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 14 name = NUT</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 15 name = NUT_M1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 16 name = NUT_M2</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 17 name = DENSITY</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 18 name = DENSITY_M1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 19 name = DENSITY_M2</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 20 name = MU_LAM</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 21 name = MU_TURB</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 22 name = WALL_DIST</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Array 23 name = BODY_FORCES</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Components: 26</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Tuples: 31488</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Interpolate Flags: ( 1 1 1 1 1 0 0 )</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Pass Through Flags: ( 1 1 1 1 1 1 1 )</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Scalars: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Vectors: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Normals: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> TCoords: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Tensors: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> GlobalIds: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> PedigreeIds: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Point Data:</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Debug: Off</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Modified Time: 164208</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Reference Count: 1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Registered Events: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Arrays: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Components: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Tuples: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Copy Tuple Flags: ( 1 1 1 1 1 0 1 )</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Interpolate Flags: ( 1 1 1 1 1 0 0 )</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Pass Through Flags: ( 1 1 1 1 1 1 1 )</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Scalars: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Vectors: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Normals: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> TCoords: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Tensors: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> GlobalIds: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> PedigreeIds: (none)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Bounds: </span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Xmin,Xmax: (-0.1, 0.3)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Ymin,Ymax: (-0.100002, 2.60209e-18)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Zmin,Zmax: (-0.100002, 2.60209e-18)</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Compute Time: 379083</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Points: 34943</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Point Coordinates: 0x4aa82b0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Locator: 0</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Number Of Pieces: 1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Piece: -1</span></p>
<p style="margin: 0px; text-indent: 0px;"><span style="font-size: 9pt;"> Ghost Level: 0</span></p></td></tr></tbody></table>Maybe it's because the point data fields, like the scalars and vectors you mentioned, are empty? I could probably fill in the gaps.<br>
<br>Sohail<br><br>--- On <b>Tue, 3/1/11, Berk Geveci <i><<a rel="nofollow">berk.geveci@kitware.com</a>></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">
<br>From: Berk Geveci <<a rel="nofollow">berk.geveci@kitware.com</a>><br>Subject: Re: [Paraview] Using streamtracer/gradient filters on "multi-block" data set<br>To: "Sohail Shafii" <<a rel="nofollow">sohailshafii@yahoo.com</a>><br>
Cc: <a rel="nofollow">paraview@paraview.org</a><br>Date: Tuesday, March 1, 2011, 5:07 PM<div><div></div><div class="yiv1702808980h5"><br><br><div>By any chance, does this multi-block dataset contain a block that does not have arrays (scalars and/or vectors)? That's probably why those filters are disabled. You can always use
Extract Blocks to extract the block you are interested in and then apply the filter. As for the Programmable Filter, if you set the output type to vtkUnstructuredGrid, you should be able to do:<div>
<br></div><div>self.GetOutput().ShallowCopy(self.GetInput().GetBlock(0))</div><div><br></div><div>assuming that block 0 is a uns. grid.</div><div><br></div><div>-berk<br><br><div>On Tue, Mar 1, 2011 at 5:29 PM, Sohail Shafii <span dir="ltr"><<a rel="nofollow" target="_blank" href="http://mc/compose?to=sohailshafii@yahoo.com">sohailshafii@yahoo.com</a>></span> wrote:<br>
<blockquote style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top"><br>Hi,<br><br>I've read in a CAS file, which Paraview read in a Multi-block dataset, which contains within it a unstructured grid.<br>
<br>Initially I had a problem where all of the data items were one-tuple arrays. So I created a UVW (3-tuple velocity) array and added it to the pipeline this way using a Python programmable filter:<br><br>input = self.GetInput()<br>
output = self.GetOutput()<br><br>output.ShallowCopy(input)<br><br>****create array here***<br>output.GetBlock(0).GetCellData().AddArray(UVWArray)<br><br>Note that "GetBlock(0)" gives me access to the grid object. For some reason the gradients and streamtracer filters were greyed out and unavailable. So I decided to make the output variable a vtkUnstructuredGrid instead and transferred the UVW array to it this way:<br>
<br>
output.GetPointData().AddArray(UVWArray)<br><br>Nope...didn't work. Any thoughts how I can modify the pipeline so that the streamtracer and gradients of unstructured data sets array can become usable? I'm guessing there is something in those classes which tells Paraview that they require certain input types. I've seen references to stuff like FillInputPortInformation. <br>
<br>Thanks,<br>Sohail<br><br>
<br></td></tr></tbody></table><br>
<br>_______________________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a rel="nofollow" target="_blank" href="http://paraview.org/Wiki/ParaView">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a rel="nofollow" target="_blank" href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>
</div></div></div></blockquote></td></tr></tbody></table><br>
</blockquote></div><br>
</div></blockquote></td></tr></tbody></table><br>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br></div></blockquote></td></tr></table><br>