Module gwy :: Class Brick
[hide private]
[frames] | no frames]

Class Brick

source code

Three-dimensional data representation

Brick represents 3D data arrays in Gwyddion. It is typically useful for different volume data obtained from SPMs, like in force volume measurements.

Instance Methods [hide private]
 
__init__(xres, yres, zres, xreal, yreal, zreal, nullme)
Creates a new data brick.
source code
 
new_alike(nullme)
Creates a new data brick similar to an existing one.
source code
 
new_part(xpos, ypos, zpos, xres, yres, zres, keep_offsets)
Creates a new data brick as a part of existing one.
source code
 
data_changed()
Emits signal "data_changed" on a data brick.
source code
 
resample(xres, yres, zres, interpolation)
Resamples a data brick.
source code
 
get_xres()
Gets the x resolution of a data brick.
source code
 
get_yres()
Gets the y resolution of a data brick.
source code
 
get_zres()
Gets the z resolution of a data brick.
source code
 
get_xreal()
Gets the physical size of a data brick in the x direction.
source code
 
get_yreal()
Gets the physical size of a data brick in the y direction.
source code
 
get_zreal()
Gets the physical size of a data brick in the z direction.
source code
 
get_xoffset()
Gets the offset of data brick origin in x direction.
source code
 
get_yoffset()
Gets the offset of data brick origin in y direction.
source code
 
get_zoffset()
Gets the offset of data brick origin in z direction.
source code
 
set_xreal(xreal)
Sets the real x dimension of a brick.
source code
 
set_yreal(yreal)
Sets the real y dimension of a brick.
source code
 
set_zreal(zreal)
Sets the real z dimension of a brick.
source code
 
set_xoffset(xoffset)
Sets the offset of a data brick origin in the x direction.
source code
 
set_yoffset(yoffset)
Sets the offset of a data brick origin in the y direction.
source code
 
set_zoffset(zoffset)
Sets the offset of a data brick origin in the z direction.
source code
 
get_si_unit_x()
Returns x direction SI unit of a data brick.
source code
 
get_si_unit_y()
Returns y direction SI unit of a data brick.
source code
 
get_si_unit_z()
Returns z direction SI unit of a data brick.
source code
 
get_si_unit_w()
Returns value SI unit of a data brick.
source code
 
set_si_unit_x(si_unit)
Sets the SI unit corresponding to the lateral (X) dimension of a data brick.
source code
 
set_si_unit_y(si_unit)
Sets the SI unit corresponding to the lateral (Y) dimension of a data brick.
source code
 
set_si_unit_z(si_unit)
Sets the SI unit corresponding to the "height" (Z) dimension of a data brick.
source code
 
set_si_unit_w(si_unit)
Sets the SI unit corresponding to the "value" of a data brick.
source code
 
get_min()
Find the minimum value in a data brick.
source code
 
get_max()
Find the maximum value in a data brick.
source code
 
get_value_format_x(style)
Finds value format good for displaying coordinates of a data brick.
source code
 
get_value_format_y(style)
Finds value format good for displaying values of a data brick.
source code
 
get_value_format_z(style)
Finds value format good for displaying values of a data brick.
source code
 
get_value_format_w(style)
Finds value format good for displaying values of a data brick.
source code
 
itor(pixpos)
Transforms pixel coordinate to real (physical) coordinate in x direction.
source code
 
rtoi(realpos)
Transforms real (physical) coordinate to pixel coordinate in x axis.
source code
 
jtor(pixpos)
Transforms pixel coordinate to real (physical) coordinate in y direction.
source code
 
rtoj(realpos)
Transforms real (physical) coordinate to pixel coordinate in y axis.
source code
 
ktor(pixpos)
Transforms pixel coordinate to real (physical) coordinate in z direction.
source code
 
rtok(realpos)
Transforms real (physical) coordinate to pixel coordinate in z axis.
source code
 
ktor_cal(pixpos)
Transforms pixel coordinate to real (physical) coordinate in z direction, taking into account calibration.
source code
 
