zoukankan      html  css  js  c++  java
  • 3DSlicer开发之路——Extensions(五)

    How to manually download an extension package?

    1) Get revision associated with your install or built Slicer (Menu -> Help -> About). The revision is a number preceded by r character, for example: if the complete version string is 4.3.1-2014-09-14 r23677 the revision is 23677 (获取你所安装或自己编译的Slicer的修订版本号)

    2) Open the extension catalog (app store). The default Slicer extension catalog is available at: http://slicer.kitware.com/midas3/slicerappstore

    3) Select operating system, bitness and enter revision in the empty textbox between the bitness selector and the searchbox. If no revision is entered then the No extensions found message will be displayed. (在extension catalog中查找对应的可用extension )

    4) Click Download button of the selected extension to download the extension package.

     

    来自 <https://www.slicer.org/wiki/Documentation/Nightly/Developers/FAQ#How_to_update_an_already_installed_extension.3F>


    How to manually install an extension package?

    假设你现在已经有一个extension package,这个extension package可以是你自己build的,也可以是你在extensions catalog上手动下载的,那么怎样将它install 到你的Slicer上呢?

    Option 1. Use extension manager as described above(利用extension manager的离线install功能

    Option 2. Use Slicer extension called "DeveloperToolsForExtensions"(利用现有的extension )

    Option 3. Fully manual installation:(全手工)

    • Extract the archive (zip or tar.gz) in a folder. You should then have a folder like:

                  /path/to/<slicer_revision>-<os>-<bitness>-<extension_name>-<extension_scm><extension_revision>-YYYY-MM-DD

                

                  containing one or more of the following folders (for more information on folder structure, click here):

                            lib/Slicer-X.Y/cli-modules
                            lib/Slicer-X.Y/qt-loadable-modules
                            lib/Slicer-X.Y/qt-scripted-modules

    • In the Module settings (Menu -> Edit -> Settings), add all existing paths ending with:

                            lib/Slicer-X.Y/cli-modules
                            lib/Slicer-X.Y/qt-loadable-modules
                            lib/Slicer-X.Y/qt-scripted-modules

    Note: additional module paths can be added temporarily by starting Slicer with the option --additional-module-paths.(命令行方式临时install)

    Start Slicer with a command something like:

    ./Slicer.exe --additional-module-paths ./CustomSlicerGenerator/CustomSlicerGenerator

    来自 <https://www.slicer.org/wiki/Documentation/Nightly/Developers/FAQ#Installing_an_extension_without_network_connection>


    DeveloperToolsForExtensions(上面说的那个Extension)

    这本身就是个Extension,当然它被开发出来是为了更好的方便Extensions安装

    This extension offers different tools to help developers when they create and maintain Slicer extension.

    This tool extension exposes slicer features to help developers to test their own extensions

    来自 <https://www.slicer.org/wiki/Documentation/Nightly/Extensions/DeveloperToolsForExtensions>

    这个Extensions包含两个Modules

    This module retrieves cumulated download statistics for a Slicer extension from the Slicer app stor(统计下载信息)

    This module currently presents two options to the user:

    -Installing an extension from an archive (*.tar.gz or *.zip) that is on the user's computer. This is useful if one wants to test that their extension has packaged correctly without uploading their extension onto the Midas server.(对于一些开发者,想要测试自己的已经被正确packaged但还没有上传到Midas server的extension,可以使用此功能) Additionally, this can also be used by labs to distribute their extensions on their own website (uploading the extension archive directly on their website) and users can install these extensions using this module. It is also possible to install an extension package directly from the extension manager (from the toolbar).

    -Load a module that has not been loaded at the start-up of Slicer, while Slicer is running, without having to restart Slicer (limited to scripted python modules).

    Loading an extension archive

     

    来自 <https://www.slicer.org/wiki/Documentation/Nightly/Modules/DeveloperToolsForExtensions>


    How to create a custom Slicer version with selected extensions pre-installed?(这边就已经开始涉及到定制Slicer的内容了,后面还会详细讲)

    1) Download and install Slicer

    2) Install all necessary extensions manually (as described above) in <slicer_install_dir>/lib/Slicer-X.Y/...

    3) If all the files in <slicer_install_dir> are copied to any other folder/computer/USB drive/portable storage device then Slicer can be launched by running the Slicer executable in the main directory. No installation or administrative access rights are necessary. Slicer can even be launched directly from a USB drive, without copying files to the computer.(Slicer目录可以直接进行移植,就可以在其它设备上运行不需要再重新installation,也不需要管理员权限。这说明Slicer本身是一个比较独立的软件)

    这一部分尝试之后的经验,上面所讲首先install Slicer,然后这边的手动装载extension的方式与上面所讲的手动方法有一点不同,上面所讲的方法是一种不改变Slicer本身文件结构的方式,利用Slicer本身的plugin特点直接添加路径即可。而这边因为是要定制Slicer,所以第二步是将extension解压后对应文件夹内的各种.dll,.lib文件复制到Slicer的<slicer_install_dir>/lib/Slicer-X.Y/...目录下对应文件夹内。这样我们的extension就变成了Slicer的一部分,再打开Slicer时,我们的extension就像Slicer里面的buildin module一样会被自动装载进去。

    来自 <https://www.slicer.org/wiki/Documentation/Nightly/Developers/FAQ#What_is_an_extension_.3F>

  • 相关阅读:
    Android Fragment 解析和使用
    Android数据库表的创建和数据升级操作
    Android通过xml文件配置数据库
    Android上的事件流操作数据库
    Android SQLite的ORM接口实现(一)---findAll和find的实现
    Android注解编程的第一步---模仿ButterKnife的ViewBinder机制
    Android下拉刷新底部操作栏的隐藏问题
    Android开发总结
    一个ListView布局的不断演化
    SpringBoot入门-概念(一)
  • 原文地址:https://www.cnblogs.com/oneDongHua/p/14264081.html
Copyright © 2011-2022 走看看