neuror.cut_plane.viewer¶
App to find cut planes with arbitrary cut planes orientations with the help of a manual hint.
Related to https://bbpteam.epfl.ch/project/issues/browse/NGV-85
Functions
Create a 3d plane using a center position and a quaternion for orientation. |
|
Callback that redraw everything when sliders are changed. |
|
Write the final file cut-plane.json to disk. |
|
Optimize cut plane parameters. |
|
Globally loads the neuron. |
|
Update histo when sliders are changed. |
|
Dash callback. |
|
Dash callback. |
|
Dash callback. |
|
Dash callback. |
|
Dash callback. |
|
Dash callback. |
Classes
JSON encoder that handles numpy types. |
- class neuror.cut_plane.viewer.NumpyEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]¶
Bases:
JSONEncoder
JSON encoder that handles numpy types.
In python3, numpy types don’t serialize to correctly, so a custom converter is needed.
- default(o)[source]¶
Implement this method in a subclass such that it returns a serializable object for
o
, or calls the base implementation (to raise aTypeError
).For example, to support arbitrary iterators, you could implement default like this:
def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) # Let the base class default method raise the TypeError return JSONEncoder.default(self, o)
- neuror.cut_plane.viewer.create_plane(pos, quat)[source]¶
Create a 3d plane using a center position and a quaternion for orientation.
- Args :
pos: x,y,z position of the plane’s center (array([x,y,z])) quat: quaternion representing the orientations (Quaternion)
- Returns :
dict: A square surface to the plotly format
- neuror.cut_plane.viewer.display_click_data(rot_x, rot_y, rot_z, transl_x, transl_y, transl_z, hide, layout)[source]¶
Callback that redraw everything when sliders are changed.
- neuror.cut_plane.viewer.export(n_clicks, rot_x, rot_y, rot_z, transl_x, transl_y, transl_z, output_path)[source]¶
Write the final file cut-plane.json to disk.
- neuror.cut_plane.viewer.optimize(n_clicks, rot_x, rot_y, rot_z, transl_x, transl_y, transl_z)[source]¶
Optimize cut plane parameters.