rtok_cal(realpos)
Transforms real (physical) coordinate to pixel coordinate in z axis, taking into account calibration.
source code
 
get_val(col, row, lev)
Gets value at given position in a data brick.
source code
 
set_val(col, row, lev, value)
Sets value at given position in a data brick.
source code
 
get_val_real(x, y, z)
Gets value at given position in a data brick, in real coordinates.
source code
 
set_val_real(x, y, z, value)
Sets value at given position in a data brick.
source code
 
get_dval(x, y, z, interpolation)
Gets interpolated value at arbitrary data brick point indexed by pixel coordinates.
source code
 
get_dval_real(x, y, z, interpolation)
Gets interpolated value at arbitrary data brick point indexed by pixel coordinates.
source code
 
clear()
Fills a data brick with zeroes.
source code
 
fill(value)
Fills a data brick with specified value.
source code
 
multiply(value)
Multiplies all values in a data brick with a specified value.
source code
 
add(value)
Adds a specified value to all values in a data brick.
source code
 
extract_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)
Extract a plane (DataField) from the brick.
source code
 
sum_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)
Sums planes in certain direction and extract the result (DataField).
source code
 
min_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)
Finds minima of planes in certain direction and extract the result (DataField).
source code
 
max_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)
Finds minima of planes in certain direction and extract the result (DataField).
source code
 
minpos_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)
Finds minima positions of planes in certain direction and extract the result (DataField).
source code
 
maxpos_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)
Finds maxima positions of planes in certain direction and extract the result (DataField).
source code
 
mean_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)
Finds mean of planes in certain direction and extract the result (DataField).
source code
 
rms_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)
Finds rms of planes in certain direction and extract the result (DataField).
source code
 
extract_line(target, istart, jstart, kstart, iend, jend, kend, keep_offsets)
Extract a line (DataLine) from the brick.
source code
 
get_zcalibration()
Gets the z-axis non-linear calibration of a data brick.
source code
 
set_zcalibration(calibration)
Sets the z-axis non-linear calibration of a data brick.
source code
 
get_data()
Extract the data of a data brick.
source code
 
set_data(data)
Sets the entire contents of a data brick.
source code
 
duplicate()
Convenience macro doing gwy_serializable_duplicate() with all the necessary typecasting.
source code
 
get_data_pointer()
Gets pointer to data which the brick contains.
source code
Method Details [hide private]

__init__(xres, yres, zres, xreal, yreal, zreal, nullme)
(Constructor)

source code 

Creates a new data brick.

Parameters:
  • xres - X resolution, i.e., the number of samples in x direction (int)
  • yres - Y resolution, i.e., the number of samples in y direction (int)
  • zres - Z resolution, i.e., the number of samples in z direction (int)
  • xreal - Real physical dimension in x direction. (float)
  • yreal - Real physical dimension in y direction. (float)
  • zreal - Real physical dimension in z direction. (float)
  • nullme - Whether the data brick should be initialized to zeroes. If False, the data will not be initialized. (bool)
Returns:
A newly created data brick. (Brick)

Since: 2.31

new_alike(nullme)

source code 

Creates a new data brick similar to an existing one.

Use Brick.duplicate() if you want to copy a data brick including data.

Parameters:
  • nullme - Whether the data brick should be initialized to zeroes. If False, the data will not be initialized. (bool)
Returns:
A newly created data brick. (Brick)

Since: 2.31

new_part(xpos, ypos, zpos, xres, yres, zres, keep_offsets)

source code 

Creates a new data brick as a part of existing one.

Use Brick.duplicate() if you want to copy a whole data brick.

Parameters:
  • xpos - x position where to start from (int)
  • ypos - y position where to start from (int)
  • zpos - z position where to start from (int)
  • xres - x resolution (width) to be extracted (int)
  • yres - y resolution (height) to be extracted (int)
  • zres - z resolution (depth) to be extracted (int)
  • keep_offsets - keep offsets of data during extraction (bool)
Returns:
A newly created data brick. (Brick)

Since: 2.32

data_changed()

source code 

