The track that you're on with creating an abstract class above vtkCellArray is the first approach I would take on this. That said, I'm not sure it's the best but I haven't thought of anything better yet either. I've been thinking about this as well with going through the data structures for the Catalyst Users Guide I'm working on. A couple of points I think are worth mentioning:<br>
<br>1) These changes would typically be used in sources only unless they were shallow copied in subsequent filters that don't modify the grid topology.<br><br>2) I would think that only changing the way vtkUnstructuredGrid stores the cell topology would be sufficient for co-processing/Catalyst. I don't see a lot of people that are going to want this functionality for vtkPolyData in their sources. This probably avoids most of the vtkPolyData + VBO creation. Additionally, we're considering turning on immediate mode rendering by default for Catalyst generated scripts due to running on memory limited machines, possibly with no disk cache, which means that display lists won't be generated. The reason for this is that memory segmentation can cause problems on these HPC machines.<br>
<br>3) I also think that while looking at this it would be nice to review the Allocate() implementations for polydata and unstructured grids. For a known amount of cells, I think these always under-allocate the space needed to store the grid topology information in vtkCellArrays, even if all of the cell types are single vertices.<br>
<br>Andy<br><br><div class="gmail_quote">On Thu, Mar 21, 2013 at 8:40 AM, David Lonie <span dir="ltr"><<a href="mailto:david.lonie@kitware.com" target="_blank">david.lonie@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="im">On Wed, Mar 20, 2013 at 7:12 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br></div><div class="gmail_extra">
<div class="gmail_quote"><div class="im">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> A backward compatible approach might use an additional offset array into the existing cell ids array.<br></blockquote>


<div><br></div></div><div>Backwards compatibility is definitely the biggest obstacle to a change like this. This approach would lose some of the nice features we've discussed like super-fast VBO creation, but would be a step in the direction of allowing a cellId-based random-access API, which is more important for my needs at the moment. However, the memory overhead of duplicating the cell size information may be unacceptable in some cases.</div>


<div><br></div><div>The other approach Berk proposed is to introduce an abstract class above vtkCellArray that only uses sequential access via GetNextCell, etc, and rewrite only selected filters to use this API, since coprocessing adapters should be able to handle sequential access without much trouble. (As I mentioned earlier in my reply to Will, The real thorn in my side for this project is the array-index random access methods). This would certainly be easier, and leave a major rewrite/redesign for a later project, perhaps one that has the resources to update VTK away from the fixed-pipeline GL approach.</div>


<div><br></div><div>Dave</div></div></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><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>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br>