ilantal
 Veteran Member Posts:65
 |
| 2010-07-12 04:08 AM |
|
I'm still working on my first plugin. It is similar to MPR with 4 Image boxes. What I need to do is programically start a cine on the 4th Image box. Clearly there is a cine button on the tool bar. What I would like to do is have my software "press the button" and then have it press the cine start button.
I can't figure out how to do this and would be happy for some suggestions to be pointed in the right direction.
Thanks,
Ilan |
|
|
|
|
stewart
 Senior Member Posts:2032
 |
| 2010-07-21 01:08 PM |
|
Ilan, 2.0SP1 has "auto-cine" functionality, but you can't invoke it in code ... in retrospect, we should have made that possible, but it can be a future enhancement :) If you're ok with modifying the CC code rather than using the SDK, you can add that functionality to the CineTool/component. |
|
| Real-time support available to Clinical Edition and Team Edition customers |
|
|
ilantal
 Veteran Member Posts:65
 |
| 2010-07-22 12:37 AM |
|
Thanks Stewart, This is mostly an exercise to learn the program. The hospital wants to start using CC and they want to ability to add things. So I took a realistic example of the MPR and made my program with the same layout. I need the cine to make a realistic example. I don't want to mess around with core components, but I think I see what you are talking about in ClearCanvas.ImageViewer.Tools.Standard. I guess I need to add something to either CineTool.cs or CineApplicationComponent.cs. That would mean replacing your dll and adding my own. A bit "heavy handed" but it will do until you have an enhancement. Do I follow you correctly in the above, or should I be looking somewhere else? Thanks, Ilan |
|
|
|
|
stewart
 Senior Member Posts:2032
 |
| 2010-07-22 09:39 AM |
|
Hi Ilan, sounds to me like you're on the right track. |
|
| Real-time support available to Clinical Edition and Team Edition customers |
|
|
ilantal
 Veteran Member Posts:65
 |
| 2010-07-27 09:18 AM |
|
Hi Stewart, I never in a million years would have had the guts to change CineTool without your saying that an enhancement might be a good idea. First I tried my hand at NOT changing it. I needed the component which was stored in _shelves. I couldn't get at _shelves, so I took your local variable CineApplicationComponent component and turned it into a private variable _component. Then I added: public CineApplicationComponent Component { get { return _component; } } so that I could get at it. Next was the question as to where to put the calling routine? I took the FinalizeSetup (inside MipViewerComponent.cs) as the last place where I still had control and put it there: // this is the place to put the cine and all the special stuff. public void FinalizeSetup() { IImageBox imageBox3 = PhysicalWorkspace.ImageBoxes[3]; imageBox3.SelectDefaultTile(); ITool[] tools = _mipWorkspace.MipViewer.ToolSet.Tools; CineTool cineTool = null; foreach (ITool tool in tools) { if (tool.ToString().Contains("CineTool")) { cineTool = (CineTool) tool; break; } } if (cineTool != null) { cineTool.Activate(); CineApplicationComponent component = cineTool.Component; if (component != null) component.StartCine(); } } I'm sure it can be done better by someone with more experience, but at least it works. There is a glitch that cineTool.Activate() causes the scroll bars at the side of the image boxes not to appear initially. I don't know why this is so, but it isn't a disaster. If I click on the image the scroll bars appear. Do you see any obvious nonsense that I am doing? Anything that should be done better? Thanks for your help. Ilan |
|
|
|
|
stewart
 Senior Member Posts:2032
 |
| 2010-08-09 12:12 PM |
|
Hi Ilan, it looks pretty good to me. I assume you're using ToString().Contains("CineTool") to avoid referencing Tools.Standard from your plugin? |
|
| Real-time support available to Clinical Edition and Team Edition customers |
|
|
ilantal
 Veteran Member Posts:65
 |
| 2010-08-10 03:57 AM |
|
Hi Stewart,
When I built the plugin, I followed the template and put in all the standard tools, and in addition the special button needed by my plugin. The search through all the tools by tool.ToString().Contains("CineTool") is the method to find the cine tool which I need. Once I have the actual tool, I can apply the start cine method (forgot its exact name).
I'll have to build some other plugins as soon as Clear Canvas starts to be used by the hospital in more extensive use. This plugin gave me some initial experience in how to go about it. I may also work on a parallel project to read Clear Canvas filestore in Fiji, or ImageJ. I already have https://sourceforge.net/apps/mediawiki/bifijiplugins/index.php?title=Main_Page
Ilan
|
|
|
|
|
stewart
 Senior Member Posts:2032
 |
| 2010-08-10 10:14 AM |
|
Hi Ilan, in case you're interested in seeing it, our daily builds should now contain PT/CT Fusion, which we've developed over the last couple of months. Just open a study that has both PT and CT series in it, and the "fused series" will be in the context menu. Cheers, Stewart |
|
| Real-time support available to Clinical Edition and Team Edition customers |
|
|
ilantal
 Veteran Member Posts:65
 |
| 2010-08-10 11:27 AM |
|
Hi Stewart, Yes I would like to see the fusion in the daily build. What else do you have in Nuclear Medicine processing which I am not aware of? They are waiting at Beth Israel for some processing: gastric emptying, lung, renal and I don't want to reinvent the wheel if it is already there. Where do I get the daily build? Thanks, Ilan |
|
|
|
|
stewart
 Senior Member Posts:2032
 |
| 2010-08-26 11:59 PM |
|
Hi Ilan, right now Fusion's the only NM feature we have. The daily builds are usually on the downloads page, but they don't appear to be there. You can, however, download the source code if you want. |
|
| Real-time support available to Clinical Edition and Team Edition customers |
|
|