/ . / VolumeViewer / volume.py / Volume
Methods
|
|
|
add_volume_change_callback
|
add_volume_change_callback ( self, cb )
|
|
model_transform
|
model_transform ( self )
|
|
grid_data
|
grid_data (
self,
use_subregion=None,
use_step=None,
mask_zone=None,
)
Return currently displayed subregion. If only a zone is being displayed
set all grid data values outside the zone to zero.
|
|
show
|
show (
self,
representation=None,
rendering_options=None,
show=None,
)
|
|
close_models
|
close_models ( self )
|
|
hide_surface
|
hide_surface ( self )
|
|
replace_data
|
replace_data ( self, data )
|
|
transfer_function
|
transfer_function ( self )
Without brightness and transparency adjustment.
|
|
show_solid
|
show_solid (
self,
show,
rendering_options,
)
|
|
view_models
|
view_models (
self,
view,
representation=None,
)
|
|
new_region
|
new_region (
self,
ijk_min=None,
ijk_max=None,
ijk_step=None,
show=None,
adjust_step=None,
save_in_region_queue=None,
)
Sets new region and optionally shows it.
|
|
unshow
|
unshow ( self )
Hide surface model and close solid model.
|
|
set_parameters
|
set_parameters ( self, **kw )
Programatically set data region parameters. The following keyword
parameters are valid. surface_levels
surface_colors (rgb or rgba values)
surface_brightness_factor
transparency_factor
solid_levels
solid_colors (rgb or rgba values)
transparency_depth
solid_brightness_factor
Any rendering option attribute names can also be used.
|
|
full_name
|
full_name ( self )
|
|
write_file
|
write_file (
self,
path,
format=None,
options=None,
)
|
|
message
|
message ( self, text )
|
|
interpolated_gradients
|
interpolated_gradients (
self,
points,
point_xform=None,
out_of_bounds_list=None,
use_subregion=None,
use_step=None,
)
Applying point_xform to points gives Chimera world coordinates. If the
point_xform is None then the points are in local volume coordinates.
|
|
matrix_value_statistics
|
matrix_value_statistics ( self, read_matrix=None )
|
|
calculate_contour_surface
|
calculate_contour_surface (
self,
level,
rendering_options,
piece,
)
|
|
colormap
|
colormap ( self, bins=None )
Apply transparency and brightness adjustments to transfer function.
|
|
initialize_thresholds
|
initialize_thresholds (
self,
first_time_only=None,
vfrac=None,
mfrac=None,
replace=None,
)
Returns True if thresholds are changed.
|
|
matrix
|
matrix (
self,
read_matrix=None,
use_step=None,
use_subregion=None,
)
|
|
copy_settings_from
|
copy_settings_from (
self,
dr,
copy_style=None,
copy_thresholds_and_colors=None,
copy_rendering_options=None,
copy_region=None,
copy_xform=None,
copy_active=None,
copy_zone=None,
)
|
|
set_representation
|
set_representation ( self, rep )
|
|
matrix_changed
|
matrix_changed ( self )
Either data values or subregion has changed.
|
|
update_surface
|
update_surface (
self,
show_mesh,
rendering_options,
)
|
|
remove_surfaces
|
remove_surfaces ( self )
|
|
choose_subsampling
|
choose_subsampling ( self, ijk_step )
Return the subsampling and size of subsampled matrix for the requested
ijk_step.
|
|
open_model
|
open_model ( self, model_id )
|
|
has_thresholds
|
has_thresholds ( self )
|
|
xyz_bounds
|
xyz_bounds ( self )
The xyz bounding box encloses the subsampled grid with half a step size
padding on all sides.
|
|
close_surface
|
close_surface ( self )
|
|
writable_copy
|
writable_copy (
self,
require_copy=None,
show=None,
unshow_original=None,
model_id=None,
use_subregion=None,
use_step=None,
name=None,
)
If volume data is not writable then make a writable copy.
|
|
make_solid
|
make_solid ( self )
|
|
region_matrix
|
region_matrix (
self,
origin,
size,
subsampling,
step,
read_matrix=None,
)
Region includes ijk_min and ijk_max points.
|
|
full_matrix
|
full_matrix (
self,
read_matrix=None,
use_step=None,
)
|
|
surface_model
|
surface_model ( self )
|
|
matrix_indices_to_xyz_transform
|
matrix_indices_to_xyz_transform (
self,
use_step=None,
use_subregion=None,
)
Transform mapping matrix indices to xyz. The matrix indices are not the
same as the data indices since the matrix includes only the current
subregion and subsampled data values.
|
|
update_surface_piece
|
update_surface_piece (
self,
level,
rgba,
show_mesh,
rendering_options,
piece,
)
|
|
copy_zone
|
copy_zone ( self, outside=None )
|
|
same_region
|
same_region (
self,
r1,
r2,
)
Handle ijk_min, ijk_max, ijk_step as lists or tuples.
|
|
grid_points
|
grid_points ( self, xform_to_local_coords )
Return xyz coordinates of grid points of volume data transformed to a
local coordinate system.
|
|
ijk_bounds
|
ijk_bounds (
self,
use_step=None,
use_subregion=None,
)
The data ijk bounds with half a step size padding on all sides.
|
|
is_full_region
|
is_full_region ( self )
|
|
surface_piece_changed_cb
|
surface_piece_changed_cb (
self,
trigger,
unused,
changes,
)
Detect surface piece color change and display style change.
|
|
remove_volume_change_callback
|
remove_volume_change_callback ( self, cb )
|
|
data_changed_cb
|
data_changed_cb ( self, type )
Data values or coordinates have changed.
Surface / solid rendering is not automatically redrawn when data values
change.
|
|
modulated_surface_color
|
modulated_surface_color ( self, rgba )
Apply surface/mesh transparency factor.
|
|
model_closed_cb
|
model_closed_cb ( self, model )
|
|
close_solid
|
close_solid ( self )
|
|
matrix_and_transform
|
matrix_and_transform (
self,
source_to_world_xform,
use_subregion,
use_step,
)
Returns 3-d numeric array and transformation from a given "source"
coordinate system to array indices. The source_to_world_xform transforms
from the source coordinate system to Chimera world coordinates.
If the transform is None it means the source coordinates are the
same as the volume local coordinates.
|
|
show_surface
|
show_surface (
self,
show,
show_mesh,
rendering_options,
)
|
|
name_with_id
|
name_with_id ( self )
|
|
add_interpolated_values
|
add_interpolated_values ( self, v )
Add values from another volume interpolated at grid positions
of this volume.
|
|
show_outline_box
|
show_outline_box (
self,
show,
rgb,
)
|
|
update_solid
|
update_solid ( self, rendering_options )
|
|
matrix_size
|
matrix_size (
self,
use_step=None,
use_subregion=None,
)
Size of matrix for subsampled subregion returned by matrix().
|
|
interpolated_values
|
interpolated_values (
self,
points,
point_xform=None,
out_of_bounds_list=None,
use_subregion=None,
use_step=None,
)
Applying point_xform to points gives Chimera world coordinates. If the
point_xform is None then the points are in local volume coordinates.
|
|
__init__
|
__init__ (
self,
data,
region=None,
rendering_options=None,
model_id=None,
open_model=None,
message_cb=None,
)
|
|
match_surface_pieces
|
match_surface_pieces ( self, levels )
Pair up surface pieces with contour levels. Aim is to avoid
recalculating contours if a piece already exists for a contour
level. Common cases are 1) no levels have changed, 2) one level
has changed, 3) one level added or deleted, 4) multiple levels
added or deleted. Level order is typically preserved.
|
|
ijk_region
|
ijk_region (
self,
use_step=None,
use_subregion=None,
)
Return the origin and size of the subsampled submatrix to be read.
Also return the subsampling factor and additional step (ie stride) that
must be used to get the displayed data.
|
|
|