Emits signal "data_changed" on a data brick.

Since: 2.31

resample(xres, yres, zres, interpolation)

source code 

Resamples a data brick.

In other words changes the size of three dimensional field related with data brick. The original values are used for resampling using a requested interpolation alorithm.

Parameters:
  • xres - Desired x resolution. (int)
  • yres - Desired y resolution. (int)
  • zres - Desired z resolution. (int)
  • interpolation - Interpolation method to use. Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)

Since: 2.31

get_xres()

source code 

Gets the x resolution of a data brick.

Returns:
Resolution (number of data points). (int)

Since: 2.31

get_yres()

source code 

Gets the y resolution of a data brick.

Returns:
Resolution (number of data points). (int)

Since: 2.31

get_zres()

source code 

Gets the z resolution of a data brick.

Returns:
Resolution (number of data points). (int)

Since: 2.31

get_xreal()

source code 

Gets the physical size of a data brick in the x direction.

Returns:
Real size of a data brick the x direction. (float)

Since: 2.31

get_yreal()

source code 

Gets the physical size of a data brick in the y direction.

Returns:
Real size of a data brick the y direction. (float)

Since: 2.31

get_zreal()

source code 

Gets the physical size of a data brick in the z direction.

Returns:
Real size of a data brick the z direction. (float)

Since: 2.31

get_xoffset()

source code 

Gets the offset of data brick origin in x direction.

Returns:
Offset value. (float)

Since: 2.31

get_yoffset()

source code 

Gets the offset of data brick origin in y direction.

Returns:
Offset value. (float)

Since: 2.31

get_zoffset()

source code 

Gets the offset of data brick origin in z direction.

Returns:
Offset value. (float)

Since: 2.31

set_xreal(xreal)

source code 

Sets the real x dimension of a brick.

Parameters:
  • xreal - New real x dimensions value (float)

Since: 2.31

set_yreal(yreal)

source code 

Sets the real y dimension of a brick.

Parameters:
  • yreal - New real y dimensions value (float)

Since: 2.31

set_zreal(zreal)

source code 

Sets the real z dimension of a brick.

Parameters:
  • zreal - New real z dimensions value (float)

Since: 2.31

set_xoffset(xoffset)

source code 

Sets the offset of a data brick origin in the x direction.

Note offsets don't affect any calculation, nor functions like Brick.rtoi().

Parameters:
  • xoffset - New offset value. (float)

Since: 2.31

set_yoffset(yoffset)

source code 

Sets the offset of a data brick origin in the y direction.

Note offsets don't affect any calculation, nor functions like Brick.rtoi().

Parameters:
  • yoffset - New offset value. (float)

Since: 2.31

set_zoffset(zoffset)

source code 

Sets the offset of a data brick origin in the z direction.

Note offsets don't affect any calculation, nor functions like Brick.rtoi().

Parameters:
  • zoffset - New offset value. (float)

Since: 2.31

get_si_unit_x()

source code 

Returns x direction SI unit of a data brick.

Returns:
SI unit corresponding to the lateral (X) dimension of the data brick. Its reference count is not incremented. (SIUnit)

Since: 2.31

get_si_unit_y()

source code 

Returns y direction SI unit of a data brick.

Returns:
SI unit corresponding to the lateral (Y) dimension of the data brick. Its reference count is not incremented. (SIUnit)

Since: 2.31

get_si_unit_z()

source code 

Returns z direction SI unit of a data brick.

Returns:
SI unit corresponding to the "height" (Z) dimension of the data brick. Its reference count is not incremented. (SIUnit)

Since: 2.31

get_si_unit_w()

source code 

Returns value SI unit of a data brick.

Returns:
SI unit corresponding to the "value" of the data brick. Its reference count is not incremented. (SIUnit)

Since: 2.31

set_si_unit_x(si_unit)

source code 

Sets the SI unit corresponding to the lateral (X) dimension of a data brick.

It does not assume a reference on si_unit, instead it adds its own reference.

Parameters:
  • si_unit - SI unit to be set. (SIUnit)

Since: 2.31

