Creating new module

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating new module

Matt A
Hello

I am trying to create a new module within slicer, so I took a pre-existing module (FourDAnalysis), copied it and changed all the names from FourDImage to LoadFiles so I can play around and edit it.

It seemed to compile correctly and it created a LoadFiles.dir but when I open Slicer it does not show up in the Modules.

Thanks,
Matthew


_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Creating new module

pieper
Administrator
Hi Matt - probably your module libraries are not being recognized -- you
could try starting slicer with the --clear-module-cache and
--verbose-module-discovery flags and see if that gives any enlightenment
(output to stdout and in the error log window).

-Steve

On 03/10/2011 09:56 AM, Matt A wrote:

> Hello
>
> I am trying to create a new module within slicer, so I took a
> pre-existing module (FourDAnalysis), copied it and changed all the names
> from FourDImage to LoadFiles so I can play around and edit it.
>
> It seemed to compile correctly and it created a LoadFiles.dir but when I
> open Slicer it does not show up in the Modules.
>
> Thanks,
> Matthew
>
>
>
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Creating new module

Sharp, Gregory C.
In reply to this post by Matt A
On Thu, 10 Mar 2011 09:56:25 -0500
Matt A <[hidden email]> wrote:

> Hello
>
> I am trying to create a new module within slicer, so I took a pre-existing
> module (FourDAnalysis), copied it and changed all the names from FourDImage
> to LoadFiles so I can play around and edit it.
>
> It seemed to compile correctly and it created a LoadFiles.dir but when I
> open Slicer it does not show up in the Modules.
>
> Thanks,
> Matthew

Hi Matthew,

I guess Steve already answered, but I'll add my 2 cents.
For learning, I suggest to start with an example module instead of
FourDAnalysis.  Look for links to example modules here:

http://www.slicer.org/slicerWiki/index.php/Slicer3:Loadable_Modules:HOWTO

Regarding not finding your module, here is what I do:

(1) Make sure module exists (an executable was actually built)

(2) Make sure the path is included in Slicer's search path
(if you built it outside of the slicer build tree)
  view->application settings->module settings
  click on the + sign below the listbox
  Add path as .../lib/Slicer3/Plugins (for CLP)
  then, restart slicer

(3) Make sure it doesn't have the same name as another module,
don't forget changing XML file

(4) If still a problem, make sure the executable runs

  slicer --launch /path/to/my/module.exe

Greg
--
Greg Sharp, PhD
Department of Radiation Oncology
Massachusetts General Hospital
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Creating new module

Matt A
Hi Greg,
I built the simple HelloWorld module, and it worked, then I built the BRAINSMush module, which is BRAINSFit, it also worked and it had an XML file. The FourDImage module also worked when I compiled it, but did not have a XML file. Do all modules need an XML? Because when I changed the FourDImage to LoadFiles there is no XML to change..

Matthew A.





> Date: Thu, 10 Mar 2011 14:52:03 -0500
> From: [hidden email]
> To: [hidden email]
> CC: [hidden email]
> Subject: Re: [slicer-users] Creating new module
>
> On Thu, 10 Mar 2011 09:56:25 -0500
> Matt A <[hidden email]> wrote:
>
> > Hello
> >
> > I am trying to create a new module within slicer, so I took a pre-existing
> > module (FourDAnalysis), copied it and changed all the names from FourDImage
> > to LoadFiles so I can play around and edit it.
> >
> > It seemed to compile correctly and it created a LoadFiles.dir but when I
> > open Slicer it does not show up in the Modules.
> >
> > Thanks,
> > Matthew
>
> Hi Matthew,
>
> I guess Steve already answered, but I'll add my 2 cents.
> For learning, I suggest to start with an example module instead of
> FourDAnalysis. Look for links to example modules here:
>
> http://www.slicer.org/slicerWiki/index.php/Slicer3:Loadable_Modules:HOWTO
>
> Regarding not finding your module, here is what I do:
>
> (1) Make sure module exists (an executable was actually built)
>
> (2) Make sure the path is included in Slicer's search path
> (if you built it outside of the slicer build tree)
> view->application settings->module settings
> click on the + sign below the listbox
> Add path as .../lib/Slicer3/Plugins (for CLP)
> then, restart slicer
>
> (3) Make sure it doesn't have the same name as another module,
> don't forget changing XML file
>
> (4) If still a problem, make sure the executable runs
>
> slicer --launch /path/to/my/module.exe
>
> Greg
> --
> Greg Sharp, PhD
> Department of Radiation Oncology
> Massachusetts General Hospital
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
>

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Creating new module

