vtkDataArrayTemplate::ResizeAndExtend() - after extending data-array MaxId stays the same.
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
If extending the data-array using Resize()/ResizeAndExtend() MaxId (representing the number of tuples -1) is not set to the new size. MaxId gets only set in Resize() if newSize < oldSize.
There is no function to change MaxId without touching anything else. Using SetNumberOfTuples() calls Allocate() and the old data of the array which got extended is gone. I cannot see any possibility to simply set MaxId to the new Size.
I tried to modify vtkDataArrayTemplate::ResizeAndExtend() the way that it always changes MaxId to newSize-1 (like it does if newSize < oldSize) but that ended up in segfaults. Until now I have no idea why.