set_si_unit_y(si_unit)

source code 

Sets the SI unit corresponding to the lateral (Y) dimension of a data brick.

It does not assume a reference on si_unit, instead it adds its own reference.

Parameters:
  • si_unit - SI unit to be set. (SIUnit)

Since: 2.31

set_si_unit_z(si_unit)

source code 

Sets the SI unit corresponding to the "height" (Z) dimension of a data brick.

It does not assume a reference on si_unit, instead it adds its own reference.

Parameters:
  • si_unit - SI unit to be set. (SIUnit)

Since: 2.31

set_si_unit_w(si_unit)

source code 

Sets the SI unit corresponding to the "value" of a data brick.

It does not assume a reference on si_unit, instead it adds its own reference.

Parameters:
  • si_unit - SI unit to be set. (SIUnit)

Since: 2.31

get_min()

source code 

Find the minimum value in a data brick.

Returns:
The minimum value within the brick. (float)

Since: 2.31

get_max()

source code 

Find the maximum value in a data brick.

Returns:
The maximum value within the brick. (float)

Since: 2.31

get_value_format_x(style)

source code 

Finds value format good for displaying coordinates of a data brick.

Parameters:
  • style - Unit format style. Expected values: SI_UNIT_FORMAT_NONE, SI_UNIT_FORMAT_PLAIN, SI_UNIT_FORMAT_MARKUP, SI_UNIT_FORMAT_VFMARKUP, SI_UNIT_FORMAT_TEX. (SIUnitFormatStyle)
Returns:
Tuple consisting of 2 values (value, format). ((SIValueFormat), (SkipArg))

Since: 2.31

get_value_format_y(style)

source code 

Finds value format good for displaying values of a data brick.

Parameters:
  • style - Unit format style. Expected values: SI_UNIT_FORMAT_NONE, SI_UNIT_FORMAT_PLAIN, SI_UNIT_FORMAT_MARKUP, SI_UNIT_FORMAT_VFMARKUP, SI_UNIT_FORMAT_TEX. (SIUnitFormatStyle)
Returns:
Tuple consisting of 2 values (value, format). ((SIValueFormat), (SkipArg))

Since: 2.31

get_value_format_z(style)

source code 

Finds value format good for displaying values of a data brick.

Parameters:
  • style - Unit format style. Expected values: SI_UNIT_FORMAT_NONE, SI_UNIT_FORMAT_PLAIN, SI_UNIT_FORMAT_MARKUP, SI_UNIT_FORMAT_VFMARKUP, SI_UNIT_FORMAT_TEX. (SIUnitFormatStyle)
Returns:
Tuple consisting of 2 values (value, format). ((SIValueFormat), (SkipArg))

Since: 2.31

get_value_format_w(style)

source code 

Finds value format good for displaying values of a data brick.

Note this functions searches for minimum and maximum value in brick, therefore it's relatively slow.

Parameters:
  • style - Unit format style. Expected values: SI_UNIT_FORMAT_NONE, SI_UNIT_FORMAT_PLAIN, SI_UNIT_FORMAT_MARKUP, SI_UNIT_FORMAT_VFMARKUP, SI_UNIT_FORMAT_TEX. (SIUnitFormatStyle)
Returns:
Tuple consisting of 2 values (value, format). ((SIValueFormat), (SkipArg))

Since: 2.31

itor(pixpos)

source code 

Transforms pixel coordinate to real (physical) coordinate in x direction.

That is it maps range [0..x resolution] to range [0..x real-size]. It is not suitable for conversion of matrix indices to physical coordinates, you have to use Brick.itor(brick, pixpos + 0.5) for that.

Parameters:
  • pixpos - Pixel coordinate. (float)
Returns:
pixpos in real coordinates. (float)

Since: 2.31

rtoi(realpos)

source code 

Transforms real (physical) coordinate to pixel coordinate in x axis.

That is it maps range [0..x real-size] to range [0..x resolution].

Parameters:
  • realpos - Real coordinate. (float)
Returns:
realpos in pixel coordinates. (float)