Sharp, Gregory C.

Hi Matthew,

There are three kinds of modules: command line modules (CLI),
scripted modules, and loadable modules.  

An XML files is needed to define the GUI for command line modules.  
No XML is used for scripted modules (I think).  The loadable modules
have a kind of smaller XML file, which only contains module name,
module author, etc.

Greg


On Mon, 21 Mar 2011 09:30:48 -0400
Matt A <[hidden email]> wrote:

>
> Hi Greg,
> I built the simple HelloWorld module, and it worked, then I built the
> BRAINSMush module, which is BRAINSFit, it also worked and it had an XML
> file. The FourDImage module also worked when I compiled it, but did not
> have a XML file. Do all modules need an XML? Because when I changed the
> FourDImage to LoadFiles there is no XML to change..
>
>
> Matthew A.
>
>
>
> > Date: Thu, 10 Mar 2011 14:52:03 -0500
> > From: [hidden email]
> > To: [hidden email]
> > CC: [hidden email]
> > Subject: Re: [slicer-users] Creating new module
> >
> > On Thu, 10 Mar 2011 09:56:25 -0500
> > Matt A <[hidden email]> wrote:
> >
> > > Hello
> > >
> > > I am trying to create a new module within slicer, so I took a
> > > pre-existing module (FourDAnalysis), copied it and changed all the
> > > names from FourDImage to LoadFiles so I can play around and edit it.
> > >
> > > It seemed to compile correctly and it created a LoadFiles.dir but when I
> > > open Slicer it does not show up in the Modules.
> > >
> > > Thanks,
> > > Matthew
> >
> > Hi Matthew,
> >
> > I guess Steve already answered, but I'll add my 2 cents.
> > For learning, I suggest to start with an example module instead of
> > FourDAnalysis.  Look for links to example modules here:
> >
> > http://www.slicer.org/slicerWiki/index.php/Slicer3:Loadable_Modules:HOWTO
> >
> > Regarding not finding your module, here is what I do:
> >
> > (1) Make sure module exists (an executable was actually built)
> >
> > (2) Make sure the path is included in Slicer's search path
> > (if you built it outside of the slicer build tree)
> >   view->application settings->module settings
> >   click on the + sign below the listbox
> >   Add path as .../lib/Slicer3/Plugins (for CLP)
> >   then, restart slicer
> >
> > (3) Make sure it doesn't have the same name as another module,
> > don't forget changing XML file
> >
> > (4) If still a problem, make sure the executable runs
> >
> >   slicer --launch /path/to/my/module.exe
> >
> > Greg
> > --
> > Greg Sharp, PhD
> > Department of Radiation Oncology
> > Massachusetts General Hospital
> >
> >
> > The information in this e-mail is intended only for the person to whom it
> > is addressed. If you believe this e-mail was sent to you in error and the
> > e-mail contains patient information, please contact the Partners
> > Compliance HelpLine at http://www.partners.org/complianceline . If the
> > e-mail was sent to you in error but does not contain patient information,
> > please contact the sender and properly dispose of the e-mail.
> >
>      

--
Greg Sharp, PhD
Department of Radiation Oncology
Massachusetts General Hospital
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject