GithubHelp home page GithubHelp logo

Comments (5)

yxdragon avatar yxdragon commented on September 2, 2024

it is a question of how to organize the model. there are three method

  1. if the function is short. you can define the function in the plugin file.
  2. there are several functions, you can write them in a file, and you can use form ..xxx to import.
  3. 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.

CsatiZoltan avatar CsatiZoltan commented on September 2, 2024

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.

yxdragon avatar yxdragon commented on September 2, 2024

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.

CsatiZoltan avatar CsatiZoltan commented on September 2, 2024

@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.

CsatiZoltan avatar CsatiZoltan commented on September 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.