wael_tahon
 Veteran Member Posts:64

 |
| 2009-04-02 12:43 PM |
|
I'm building a CD/DVD Burner Plugin that gets the selected studies from the Study Browser and burn them.
I need to know how can I get the directories where the Selected studies reside on or download the selected study to a temp directory?
Also how can I pass parameteres from the tool to the vapplication component view control?
Any Ideas??
a hint from my plugin:
[ExtensionOf(typeof(StudyBrowserToolExtensionPoint))]
public class BurnerTool : StudyBrowserTool
{
public void Apply()
{
BurnerAppComponent component = new BurnerAppComponent();
_shelf = ApplicationComponent.LaunchAsShelf(
this.Context.DesktopWindow,
component,
"Study Media Burner",
ShelfDisplayHint.DockAutoHide | ShelfDisplayHint.DockRight);
_shelf.Closed += Shelf_Closed;
foreach(StudyItem itm in this.Context.SelectedStudies)
{
/// Here I want to get the dir for each item or download it to a temp dir
}
}
}
|
|
|
|
|
wael_tahon
 Veteran Member Posts:64

 |
| 2009-04-03 06:19 PM |
|
I'm nearly finishing but I had other question how to get the FileStore directory? |
|
|
|
|
sberkowi
 Veteran Member Posts:61

 |
| 2009-04-03 06:52 PM |
|
Wael, I'm not sure if there is a way to do this directly from the StudyItem object. However, you can load the study and then get the FileStore directory from the SOP. There is an example in the AnonymizeStudyTool (Utilities\DicomEditor) which I will copy here: // Create an interface for the StudyLoader private static IStudyLoader LocalStudyLoader { get { if (_localStudyLoader == null) { try { StudyLoaderExtensionPoint xp = new StudyLoaderExtensionPoint(); foreach (IStudyLoader loader in xp.CreateExtensions()) { if (loader.Name == "DICOM_LOCAL") { _localStudyLoader = loader; break; } } } catch (NotSupportedException) { Platform.Log(LogLevel.Info, "Anonymization tool disabled; no local study loader exists."); } if (_localStudyLoader == null) _localStudyLoader = new object(); //there is no loader. } return _localStudyLoader as IStudyLoader; } } ... // From inside your SelectedStudies loop int numberOfSops = LocalStudyLoader.Start(new StudyLoaderArgs(this.Context.SelectedStudy.StudyInstanceUID, null)); if (numberOfSops <= 0) return; for (int i = 0; i < numberOfSops; ++i) { Sop sop = LocalStudyLoader.LoadNextSop(); ILocalSopDataSource localsource = (ILocalSopDataSource)sop.DataSource; // Get path to image from SOP string image_file_path = localsource.Filename.ToString(); } This would find the full path for each image in the selected study. Hopefully this helps, but maybe someone else has a more direct method. Good luck with the plugin, Seth PS You can also do something similar from the clipboard so that you can also add a CD burner plugin for images in the clipboard!
|
|
|
|
|
wael_tahon
 Veteran Member Posts:64

 |
| 2009-04-04 08:19 AM |
|
I've successfully finished the Burn Studies to media StudyBrowser tool, and I'm working on another tool to burn the clipborard items to media too. I'll release it as soon as I finish this tool. I need help getting a free simple dicom viewer that use to be redistributed in the CD, .
|
|
|
|
|
stewart
 Senior Member Posts:2336
 |
| 2009-04-07 02:23 PM |
|
Hi Wael, Creating a simple viewer that can be redistributed on a CD would essentially involve writing a different ImageViewer.Explorer.Dicom (call it ImageViewer.Explorer.DicomDirectory) that just shows you the contents of the dicom directory (and has no server list, etc). You can probably extract a lot of the code from the current dicom explorer - shouldn't be too hard. Ideally, I would like this all to be incorporated into the Dicom Explorer, but I'm uncertain of the best way to do that right now. It's something I've thought about for a while, and I have a few ideas, but I think I'd actually need to try it out. Also, there's a lot of stuff in the Explorer (like the ServerTree stuff) that would likely need to be refactored/rewritten, etc. It's something we intend to do hopefully soon, and I will keep this use case in mind when we do it. Hope this helps, Stewart |
|
| Live and real-time support available for Personal and Team Edition customers |
|
|
wael_tahon
 Veteran Member Posts:64

 |
