Thursday, February 09, 2012
Google Custom Search

ClearCanvas Highlights

Download our Open Source software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: VMCCNY
New Today New Today: 18
New Yesterday New Yesterday: 26
User Count Overall: 20581

People Online People Online:
Visitors Visitors: 10
Members Members: 0
Total Total: 10

Online Now Online Now:

ClearCanvas Community Forums

SDK 1.5: "No plugins could be found" with DICOM toolkit?
Last Post 2009-11-12 03:39 PM by nickcharb. 6 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Resolved
nickcharb
New Member
New Member
Posts:8

--
2009-11-05 01:15 PM  

Hello,

I just moved from SDK 1.3 to 1.5 and notice some of the DICOM toolkit functions (MWL SCU, CStore SCU, etc) now fail with a message saying "No plugins could be found."

 

Is there a requirement to define plugins now?  I'd like to keep using the toolkit for lower-level DICOM stuff and not have to worry about plugins, etc.  

Here is the code which returns this error:

            ModalityWorklistScu scu = new ModalityWorklistScu();

            ModalityWorklistIod iod = new ModalityWorklistIod();

            iod.SetCommonTags();

            iod.RequestedProcedureModule.StudyDate = DateTime.Today;

            IList results = scu.GetWorkList("myscu", "myscp", "mwlhost", 104, iod);

Exception on the GetWorkList() line.  "No plugins could be found."

 

Thanks,

Nick

 

jasper.yeh
Senior Member
Senior Member
Posts:521
Avatar

--
2009-11-10 09:38 AM  
Hi Nick,

There is still some internal discussion about whether or not having no plugins is an exceptional condition. At any rate, you should be able to use the following snippet of code when you start your app to silence the exception.


ClearCanvas.Common.Platform.SetExtensionFactory(new NullExtensionFactory());


Hope this helps,
// Jasper
nickcharb
New Member
New Member
Posts:8

--
2009-11-10 11:33 AM  
Thanks for the information, Jasper.

I'm having some trouble adding that code as it appears to be valid only if UNIT_TESTS is defined within the compiled ClearCanvas DLLs. Here's the fragment I found in Platform.cs
#if UNIT_TESTS

///
/// Sets the extension factory that is used to instantiate extensions.
///

///
/// This purpose of this method is to facilitate unit testing by allowing the creation of extensions
/// to be controlled by the testing code.
///

///
public static void SetExtensionFactory(IExtensionFactory factory)
{
ExtensionPoint.SetExtensionFactory(factory);
}
#endif

I'd like to continue using the lower level DICOM toolkit for other projects specific for internal testing and troubleshooting (e.g., simple console apps, etc). Is this still possible?

Thanks,
Nick
jasper.yeh
Senior Member
Senior Member
Posts:521
Avatar

--
2009-11-10 12:03 PM  
Hi Nick,

Ah, hmm. (As you've probably guessed, I've only used this method in the context of writing unit tests). Let me consider the problem and get back to you...
// Jasper
nickcharb
New Member
New Member
Posts:8

--
2009-11-10 12:05 PM  
That would be great! Thanks for your help, Jasper!
jasper.yeh
Senior Member
Senior Member
Posts:521
Avatar

--
2009-11-10 12:25 PM  
Hey Nick,

The behaviour of the plugin loader was changed in the source code trunk to no longer throw an exception as of revision 11179, so it should be fixed in the upcoming 2.0 release (for reference, the ticket is #5164).

In the meantime, if you wish to use the SDK with 2.0 binaries, I believe you can install the 2.0 alpha Workstation and replace your SDK binaries (the ones in the SDK's installation directory) with the 2.0 alpha ones. Alternatively, if you wish to stick with the 1.5 SP1 binaries, you might try tricking the plugin loader by creating a fake plugin. Just build a .NET assembly containing the following line in its AssemblyInfo (it'll have to reference ClearCanvas.Common.dll). Then drop this dll into the same folder as the other libraries. (Instead of creating a separate assembly, you could also drop this line into an existing assembly - all it does is tell the plugin manager to try and look for extensions in the assembly of which there won't be any)

[assembly: ClearCanvas.Common.Plugin]
// Jasper
nickcharb
New Member
New Member
Posts:8

--
2009-11-12 03:39 PM  
Thanks Jasper!

I followed your advice and added an empty plugin and it worked like a charm.

Nick
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.