<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello,<br>
<br>
my previous mail was wrong. The present problem is not related to
those other bugs.<br>
Here, when using ExtractSubset the extent for cell data in
miscalculated if i==imax or j==jmax or k == kmax.<br>
in vtkExtractGrid.cxx: we have the call "this->Internal->CopyCellData(inExt,outExt,cd,outCD);"
that use point extent<br>
and then in vtkExtractStructuredGridHelper.cxx the extent is
computed for cells
"vtkStructuredData::GetCellExtentFromPointExtent(outExt,outCellExt);"<br>
but this later function does not know about the whole extent of
cell data. Thus you need to pass down a valid extent for cells
before calling it.<br>
If you have inExt = {0, 30, 0, 20, 0, 10} and you pass outExt =
{0,30,0,20, 10,10} the result outCellExt will be {0,29,0,19,<b>10,10</b>}
and then the copy of cell data will be done outside of the array
leading to segfault.<br>
The outExt extent should have been corrected to be
{0,30,0,20,9,10} or {0,30,0,20,9,9}...<br>
I hope it is clearer now.<br>
<br>
Best Regards<br>
<br>
Mickael<br>
<br>
On 20/03/2015 16:26, Etienne Tang wrote:<br>
</div>
<blockquote cite="mid:550C3C08.2090101@gmail.com" type="cite">
<pre wrap="">Hello,
I'm working with a 3D structured dataset containing cell data. I tried
to extract a 2D boundary of this dataset corresponding to the maximum
index of a dimension with the Extract Subset filter and ParaView 4.3.1,
and I found an issue: the resulting dataset is incorrect. It holds cell
data from the opposite boundary (eg. if I try to extract the i = imax
boundary, I get values from i = 0 boundary), and these values are
shifted of one index in the other dimensions.
This case worked with ParaView 4.1.0, maybe it is related to this other
bug about structured data :
<a class="moz-txt-link-freetext" href="http://markmail.org/message/fvatgidqbvnufgi6#query:+page:1+mid:fvatgidqbvnufgi6+state:results">http://markmail.org/message/fvatgidqbvnufgi6#query:+page:1+mid:fvatgidqbvnufgi6+state:results</a>
?
Here are some pictures showing the problem on a simple dataset which can
be used to reproduce it:
- The simple .vts file : <a class="moz-txt-link-freetext" href="http://z1.gb2n.org/pv/test.vts">http://z1.gb2n.org/pv/test.vts</a>
- The original dataset : <a class="moz-txt-link-freetext" href="http://z1.gb2n.org/pv/original_dataset.png">http://z1.gb2n.org/pv/original_dataset.png</a>
- The result of the ExtractSubset filter to extract the i = imax
boundary : <a class="moz-txt-link-freetext" href="http://z1.gb2n.org/pv/extract_subset.png">http://z1.gb2n.org/pv/extract_subset.png</a>
Best regards,
</pre>
</blockquote>
<br>
</body>
</html>