<div dir="ltr"><div><div>Glad to hear it. The nice thing with the extents is that if you're doing it correctly then the writer should "just work" in parallel as well. <br><br></div>Regards,<br></div>Andy<br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 12, 2014 at 2:48 PM, Kalin Kanov <span dir="ltr"><<a href="mailto:kalin@cs.jhu.edu" target="_blank">kalin@cs.jhu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Andy,<br>
<br>
Thank you for taking a close look at this and for the comments. That seems to have been indeed the issue.<br>
<br>
Best,<br>
Kalin<div class=""><br>
<br>
<br>
On 12.2.2014 Ð³. 14:40, Andy Bauer wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Kalin,<br>
<br><div class="">
I think the issue is that your extents are wrong. The extents should be<br>
the index of the first and last point in each logical direction so it<br>
should be [0, 15, 0, 15, 0, 15] if you have a square grid with 4096<br>
points. Note that this is the whole extent that the reader could provide<br>
even though subsequent filters may ask for a reduced extent. Also, in<br>
RequestData() you should get the requested extent with something like<br>
the following and take out the SetDimension() call:<br>
<br>
  Â vtkInformation *outInfo = outputVector-><u></u>GetInformationObject(<u></u>outputPort);<br>
  Â int subext[6];<br>
  Â outInfo->Get(<u></u>vtkStreamingDemandDrivenPipeli<u></u>ne::UPDATE_EXTENT(),subext);<br>
  Â image->SetExtent(subext);<br>
<br>
Then use the subextent to fill in your scalars array since it may be<br>
less than what it could potentially provide (e.g. why read in all data<br>
when you only need a subset of that).<br>
<br>
I've filled in the vtkJHTDBReader.cxx code with some comments and<br>
changes. You should go through and review what I did since I can't test<br>
your code.<br>
<br>
Regards,<br>
Andy<br>
<br>
<br>
<br>
On Wed, Feb 12, 2014 at 1:47 PM, Kalin Kanov <<a href="mailto:kalin@cs.jhu.edu" target="_blank">kalin@cs.jhu.edu</a><br></div><div class="">
<mailto:<a href="mailto:kalin@cs.jhu.edu" target="_blank">kalin@cs.jhu.edu</a>>> wrote:<br>
<br>
  Â  Hi Andy,<br>
<br>
  Â  Thanks for the quick response. I am setting the extent to be<br>
  Â  [0,16,0,16,0,16], as follows:<br>
<br>
  Â  in the constructor:<br>
  Â  Â  Â  Â  Â  Â this->extent[0] = 0;<br>
  Â  Â  Â  Â  Â  Â this->extent[1] = 16;<br>
  Â  Â  Â  Â  Â  Â this->extent[2] = 0;<br>
  Â  Â  Â  Â  Â  Â this->extent[3] = 16;<br>
  Â  Â  Â  Â  Â  Â this->extent[4] = 0;<br>
  Â  Â  Â  Â  Â  Â this->extent[5] = 16;<br>
<br>
  Â  in RequestInformation():<br>
  Â  Â  Â  Â  Â  Â outInfo->Set(<br></div>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â vtkStreamingDemandDrivenPipeli<u></u>__ne::<div><div class="h5"><br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â WHOLE_EXTENT(),<br>
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â this->extent, 6);<br>
<br>
  Â  Attached is the .vti file and the code. In the test harness I also<br>
  Â  have a vtkRenderer, which also displays the data as a 3d cube.<br>
<br>
<br>
<br>
<br>
  Â  On 12.2.2014 Ð³. 13:30, Andy Bauer wrote:<br>
<br>
  Â  Â  Â  Hi Kalin,<br>
<br>
  Â  Â  Â  I'm thinking that maybe there is ghost level information that is<br>
  Â  Â  Â  wrong,<br>
  Â  Â  Â  or maybe extent information. I'm assuming that you're running<br>
  Â  Â  Â  the server<br>
  Â  Â  Â  in serial so in that case you shouldn't have any ghost levels.<br>
  Â  Â  Â  If your<br>
  Â  Â  Â  grid has 16 points in each direction than than the extent for that<br>
  Â  Â  Â  should be [i, i+15, j, j+15, k, k+15] for a single process (note<br>
  Â  Â  Â  that<br>
  Â  Â  Â  extents don't need to start from 0 but usually do). If your grid<br>
  Â  Â  Â  is 16<br>
  Â  Â  Â  cells in each direction than the extent would be [i, i+16, j,<br>
  Â  Â  Â  j+16, k,<br>
  Â  Â  Â  k+16].<br>
<br>
  Â  Â  Â  If that isn't the problem, dan you share your code and your vti file<br>
  Â  Â  Â  from your test harness?<br>
<br>
  Â  Â  Â  Regards,<br>
  Â  Â  Â  Andy<br>
<br>
<br>
  Â  Â  Â  On Wed, Feb 12, 2014 at 1:11 PM, Kalin Kanov <<a href="mailto:kalin@cs.jhu.edu" target="_blank">kalin@cs.jhu.edu</a><br>
  Â  Â  Â  <mailto:<a href="mailto:kalin@cs.jhu.edu" target="_blank">kalin@cs.jhu.edu</a>><br></div></div><div><div class="h5">
  Â  Â  Â  <mailto:<a href="mailto:kalin@cs.jhu.edu" target="_blank">kalin@cs.jhu.edu</a> <mailto:<a href="mailto:kalin@cs.jhu.edu" target="_blank">kalin@cs.jhu.edu</a>>>> wrote:<br>
<br>
  Â  Â  Â  Â  Â  Â Dear All,<br>
<br>
  Â  Â  Â  Â  Â  Â I am developing a custom ParaView reader for my data. I have a<br>
  Â  Â  Â  Â  Â  Â working plugin for ParaView that reads and displays the data.<br>
  Â  Â  Â  Â  Â  Â However, what I am getting in the 3D view is not as<br>
  Â  Â  Â  expected. My<br>
  Â  Â  Â  Â  Â  Â reader subclasses vtkImageAlgorithm and produces a 3D<br>
  Â  Â  Â  structured<br>
  Â  Â  Â  Â  Â  Â grid. When I load the data in ParaView I only see 3 of the<br>
  Â  Â  Â  surfaces<br>
  Â  Â  Â  Â  Â  Â of the cube (attached is a screenshot). Any idea why this<br>
  Â  Â  Â  would be<br>
  Â  Â  Â  Â  Â  Â happening?<br>
<br>
  Â  Â  Â  Â  Â  Â When I view the data in spreadsheet form all 4096 point<br>
  Â  Â  Â  (the testing<br>
  Â  Â  Â  Â  Â  Â cube is 16x16x16) have associated scalar data and the<br>
  Â  Â  Â  coordinates<br>
  Â  Â  Â  Â  Â  Â look good, but the 3D view displays only the left, right<br>
  Â  Â  Â  and bottom<br>
  Â  Â  Â  Â  Â  Â walls of the cube. Additionally, I also have a small test<br>
  Â  Â  Â  harness<br>
  Â  Â  Â  Â  Â  Â that uses my custom reader as input for a<br>
  Â  Â  Â  vtkXMLImageDataWriter and<br>
  Â  Â  Â  Â  Â  Â the resulting .vti file when loaded into ParaView and<br>
  Â  Â  Â  visualized<br>
  Â  Â  Â  Â  Â  Â looks good.<br>
<br>
  Â  Â  Â  Â  Â  Â Thank you,<br>
  Â  Â  Â  Â  Â  Â Kalin Kanov<br>
<br>
<br>
<br>
<br>
</div></div></blockquote>
<br>
</blockquote></div><br></div>