<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>