mdt.gui.maps_visualizer.renderers package

Submodules

mdt.gui.maps_visualizer.renderers.base module

class mdt.gui.maps_visualizer.renderers.base.NoOptPlottingFrameInfoViewer[source]

Bases: mdt.gui.maps_visualizer.renderers.base.PlottingFrameInfoViewer

Implementations of this class can be given to a PlottingFrame to update viewing information.

As an interface is bridges the gap between the rest of the GUI and the PlottingFrame and can encapsulate highlighting interesting aspects of one of the plots.

clear_voxel_info()[source]

Tell the info viewer that we are no longer looking at a specific voxel.

set_voxel_info(map_name, onscreen_coords, data_index)[source]

Highlight a single voxel.

Parameters:
  • map_name (str) – the name of the map for which we are displaying the value
  • onscreen_coords (tuple of x,y) – the coordinates of the voxel onscreen
  • data_index (tuple of x,y,z,v) – the 4d coordinates of the corresponding voxel in the data
class mdt.gui.maps_visualizer.renderers.base.PlottingFrame(controller, plotting_info_viewer=None)[source]

Bases: object

export_image(filename, width, height, dpi=100)[source]

Export the current view as an image.

Parameters:
  • filename (str) – where to write the file
  • width (int) – the width in pixels
  • height (int) – the height in pixels
  • dpi (int) – the dpi of the result
redraw()[source]

Tell the plotting frame to do a redraw.

set_auto_rendering(auto_render)[source]

Set if this plotting frame should auto render itself on every configuration update, or not.

Parameters:auto_render (boolean) – if True the plotting frame should auto render, if False it should only render on manual updates.
class mdt.gui.maps_visualizer.renderers.base.PlottingFrameInfoViewer[source]

Bases: object

Implementations of this class can be given to a PlottingFrame to update viewing information.

As an interface is bridges the gap between the rest of the GUI and the PlottingFrame and can encapsulate highlighting interesting aspects of one of the plots.

clear_voxel_info()[source]

Tell the info viewer that we are no longer looking at a specific voxel.

set_voxel_info(map_name, onscreen_coords, data_index)[source]

Highlight a single voxel.

Parameters:
  • map_name (str) – the name of the map for which we are displaying the value
  • onscreen_coords (tuple of x,y) – the coordinates of the voxel onscreen
  • data_index (tuple of x,y,z,v) – the 4d coordinates of the corresponding voxel in the data

mdt.gui.maps_visualizer.renderers.matplotlib_renderer module

class mdt.gui.maps_visualizer.renderers.matplotlib_renderer.MatplotlibPlotting(controller, parent=None, plotting_info_viewer=None)[source]

Bases: mdt.gui.maps_visualizer.renderers.base.PlottingFrame, MockClass

export_image(filename, width, height, dpi=100)[source]

Export the current view as an image.

Parameters:
  • filename (str) – where to write the file
  • width (int) – the width in pixels
  • height (int) – the height in pixels
  • dpi (int) – the dpi of the result
redraw()[source]

Tell the plotting frame to do a redraw.

set_auto_rendering(auto_render)[source]

Set if this plotting frame should auto render itself on every configuration update, or not.

Parameters:auto_render (boolean) – if True the plotting frame should auto render, if False it should only render on manual updates.
update_model(model)[source]
mdt.gui.maps_visualizer.renderers.matplotlib_renderer.pyqtSlot(*args, **kwargs)

Mocked decorator, needed in the case we need to mock a decorator

Module contents