Main Package
- Moildev
draw_polygon()
Moildev
Moildev.test()
Moildev.clean()
Moildev.get_Icx()
Moildev.get_Icy()
Moildev.get_imageWidth()
Moildev.get_imageHeight()
Moildev.getAnypointMaps()
Moildev.getPanoramaMaps()
Moildev.anypoint()
Moildev.panorama()
Moildev.reverse_image()
Moildev.getAlphaFromRho()
Moildev.getRhoFromAlpha()
Moildev.get_alpha_beta()
- Plugins
MoilApp
- class Ui_MoilApp.Ui_MainWindow[source]
Bases:
object
This class sets up the main window UI for the Moil Software application. It initializes the main window and its widgets, including labels, buttons, and layout configurations.
plugin module
This module defines a base class for creating plugins. Each plugin must inherit from the Plugin class and implement the necessary methods defined in it.
Plugins are expected to perform specific operations as part of a larger application framework. By inheriting from the Plugin base class, plugins are guaranteed to have a consistent interface that the main application can interact with.
- class base_plugin.Plugin[source]
Bases:
object
Base class for all plugins.
Each plugin must inherit from this class and implement the required methods. This ensures that all plugins have a consistent interface, making it easier to integrate them into the main application.
- description
A brief description of the plugin. Defaults to “UNKNOWN”.
- Type:
str
This is the base class that each plugin must inheritance from. Within this class you have to define the methods that all of your plugins must implement.
Lib
- class exif_lib.MetaImage(filename, encoding='utf-8')[source]
Bases:
object
Open an image based on the file path. Read and write the metadata of the image. This Library just provide can modify the comment, read the comment and clear the comment in metadata.
Open an image and load its metadata.
- Parameters:
() (encoding) – The name of image data.
() – Convert string to data that can stored on metadata image
- read_comment(encoding='utf-8') str [source]
This function is for read the comment from metadata Image and return with decode the data to be string.
- Parameters:
() (encoding) – Convert string to data that can stored on metadata image
- Returns:
The comment data from Metadata Image.
Main
This module defines the main application controller for MoilApp, a software to process fisheye images resulting in panorama and Anypoint views. It includes functions for directory operations, displaying help information, and a main application controller class that manages the UI and plugin interactions.
MoilApp provides a panoramic view that offers a horizontal view in a specific immersed environment to meet common human visual perception. The Anypoint view presents an undistorted image in a certain area according to the input coordinates.
- main.dir_copy(srcpath, dstdir)[source]
Copy directory.
- Parameters:
() (dstdir) – source path or original path folder
() – destination directory.
- Returns:
file copied in destination directory.
- class main.ControllerMainApps(parent=None)[source]
Bases:
QMainWindow
The initial class controller Main application to control UI MainWindow.
- Parameters:
() (parent) – None
Collection
This module defines the PluginCollection class, which is responsible for discovering and loading plugin modules that inherit from a base Plugin class. The PluginCollection class recursively walks through a specified package to find and instantiate plugin classes.
Plugins are expected to perform specific operations within a larger application framework, ensuring a consistent interface for interaction.
- class plugin_collection.PluginCollection(plugin_package)[source]
Bases:
object
Manages the collection of plugins by discovering and loading them from a specified package.
- plugins
A list of instantiated plugin objects.
- Type:
list
- name_application
A list of plugin class names.
- Type:
list
- seen_paths
A list of paths that have already been scanned for plugins.
- Type:
list
- path_folder
A list of module paths where plugins were found.
- Type:
list
- plugin_package
The name of the package to search for plugins.
- Type:
str
Upon creation, this class will read the plugins package for modules that contains a class definition that is inheriting from the Plugin class.
- Parameters:
() (plugin_package) – The folder name of plugins directory. i.e here is “plugins”
- reload_plugins()[source]
Reset the list of all plugins and initiate the walk over the main provided plugin package to load all available plugins.
- Returns:
None
API Module
This module defines the ThreadAxisAPI class, which provides an interface for controlling an axis through a serial port. The class includes methods for initializing the axis position, moving the axis, setting speed, and reading the current position. It also handles serial port connections and disconnections and logs all operations.
The logging information is stored in the ‘../log/Axis_control.log’ file.
- class serial_axis_api.ThreadAxisAPI[source]
Bases:
object
Provides an interface for controlling an axis via a serial port connection.
- serial_port
The serial port to which the axis controller is connected.
- Type:
str
- ser
The serial connection object for communication with the axis controller.
- Type:
serial.Serial
- logger
Logger object for logging axis control operations.
- Type:
logging.Logger
- absolute_moving(distance)[source]
Moving the axis with Absolute motion is the change of position from one absolute place to another.
- Parameters:
() (distance) – distance value
- Returns:
None
Move the axis from one relative place to another.
- Parameters:
() (distance) – distance value
- Returns:
None
- set_speed(speed)[source]
Set the speed value to speed value given by user.
- Parameters:
() (speed) – speed value
- Returns:
None
Lib
This module contains unit tests for the MetaImage class in the exif_lib module. The tests verify the functionality of modifying, reading, and clearing comments in image metadata using the MetaImage class.
- class test_exif_lib.TestExivlib(methodName='runTest')[source]
Bases:
TestCase
Unit tests for the MetaImage class to ensure correct functionality of modifying, reading, and clearing image comments.
- comment
The comment to be used in tests for modifying and reading image comments.
- Type:
str
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- comment = 'Raspi'
- test_modify_comment()[source]
Test the modify_comment method of MetaImage.
This test initializes a MetaImage object with a sample image, modifies the comment in the image metadata, and asserts that the comment was modified correctly.