Since: 2.31

jtor(pixpos)

source code 

Transforms pixel coordinate to real (physical) coordinate in y direction.

That is it maps range [0..y resolution] to range [0..y real-size]. It is not suitable for conversion of matrix indices to physical coordinates, you have to use Brick.itor(brick, pixpos + 0.5) for that.

Parameters:
  • pixpos - Pixel coordinate. (float)
Returns:
pixpos in real coordinates. (float)

Since: 2.31

rtoj(realpos)

source code 

Transforms real (physical) coordinate to pixel coordinate in y axis.

That is it maps range [0..y real-size] to range [0..y resolution].

Parameters:
  • realpos - Real coordinate. (float)
Returns:
realpos in pixel coordinates. (float)

Since: 2.31

ktor(pixpos)

source code 

Transforms pixel coordinate to real (physical) coordinate in z direction.

That is it maps range [0..z resolution] to range [0..z real-size]. It is not suitable for conversion of matrix indices to physical coordinates, you have to use Brick.itor(brick, pixpos + 0.5) for that.

Parameters:
  • pixpos - Pixel coordinate. (float)
Returns:
pixpos in real coordinates. (float)

Since: 2.31

rtok(realpos)

source code 

Transforms real (physical) coordinate to pixel coordinate in z axis.

That is it maps range [0..z real-size] to range [0..z resolution].

Parameters:
  • realpos - Real coordinate. (float)
Returns:
realpos in pixel coordinates. (float)

Since: 2.31

ktor_cal(pixpos)

source code 

Transforms pixel coordinate to real (physical) coordinate in z direction, taking into account calibration.

Unlike Brick.ktor(), this function takes into account the z calibration and, if calibration is not present, the z axis offset. Since the calibration is available only for discrete pixel coordinates, the values are interpolated between and clamped if outside the range.

The values in the calibration are assumed to correspond to pixel centres. This convention is also kept when no calibration is present.

Parameters:
  • pixpos - Pixel coordinate. (float)
Returns:
pixpos in real coordinates. (float)

Since: 2.42

rtok_cal(realpos)

source code 

Transforms real (physical) coordinate to pixel coordinate in z axis, taking into account calibration.

Unlike Brick.rtok(), this function takes into account the z calibration and, if calibration is not present, the z axis offset. Since the calibration is available only for discrete pixel coordinates, the values are interpolated between and clamped if outside the range.

The values in the calibration are assumed to correspond to pixel centres. This convention is also kept when no calibration is present.

Parameters:
  • realpos - Real coordinate. (float)
Returns:
realpos in pixel coordinates. (float)

Since: 2.42

get_val(col, row, lev)

source code 

Gets value at given position in a data brick.

Do not access data with this function inside inner loops, it's slow. Get raw data buffer with Brick.get_data_const() and access it directly instead.

Parameters:
  • col - Position in the brick (column index). (int)
  • row - Position in the brick (row index). (int)
  • lev - Position in the brick (level index). (int)
Returns:
Value at given index. (float)

Since: 2.31

set_val(col, row, lev, value)

source code 

Sets value at given position in a data brick.

Do not access data with this function inside inner loops, it's slow. Get raw data buffer with Brick.get_data_const() and access it directly instead.

Parameters:
  • col - Position in the brick (column index). (int)
  • row - Position in the brick (row index). (int)
  • lev - Position in the brick (level index). (int)
  • value - Value to be set. (float)

Since: 2.31

get_val_real(x, y, z)

source code 

Gets value at given position in a data brick, in real coordinates.

Do not access data with this function inside inner loops, it's slow. Get raw data buffer with Brick.get_data_const() and access it directly instead.

Parameters:
  • x - Position in the brick (x direction). (float)
  • y - Position in the brick (y direction). (float)
  • z - Position in the brick (z direction). (float)
Returns:
Value at given index. (float)

Since: 2.31

set_val_real(x, y, z, value)

source code 

Sets value at given position in a data brick.

Do not access data with this function inside inner loops, it's slow. Get raw data buffer with Brick.get_data_const() and access it directly instead.

