Comments (5)
it is a question of how to organize the model. there are three method
- if the function is short. you can define the function in the plugin file.
- there are several functions, you can write them in a file, and you can use form ..xxx to import.
- if your functions is a system, you can build a package, then use pip install -e to add the path, then you can import it anywhere.
from grainsegmentation.
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/
)?
from grainsegmentation.
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.
from grainsegmentation.
@yxdragon Can I keep the already existing src
directory in place of model
what you wrote? Can you revise the edited directory structure above?
from grainsegmentation.
The current directory structure (commit 9443e60) works well (tested from within ImagePy by Plugins -> Install -> Install Plugins
), so I close this issue.
from grainsegmentation.
Related Issues (15)
- Passing data among plugins
- Implement error checking
- Make sample images available from the ImagePy GUI
- Check for existing image when opening a new one
- Menu to close all open images
- Dropdown menu to select from general options
- GUI for displaying grains
- Document the dependencies in the docstrings
- Provide docstrings for all the functions and classes
- Are empty __init__.py files needed? HOT 5
- Create install file
- ImagePy plugin using an existing class HOT 3
- Avoid assert in source files
- Type checking
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grainsegmentation.