| 2009-04-07 02:33 PM |
|
Hi Stwart, I've already did that and created a slimmed version of the CC workstation and created a new tool that auto loads the studies from the CD or DVD when CC runs. But here is the problem, if I'm distributing a CD with DICOM images on it I don't expect that that end useres will have .Net 3 on their PC. Is there a way to avoid this? |
|
|
|
|
stewart
 Senior Member Posts:2336
 |
| 2009-04-07 02:56 PM |
|
Hi Wael, the only way I'm aware of is to use a .NET decompiler like Salamander, which is capable of discovering an application's dependencies (e.g. .NET framework) and package it all up together. Salamander, however, is not free. I don't imagine this will help much, but you could get the viewer to run with only .NET 2.0 (which most people have these days) by eliminating the WCF dependencies. Since you're not using the dicom explorer, this should be pretty easy to do. Hope this helps, Stewart |
|
| Live and real-time support available for Personal and Team Edition customers |
|
|
wael_tahon
 Veteran Member Posts:64

 |
| 2009-04-07 03:00 PM |
|
| Will do it thanks, I'll try to get a trial of Salamander and try it. |
|
|
|
|
marspacs
 New Member Posts:2
 |
| 2009-05-02 10:26 AM |
|
Hi Stewart, Could you list the WCF dependencies in the 1.3 code base? Thanks. Martin |
|
|
|
|
stewart
 Senior Member Posts:2336
 |
| 2009-05-04 09:46 AM |
|
Hi Martin, I searched the latest code and found the following dependencies (prefix ClearCanvas.ImageViewer.): - Clipboard - Configuration - DesktopServices - Layout.Basic (will need to remove dependency in latest code, 1.3 does not have this dependency) - Services.Tools - Shreds - StudyFinders.LocalDataStore - StudyFinders.Remote - StudyLoaders.LocalDataStore - StudyLoaders.Streaming - StudyLocator - Tools.Reporting - DicomEditor With the exception of Layout.Basic, you can probably just remove all of the other plugins. Also, the Dicom library itself has dependencies on System.ServiceModel (.NET 3.0) now, so you will likely need to remove the classes in Dicom.ServiceModel. Hope this helps, Stewart |
|
| Live and real-time support available for Personal and Team Edition customers |
|
|
celerity
 Veteran Member Posts:86
 |
| 2009-05-05 04:21 PM |
|
Thanks Stewart. For the Dicom library's dependency on System.ServiceModel (.Net 3.0), is it in 1.3? |
|
|
|
|
venkicse56
 Veteran Member Posts:104
 |
| 2009-05-06 03:38 AM |
|
Hi Wael Tahoun,
Can you give me the code of buring files and folders to DVD.
Thanks,
Venky
|
|
|
|
|
mike65
 New Member Posts:4
 |
| 2009-10-04 01:43 PM |
|
Hi Wael Tahoun,
Can you publish you CD-burn plugin? |
|
|
|
|
vb@medwrite.biz
 New Member Posts:7
 |
| 2009-10-08 06:15 AM |
|
Hi Wael Tahoun,
Can you publish you CD-burn plugin?
How can i get you CD Plug in.
if any one implemented this plug in can send it
Nag
|
|
|
|
|
icefullmoon
 New Member Posts:7
 |
|
zedfix
 Basic Member Posts:17
 |
| 2010-08-29 08:41 PM |
|
hi,
published cd burner plugin 2.0 release version!
http://www.ccaddons.com
We are waiting for your support.
Thanks
regards
|
|
|
|
|
riyaz
 Advanced Member Posts:34
 |
| 2012-05-01 11:23 AM |
|
Hi Wael,
This is riyaz. I was just going through your posts about the Media writer plugin. I am not sure if you have finished it. If not You can contact me at riyaz.wrd@gmail.com.
I have the Plugin ready and am ready to share it with you.
Also if you are a developer i could use some help from you too. currently the cd is written with the selected studies and the viewer is in ta folder called viewer. i need to figure out a wat to do the autorun. i am not a developer you see.
but i have the code. and the plugin is compiled and runs perfectly with CC 2.0 and also with SP1
Contact me if you need it.
|
|
|
|
|