Parameters:
  • x - Position in the brick (x direction). (float)
  • y - Position in the brick (y direction). (float)
  • z - Position in the brick (z direction). (float)
  • value - Value to be set. (float)

Since: 2.31

get_dval(x, y, z, interpolation)

source code 

Gets interpolated value at arbitrary data brick point indexed by pixel coordinates.

Note pixel values are centered in intervals [i, i+1]. See also Brick.get_dval_real() that does the same, but takes real coordinates.

Parameters:
  • x - Position in data brick in range [0, x resolution]. If the value is outside this range, the nearest border value is returned. (float)
  • y - Position in data brick in range [0, y resolution]. If the value is outside this range, the nearest border value is returned. (float)
  • z - Position in data brick in range [0, z resolution]. If the value is outside this range, the nearest border value is returned. (float)
  • interpolation - Interpolation method to use. (int)
Returns:
Value interpolated in the data brick. (float)

Since: 2.31

get_dval_real(x, y, z, interpolation)

source code 

Gets interpolated value at arbitrary data brick point indexed by pixel coordinates.

Note pixel values are centered in intervals [j, j+1]. See also Brick.get_dval() that does the same, but takes pixel coordinates.

Parameters:
  • x - Position in data brick in range [0, x resolution]. If the value is outside this range, the nearest border value is returned. (float)
  • y - Position in data brick in range [0, y resolution]. If the value is outside this range, the nearest border value is returned. (float)
  • z - Position in data brick in range [0, z resolution]. If the value is outside this range, the nearest border value is returned. (float)
  • interpolation - Interpolation method to use. (int)
Returns:
Value interpolated in the data brick. (float)

Since: 2.31

clear()

source code 

Fills a data brick with zeroes.

Since: 2.31

fill(value)

source code 

Fills a data brick with specified value.

Parameters:
  • value - Value to fill data brick with. (float)

Since: 2.31

multiply(value)

source code 

Multiplies all values in a data brick with a specified value.

Parameters:
  • value - Value to multiply data brick with. (float)

Since: 2.31

add(value)

source code 

Adds a specified value to all values in a data brick.

Parameters:
  • value - Value to be added. (float)

Since: 2.31

extract_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)

source code 

Extract a plane (DataField) from the brick.

One value of set (width, height, depth) needs to be -1, determining the plane orientation.

Parameters:
  • target - Datafield to be filled by extracted plane. It will be resized if necessary. (DataField)
  • istart - Column where to start (pixel coordinates). (int)
  • jstart - Row where to start (pixel coordinates). (int)
  • kstart - Level where to start (pixel coordinates). (int)
  • width - Pixel width of extracted plane. If width is -1, the yz plane will be extracted. (int)
  • height - Pixel height of extracted plane. If height is -1, the xz plane will be extracted (int)
  • depth - Pixel depth of extracted plane. If depth is -1, the xy plane will be extracted (int)
  • keep_offsets - Keep the physical offsets in extracted field. (bool)

Since: 2.31

sum_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)

source code 

Sums planes in certain direction and extract the result (DataField). One value of set (width, height, depth) needs to be -1, determining the plane orientation. In contrast to Brick.extract_plane, the appropriate start coordinate (e.g. istart if width = -1) is not used for single plane extraction, but the planes are accumulated in whole range (0..xres for given example)

Parameters:
  • target - Datafield to be filled by summed plane. It will be resized if necessary. (DataField)
  • istart - Column where to start (pixel coordinates). (int)
  • jstart - Row where to start (pixel coordinates). (int)
  • kstart - Level where to start (pixel coordinates). (int)
  • width - Pixel width of summed plane. If width is -1, the yz planes will be summed. (int)
  • height - Pixel height of summed plane. If height is -1, the xz planes will be summed (int)
  • depth - Pixel depth of summed plane. If depth is -1, the xy planes will be summed (int)
  • keep_offsets - Keep the physical offsets in extracted field. Not implemented. (bool)

Since: 2.31

min_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)

source code 

