(Fwd) Re: Volumizer

New Message Reply Date view Thread view Subject view Author view

Robert Grzeszczuk (rg)
Mon, 17 May 1999 14:43:44 -0700 (PDT)


More AUGMENT/AUGMENT_TIGHT issues.

-rg

--- Forwarded mail from "Robert Grzeszczuk" <rg>

Date: Mon, 17 May 1999 14:09:37 -0700 (PDT)
From: rg (Robert Grzeszczuk)
...

I tracked it down as an error in my demo code that does zero-padding for
incomplete bricks. Fortunately, it can be easily fixed. Simply move the
memset() call before the for(;;) loops in both myReadBrickIfl() (starting at
around line 173 of myBrickIO.cxx) and myReadBrickRaw() (around line 417):

...
  fprintf (stderr, "/\b");

  // KLUDGE does not set all the borders
  for (int j0 = 0; j0 < zPartBrickSize; j0++)
    for (int j1 = 0; j1 < yPartBrickSize; j1++)
      {
        memcpy (
                 (unsigned char *) data + j0 * xBrickSize * yBrickSize + j1 *
xBrickSize,
        buffer + j0 * xPartBrickSize * yPartBrickSize + j1 * xPartBrickSize,
                 xPartBrickSize);
        memset (
                 buffer + j0 * xPartBrickSize * yPartBrickSize + j1 * xPartBri
ckSize + xPartBrickSize,
                 0, xBrickSize - xPartBrickSize);
      }

  delete[]buffer;

  fprintf (stderr, "-\b");
  ...

with:

        fprintf(stderr, "/\b");

        memset((unsigned char *) data,0,xBrickSize*yBrickSize*zBrickSize*bpp);

        for (int j0 = 0; j0 < zPartBrickSize; j0++)
            for (int j1 = 0; j1 < yPartBrickSize; j1++) {
                memcpy(
                 (unsigned char *)data+j0*xBrickSize*yBrickSize+j1*xBrickSize,
                 buffer+j0*xPartBrickSize*yPartBrickSize+j1*xPartBrickSize,
                 xPartBrickSize);
            }

        delete[]buffer;

        fprintf(stderr, "-\b");

Incidently, there is still another minor error that was reported eralier on
info-volumizer: the brick sizes in the x direction should be 64 and 4, and not
64 and 8. But this should not effect the correctness of the display, just
dwonload time (and not necessarily negatively). I'm working on a patch that
will fix that a few other bugs that were reported on info_volumizer.

-rg

On May 14, 3:21pm, you wrote:
> Subject: Volumizer
> Hi Robert,
>
> I have another question regarding partial bricks of the
> Volumizer. In order to preserve the complete data of a
> volume, I pass the AUGMENT_TIGHT as the value of fractional
> bricks while creating an instance of voBrickSet. In this
> case how do I specify the texture coordinates correctly
> by using the Volumizer? Apparently the automatic texture
> coordinates generation functions won't create a correct image.
>
> I ran the Volumizer on a Maximum Impact machine with a 67x209x49
> volume. The "AUGMENT_TIGHT" operation will create 8 bricks totally.
> Their sizes are 64x128x32, 8x128x32, 64x128x32, 8x128x32,
> 64x128x32, 8x128x32, 64x128x32, 8x128x32, respectively.
>
> Thank you very much for help!
>
...

---End of forwarded mail from "Robert Grzeszczuk" <rg>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Nov 01 1999 - 13:42:00 PST