On Mar 11, 8:42 am, stefan <[email protected]> wrote:
> I am trying to understand how to write (and maybe initially use)
> external plugins but the documentation does not make too much sense to
> me. Particularly, how do I use a plugin? E.g. there is an example
> io_dicom.py which defines load_dicom. How can this be used?
> I sort of understand the GUI plugins such as onlinehelp.py from
> reading the source code but for instance how is the simpler
> io_dicom.py integrated into spyder? I can make it work by running it
> from the console and then using load_dicom on some file I choose
> (again from the commandline). What am I missing with respect to
> integrating load_dicom without the explicit execution of io_dicom.py
> on the console?

For more details on Spyder's third-party plugins, please see the
dedicated wiki page:
http://code.google.com/p/spyderlib/wiki/SpyderPlugins

There are two kinds of 3rd-party plugin: the standard GUI-based
plugins which work exactly as the builtin plugins (see the pylint
plugin example) and the I/O plugins. The module io_dicom.py is an
example of I/O plugin, i.e. an extension of file import/export
capabilities of the Variable Explorer. So, to see this plugin in
action, you just have to try to import a file (this requires
`pydicom`) and you will see that there is an extra line for DICOM
images.

> On a related but much removed issue: I would like to have a plugin
> load images (e.g. DICOM or other medical image formats) directly from
> the File Explorer into a user defined namespace, Could someone point
> me into the right direction for getting started? I.e. are there
> plugins that respond to user selected files in the file explorer
> similar to the editor? Maybe something like a drag and drop target for
> my medical images?

Drag and drop from the file explorer plugin should behave exactly as
it were done from an external file explorer window: that is standard
MIME data. So if you want to simply drag n'drop files from the file
explorer plugin, you just have to implement the drag n'drop support
for your widget -- this topic is very well covered by Qt's
documentation.

-Pierre

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/spyderlib?hl=en.

Reply via email to