Finds minima of planes in certain direction and extract the result (DataField). One value of set (width, height, depth) needs to be -1, determining the plane orientation. In contrast to Brick.extract_plane, the appropriate start coordinate (e.g. istart if width = -1) is not used for single plane extraction, but the planes are accumulated in whole range (0..xres for given example)

Parameters:
  • target - Datafield to be filled by the minima plane. It will be resized if necessary. (DataField)
  • istart - Column where to start (pixel coordinates). (int)
  • jstart - Row where to start (pixel coordinates). (int)
  • kstart - Level where to start (pixel coordinates). (int)
  • width - Pixel width of summarized plane. If width is -1, the yz planes will be summarized. (int)
  • height - Pixel height of summarized plane. If height is -1, the xz planes will be summarized. (int)
  • depth - Pixel depth of summarized plane. If depth is -1, the xy planes will be summarized (int)
  • keep_offsets - Keep the physical offsets in extracted field. Not implemented. (bool)

Since: 2.32

max_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)

source code 

Finds minima of planes in certain direction and extract the result (DataField). One value of set (width, height, depth) needs to be -1, determining the plane orientation. In contrast to Brick.extract_plane, the appropriate start coordinate (e.g. istart if width = -1) is not used for single plane extraction, but the planes are accumulated in whole range (0..xres for given example)

Parameters:
  • target - Datafield to be filled by the maxima plane. It will be resized if necessary. (DataField)
  • istart - Column where to start (pixel coordinates). (int)
  • jstart - Row where to start (pixel coordinates). (int)
  • kstart - Level where to start (pixel coordinates). (int)
  • width - Pixel width of summarized plane. If width is -1, the yz planes will be summarized. (int)
  • height - Pixel height of summarized plane. If height is -1, the xz planes will be summarized. (int)
  • depth - Pixel depth of extracted plane. If depth is -1, the xy planes will be summarized (int)
  • keep_offsets - Keep the physical offsets in extracted field. Not implemented. (bool)

Since: 2.32

minpos_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)

source code 

Finds minima positions of planes in certain direction and extract the result (DataField). One value of set (width, height, depth) needs to be -1, determining the plane orientation. In contrast to Brick.extract_plane, the appropriate start coordinate (e.g. istart if width = -1) is not used for single plane extraction, but the planes are accumulated in whole range (0..xres for given example)

Parameters:
  • target - Datafield to be filled by the minima positions plane. It will be resized if necessary. (DataField)
  • istart - Column where to start (pixel coordinates). (int)
  • jstart - Row where to start (pixel coordinates). (int)
  • kstart - Level where to start (pixel coordinates). (int)
  • width - Pixel width of summarized plane. If width is -1, the yz planes will be summarized. (int)
  • height - Pixel height of summarized plane. If height is -1, the xz planes will be summarized. (int)
  • depth - Pixel depth of summarized plane. If depth is -1, the xy planes will be summarized (int)
  • keep_offsets - Keep the physical offsets in summarized field. Not implemented. (bool)

Since: 2.32

maxpos_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)

source code 

Finds maxima positions of planes in certain direction and extract the result (DataField). One value of set (width, height, depth) needs to be -1, determining the plane orientation. In contrast to Brick.extract_plane, the appropriate start coordinate (e.g. istart if width = -1) is not used for single plane extraction, but the planes are accumulated in whole range (0..xres for given example)

Parameters:
  • target - Datafield to be filled by the maxima positions plane. It will be resized if necessary. (DataField)
  • istart - Column where to start (pixel coordinates). (int)
  • jstart - Row where to start (pixel coordinates). (int)
  • kstart - Level where to start (pixel coordinates). (int)
  • width - Pixel width of summarized plane. If width is -1, the yz planes will be summarized. (int)
  • height - Pixel height of summarized plane. If height is -1, the xz planes will be summarized (int)
  • depth - Pixel depth of summarized plane. If depth is -1, the xy planes will be summarized (int)
  • keep_offsets - Keep the physical offsets in summarized field. Not implemented. (bool)

