oursin.texture
Calcium
Functions
Clear all custom meshes |
|
Create Texture objects |
|
Delete Texture objects |
|
Set the position of fov in ml/ap/dv coordinates relative to the CCF (0,0,0) point |
|
Set the positions of textures in ap/ml/dv coordinates relative to the CCF (0,0,0) point |
Classes
- class Texture(position=None, offset=None, texture_file=None)[source]
Bases:
object
- delete()[source]
Deletes Textures
Parameters
references object being deleted
Examples >>> tex.delete()
- set_position(positions)[source]
Set the position of fov in ap/ml/dv coordinates relative to the CCF (0,0,0) point
Parameters
- positionlist of list of three floats
vertex positions of the four corners of the texture relative to the CCF origin
Examples
>>> tex.set_position([[9.2611688 , 7.94252654, 1.3904818 ], [8.75443871, 7.94252654, 1.08008647], [9.24259926, 8.52829154, 1.43690564], [8.73586918, 8.52829154, 1.12651031]])
- create(N)[source]
Create Texture objects
Note: textures must be created before setting other values
Parameters
- Nint
number of new Texture objects
Examples
>>> textures_list = urchin.textures.create(3)
- delete(textures_list)[source]
Delete Texture objects
Parameters
textures_list : list of Texture
Examples
>>> urchin.fovs.delete(textures_list)
- set_positions(textures_list, positions_list)[source]
Set the positions of textures in ap/ml/dv coordinates relative to the CCF (0,0,0) point
Note: this plural function has no efficiency advantage of Texture.set_position, for readable code we recommend using the former.
Parameters
- textures_listlist of fov objects
list of fovs being moved
- positionslist of list of list of three floats
list of four vertex corners for each texture
Examples
>>> urchin.fovs.set_positions([[...],[...],[...]]) # see set_position for position example
- set_images(textures_list, images_list)[source]
Set the position of fov in ml/ap/dv coordinates relative to the CCF (0,0,0) point
Parameters
- fovs_listlist of fov objects
list of fovs being moved
- positionslist of list of three floats
list of positions of fovs
Examples
>>> img0 = fov. >>> urchin.fovs.set_textures([f1,f2,f3], ['fov1.png','fov'])