Closed CsatiZoltan closed 4 years ago
it is a question of how to organize the model. there are three method
I will choose method 2. This will keep the code separated from ImagePy and I think this project won't grow large enough to bother with option 3. Can you comment on the structuring of the ImagePy part of the project (i.e. the organization within src/GUI/
)?
in fact, there is nothing related to GUI. ImagePy separate gui as clean as possible (Tool, Table, Filter). except custom widget.
but plugin project must be in specific structure ,menus, tools, widgets must be placed in the root. For the ImagePy 's plugin manager could download it and extract it in imagepy->plugins folder. (not imagepy->menus->plugins). Then the engine would parse this folder like others.
So the structure should be:
README.md LICENSE .gitignore model: your algorithsm data: demo and test data menus (optional): Filter, Simple, Table, Markdown, Workflow, Macros are all in menus. |-- folder : If there is no folder in the menus, it would be created. (top menu) if it exists, the folder determin where it is places (suche as name the folder 'plugins', it would be a plugins's submenu) |-- folder or file ... tools (optional): Tool widgets (optional): Widget
seaice this is another demo.
@yxdragon Can I keep the already existing src
directory in place of model
what you wrote? Can you revise the edited directory structure above?
The current directory structure (commit 9443e60) works well (tested from within ImagePy by Plugins -> Install -> Install Plugins
), so I close this issue.
My project will consist of multiple functions. I read in the demo document how to organize them. What I want is the following:
I have the following directory structure in mind.
The
grain_segmentation.py
file is a module containing a bunch of functions, responsible for the main steps of the segmentation process (reading image, filtering, initial segmentation, skeletonization, final segmentation, etc.). The functions in this module should not know anything about the GUI (ImagePy) and can be used in any Python project once the basic dependencies (numpy, scipy, scikit-image) are fulfilled.To help experimenting with the parameters of the image processing functions residing in
grain_segmentation.py
and to perform some tasks manually, ImagePy is used -- its code being in theGUI/
directory.