Since: 2.32

mean_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)

source code 

Finds mean of planes in certain direction and extract the result (DataField). One value of set (width, height, depth) needs to be -1, determining the plane orientation. In contrast to Brick.extract_plane, the appropriate start coordinate (e.g. istart if width = -1) is not used for single plane extraction, but the planes are accumulated in whole range (0..xres for given example)

Parameters:
  • target - Datafield to be filled by the mean plane. It will be resized if necessary. (DataField)
  • istart - Column where to start (pixel coordinates). (int)
  • jstart - Row where to start (pixel coordinates). (int)
  • kstart - Level where to start (pixel coordinates). (int)
  • width - Pixel width of summarized plane. If width is -1, the yz planes will be summarized. (int)
  • height - Pixel height of summarized plane. If height is -1, the xz planes will be summarized. (int)
  • depth - Pixel depth of summarized plane. If depth is -1, the xy planes will be summarized. (int)
  • keep_offsets - Keep the physical offsets in summarized field. Not implemented. (bool)

Since: 2.32

rms_plane(target, istart, jstart, kstart, width, height, depth, keep_offsets)

source code 

Finds rms of planes in certain direction and extract the result (DataField). One value of set (width, height, depth) needs to be -1, determining the plane orientation. In contrast to Brick.extract_plane, the appropriate start coordinate (e.g. istart if width = -1) is not used for single plane extraction, but the planes are accumulated in whole range (0..xres for given example)

Parameters:
  • target - Datafield to be filled by the rms plane. It will be resized if necessary. (DataField)
  • istart - Column where to start (pixel coordinates). (int)
  • jstart - Row where to start (pixel coordinates). (int)
  • kstart - Level where to start (pixel coordinates). (int)
  • width - Pixel width of summarized plane. If width is -1, the yz planes will be summarized. (int)
  • height - Pixel height of summarized plane. If height is -1, the xz planes will be summarized. (int)
  • depth - Pixel depth of summarized plane. If depth is -1, the xy planes will be summarized. (int)
  • keep_offsets - Keep the physical offsets in extracted field. Not implemented. (bool)

Since: 2.32

extract_line(target, istart, jstart, kstart, iend, jend, kend, keep_offsets)

source code 

Extract a line (DataLine) from the brick.

Only line orientations parallel to coordinate axes are supported now, i.e. two of the start coordinates need to be same as end ones.

Parameters:
  • target - Dataline to be filled by extracted line. It will be resized if necessary. (DataLine)
  • istart - Column where to start (pixel coordinates). (int)
  • jstart - Row where to start (pixel coordinates). (int)
  • kstart - Level where to start (pixel coordinates). (int)
  • iend - Column where to start (pixel coordinates). (int)
  • jend - Row where to start (pixel coordinates). (int)
  • kend - Level where to start (pixel coordinates). (int)
  • keep_offsets - Keep physical offsets in extracted line. (bool)

Since: 2.31

get_zcalibration()

source code 

Gets the z-axis non-linear calibration of a data brick.

Returns:
Z Calibration (non-linear Z-axis values as ordinates). (DataLine)

Since: 2.32

set_zcalibration(calibration)

source code 

Sets the z-axis non-linear calibration of a data brick.

Parameters:
  • calibration - DataLine pointer with z-axis non-linear calibration of a data brick (values are stored as ordinates). It can also be None to unset the calibration. (DataLine)

Since: 2.32

get_data()

source code 

Extract the data of a data brick.

The returned list contains a copy of the data. Changing its contents does not change the data brick's data.

Returns:
List containing extracted data brick data. (list)

set_data(data)

source code 

Sets the entire contents of a data brick.

The length of data must be equal to the number of elements of the data brick.

Parameters:
  • data - Sequence of floating point values. (list)

duplicate()

source code 

Convenience macro doing gwy_serializable_duplicate() with all the necessary typecasting.

Returns:
(Brick)

Since: 2.31

get_data_pointer()

source code 

Gets pointer to data which the brick contains.

Returns:
integer pointing to the raw data of the brick (long)