<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>Hi Michael:<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Thank you very much for the example code!</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>I'm trying to write a module, launchable by the user, which will run a python script on the server to do some processing and then start a HTML5/canvas application, also on the server.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>We are thinking that the user will login, navigate to their DICOM files, then click on an "Annotate" action item (perhaps right below the "View" link) on the right side which will launch our module:</div><div><br></div><div><img height="204" width="212" apple-width="yes" apple-height="yes" id="6f47bbab-d1f9-4fb3-8a1a-d63510eefa1d" src="cid:9DDA78CB-CCBB-4A40-922E-B2A63065D013@sdsc.edu"></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>This is my first Midas module although I am familiar with PHP, have worked with CakePHP and Drupal.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Your pointers/help are greatly appreciated.</div><div><br></div><div>thanks,</div><div>Mona</div><div><br></div><div><br></div><div>On Jun 20, 2012, at 3:55 PM, Michael Grauer wrote:</div><div><div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Mona,<div><br></div><div>It is probably best to create a module by starting a bit simpler than the Helloworld example, as that includes some models which can be confusing, and also the models are called Hello, so you end up with lines like</div>
<div><br></div><div>Helloworld_HelloModelBase extends Helloworld_AppModel</div><div><br></div><div>which is even more confusing to me and would probably be troublesome for global search and replaces. </div><div><br></div>
<div>I have whipped up a very simple example module that I'm attaching here. If you gunzip and untar it in your modules directory, you can add it to your Midas instance. The module doesn't do much, but you can turn it on from the Administrative menu and then go to</div>
<div><br></div><div><a href="http://localhost/midas3/example/index">http://localhost/midas3/example/index</a></div><div><br></div><div>(assuming you are working on your localhost) and see a message.</div><div><br></div><div>
This way you have a bit clearer of a starting point for your own module. If you want to add in a web api, you can see the dicomextractor module as an example, which is a module that doesn't include any models. If you want to see some example models, try looking at the communityagreement module, which has a simple model.</div>
<div><br></div><div><br></div><div>I hope this gets you on your way.</div><div><br></div><div>-Mike</div></blockquote></div><br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>*********************************************</div><div> Mona Wong</div><div> Web & iPad Application Developer</div><div> San Diego Supercomputer Center</div><div><br></div><div> Believing we are in control is an</div><div> illusion that brings suffering.</div><div><div><div>*********************************************</div><div><span class="Apple-style-span" style="font-size: medium; "><br></span></div></div></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></div></body></html>