Class SbImageDataAccessor

    • Method Detail

      • setRow

        public boolean setRow​(SoCpuBufferObject values,
                              int y,
                              int z)
        Calls setRow(values, y, z, (int)0, (int)0).
      • setRow

        public boolean setRow​(SoCpuBufferObject values,
                              int y)
        Calls setRow(values, y, (int)0, (int)0, (int)0).
      • setRow

        public boolean setRow​(SoCpuBufferObject values,
                              int y,
                              int z,
                              int t)
        Calls setRow(values, y, z, t, (int)0).
      • setRow

        public boolean setRow​(java.util.Collection<java.lang.Double> values,
                              int y,
                              int z)
        Calls setRow(values, y, z, (int)0, (int)0).
      • setRow

        public boolean setRow​(java.util.Collection<java.lang.Double> values,
                              int y)
        Calls setRow(values, y, (int)0, (int)0, (int)0).
      • setVoxel

        public boolean setVoxel​(double value,
                                int x,
                                int y,
                                int z,
                                int t)
        Calls setVoxel(value, x, y, z, t, (int)0).
      • setVoxel

        public boolean setVoxel​(double value,
                                int x,
                                int y,
                                int z)
        Calls setVoxel(value, x, y, z, (int)0, (int)0).
      • getRow

        public boolean getRow​(SoCpuBufferObject values,
                              int y)
        Calls getRow(values, y, (int)0, (int)0, (int)0).
      • getRow

        public boolean getRow​(SoCpuBufferObject values,
                              int y,
                              int z,
                              int t)
        Calls getRow(values, y, z, t, (int)0).
      • getRow

        public boolean getRow​(SoCpuBufferObject values,
                              int y,
                              int z)
        Calls getRow(values, y, z, (int)0, (int)0).
      • setColumn

        public boolean setColumn​(SoCpuBufferObject values,
                                 int x,
                                 int z,
                                 int t)
        Calls setColumn(values, x, z, t, (int)0).
      • setColumn

        public boolean setColumn​(SoCpuBufferObject values,
                                 int x,
                                 int z)
        Calls setColumn(values, x, z, (int)0, (int)0).
      • setColumn

        public boolean setColumn​(java.util.Collection<java.lang.Double> values,
                                 int x)
        Calls setColumn(values, x, (int)0, (int)0, (int)0).
      • setColumn

        public boolean setColumn​(java.util.Collection<java.lang.Double> values,
                                 int x,
                                 int z,
                                 int t)
        Calls setColumn(values, x, z, t, (int)0).
      • setColumn

        public boolean setColumn​(java.util.Collection<java.lang.Double> values,
                                 int x,
                                 int z)
        Calls setColumn(values, x, z, (int)0, (int)0).
      • getColumn

        public boolean getColumn​(SoCpuBufferObject values,
                                 int x)
        Calls getColumn(values, x, (int)0, (int)0, (int)0).
      • setRow

        public boolean setRow​(java.util.Collection<java.lang.Double> values,
                              int y,
                              int z,
                              int t)
        Calls setRow(values, y, z, t, (int)0).
      • getColumn

        public boolean getColumn​(SoCpuBufferObject values,
                                 int x,
                                 int z)
        Calls getColumn(values, x, z, (int)0, (int)0).
      • setColumn

        public boolean setColumn​(SoCpuBufferObject values,
                                 int x)
        Calls setColumn(values, x, (int)0, (int)0, (int)0).
      • getColumn

        public boolean getColumn​(SoCpuBufferObject values,
                                 int x,
                                 int z,
                                 int t)
        Calls getColumn(values, x, z, t, (int)0).
      • getVoxel

        public double getVoxel​(int x,
                               int y)
        Calls getVoxel(x, y, (int)0, (int)0, (int)0).
      • setVoxel

        public boolean setVoxel​(double value,
                                int x,
                                int y)
        Calls setVoxel(value, x, y, (int)0, (int)0, (int)0).
      • getVoxel

        public double getVoxel​(int x,
                               int y,
                               int z,
                               int t)
        Calls getVoxel(x, y, z, t, (int)0).
      • getVoxel

        public double getVoxel​(int x,
                               int y,
                               int z)
        Calls getVoxel(x, y, z, (int)0, (int)0).
      • copyRegion

        public SoMemoryDataAdapter copyRegion​(SbImageDataAccessor.Region region)
        Returns an SoMemoryDataAdapter corresponding to the requested region. The data are copied and can be accessed in read/write. Returned buffer data are interleaved, i.e. if request for RGB buffer, data will be RGBRGBRGB... Data are then organized line by line, slice by slice, volume by volume. Ptr[0] is 1st channel of 1st voxel of 1st line of 1st slice of 1st volume. Ptr[nbChannel * regionWidth] is 1st channel of 1st voxel of 2nd line of 1st volume, and so on. The returned buffer is the requested region with all channels. There is no intersection with image extent or image available channels. Any data outside of image are considered to be zeros.
      • copyRegion

        public SoMemoryDataAdapter copyRegion​(SbImageDataAccessor.Region region,
                                              SbChannelList channels)
        Returns an SoMemoryDataAdapter corresponding to the requested region. The data are copied and can be accessed in read/write. Returned buffer data are interleaved, i.e. if request for RGB buffer, data will be RGBRGBRGB... Data are then organized line by line, slice by slice, volume by volume. Ptr[0] is 1st channel of 1st voxel of 1st line of 1st slice of 1st volume. Ptr[nbChannel * regionWidth] is 1st channel of 1st voxel of 2nd line of 1st volume, and so on. The returned buffer is the intersection of requested region and requested channels. There is no intersection with image extent or image available channels. Any data outside of image are considered to be zeros.
      • setColumn

        public boolean setColumn​(SoCpuBufferObject values,
                                 int x,
                                 int z,
                                 int t,
                                 int c)
        Set values to a column at specified coordinates.

        Parameters:
        values - to set one component of the specified column as an array of double. SoCpuBufferObject cannot be NULL. If its size does not match the required one, false is returned.

        x - column coordinate

        z - depth coordinate. Default is 0. Useful for 2D images.

        t - time coordinate. Default is 0.

        c - component number. Default is 0.

        Returns:
        true if the column is correctly written on image false otherwise

      • getColumn

        public boolean getColumn​(SoCpuBufferObject values,
                                 int x,
                                 int z,
                                 int t,
                                 int c)
        Get values of the full column at specified coordinates.

        Parameters:
        values - a buffer to retrieve voxel values of one component at specified column position as an array of double. SoCpuBufferObject cannot be NULL. If its size does not match the required one, it is resized.

        x - column coordinate

        z - depth coordinate. Default is 0. Useful for 2D images.

        t - time coordinate. Default is 0.

        c - component number. Default is 0.

        Returns:
        true if the column is correctly read. false otherwise

      • setRow

        public boolean setRow​(SoCpuBufferObject values,
                              int y,
                              int z,
                              int t,
                              int c)
        Set values to a row at specified coordinates.

        Parameters:
        values - to set one component of the specified row as an array of double. SoCpuBufferObject cannot be NULL. If its size does not match the required one, false is returned.

        y - row coordinate

        z - depth coordinate. Default is 0. Useful for 2D images.

        t - time coordinate. Default is 0.

        c - component number. Default is 0.

        Returns:
        true if the row is correctly written on image false otherwise

      • getVoxel

        public double getVoxel​(int x,
                               int y,
                               int z,
                               int t,
                               int c)
        Returns value of voxel at specified position. See also getVoxel( const SbVec4i32& pos ). Any request outside of the image will return 0. If the specified channel is not in image channel range, 0.0 will be returned.

        Parameters:
        x - column coordinate

        y - row coordinate

        z - depth coordinate. Default is 0. Useful for 2D images.

        t - time coordinate. Default is 0.

        c - component number. Default is 0.
      • getRow

        public boolean getRow​(SoCpuBufferObject values,
                              int y,
                              int z,
                              int t,
                              int c)
        Get values of the full row at specified coordinates.

        Parameters:
        values - a buffer to retrieve voxel values of one component at specified row position as an array of double. SoCpuBufferObject cannot be NULL. If its size does not match the required one, it is resized.

        y - row coordinate

        z - depth coordinate. Default is 0. Useful for 2D images.

        t - time coordinate. Default is 0.

        c - component number. Default is 0.

        Returns:
        true if the row is correctly read. false otherwise

      • setVoxel

        public boolean setVoxel​(double value,
                                int x,
                                int y,
                                int z,
                                int t,
                                int c)
        Set the value of voxel at specified coordinates.

        Parameters:
        value - to set one component at specified position

        x - column coordinate

        y - row coordinate

        z - depth coordinate. Default is 0. Useful for 2D images.

        t - time coordinate. Default is 0.

        c - component number. Default is 0.

        Returns:
        true if the voxel is written on image false otherwise