Thursday, May 17, 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: JBauza
New Today New Today: 19
New Yesterday New Yesterday: 33
User Count Overall: 22559

People Online People Online:
Visitors Visitors: 10
Members Members: 2
Total Total: 12

Online Now Online Now:
01: radialheadfx
02: JBauza

ClearCanvas Community Forums

Cannot find the class AnnotationLayoutStore
Last Post 2012-04-19 09:03 AM by stewart. 35 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Page 1 of 212 > >>
Author Messages
John-Ed
Advanced Member
Advanced Member
Posts:41

--
2011-02-03 04:39 AM  

I want to use the AnnotationLayoutStoreSettings and AnnotationLayoutStore methods. I need to access AnnotationLayoutStore class. How can I access this class. Is there any reference that I need to add in my project. I have included the following classes in my solution:-

ClearCanvas.Common;
ClearCanvas.Desktop;
ClearCanvas.Desktop.Configuration;
ClearCanvas.Dicom;
ClearCanvas.Dicom.Codec.Jpeg;
ClearCanvas.ImageViewer;
NUnit.Framework;
ClearCanvas.ImageViewer.Imaging;
ClearCanvas.ImageViewer.Graphics;
ClearCanvas.ImageViewer.StudyManagement;
ClearCanvas.ImageViewer.Annotations;
ClearCanvas.ImageViewer.Annotations.Dicom;
ClearCanvas.Dicom.Codec;
ClearCanvas.Dicom.IO;
System.Drawing;
System.Drawing.Imaging;
System.Configuration;
System.Xml;
System.Reflection;
System.Text;



postb99
Senior Member
Senior Member
Posts:162

--
2011-02-03 04:47 AM  
Just change the class visibility from "internal" to "public" on class declaration line. this may imply cascading visibility changes for it to compile.

AnnotationLayoutStore sits in \ImageViewer\Annotations as you saw.

"internal" means that you can instantiate/access class in its own assembly only.


John-Ed
Advanced Member
Advanced Member
Posts:41

--
2011-02-03 05:46 AM  

I am including these classes in my project as name spaces using the 'using' command. All my declarations appear as follow in my LoadFile.aspx.cs page:

using ClearCanvas.Common;
using ClearCanvas.Desktop;
using ClearCanvas.Desktop.Configuration;
using ClearCanvas.Dicom;
using ClearCanvas.Dicom.Codec.Jpeg;
using ClearCanvas.ImageViewer;
using NUnit.Framework;
using ClearCanvas.ImageViewer.Imaging;
using ClearCanvas.ImageViewer.Graphics;
using ClearCanvas.ImageViewer.StudyManagement;
using ClearCanvas.ImageViewer.Annotations;
using ClearCanvas.ImageViewer.Annotations.Dicom;
using ClearCanvas.Dicom.Codec;
using ClearCanvas.Dicom.IO;
using System.Drawing;
using System.Drawing.Imaging;
using System.Configuration;
using System.Xml;
using System.Reflection;
using System.Text;

How can I change these declarations to make them public. Or do I need to make the separate classes in the code and declare them as public and then access the AnnotationLayoutStoreSettings and AnnotationLayoutStore methods. Any suggestions will be helpful. Thanks.



postb99
Senior Member
Senior Member
Posts:162

--
2011-02-03 06:14 AM  
You told previously that you changed some code in Clearcanvas classes, didn't you ? if so, juste open the file corresponding to AnnotationLayoutStore (in VS), and when edited and recompiled, update the dlls where you put them for your project to reference them with the recompiled ones (in ImageViewer/Debug/bin).


John-Ed
Advanced Member
Advanced Member
Posts:41

--
2011-02-03 06:54 AM  

I didn't make a change to the code in clear canvas class files. I only made some changes to code snippet you provided here (http://www.clearcanvas.ca/dnn/Community/Forums/tabid/69/aff/10/aft/15107/afv/topic/afpgj/1/Default.aspx#19529) in response to my configuration message appearing on the jpeg query. I deleted the lock(_syncLock) line and declared _document as new Xml document. Now currently there are no errors in the code. Except that I need to access the methods: AnnotationLayoutStoreSettings and AnnotationLayoutStore to see if the code that works for you in removing the configuration message from the images also works for me. If there is something that you need to tell, like if the code was specific to your project or if it isn't applicable, then let me know.  I will try a different approach. 

According to your code the exception that is generated by the clear canvas library is handled using the try catch statements. From what I understand is that If the exact exception that displays the configuration message on the image, can be traced from where it is appearing then it can be stopped from occuring and being displayed on the images. If that does the trick in removing the message from the image, then I will give it a try.



postb99
Senior Member
Senior Member
Posts:162

--
2011-02-03 07:53 AM  
OK so I misunderstood. The code snippet was ClearCanvas code. I edited their code and recompiled dlls. You couldn't do anything with my code snipped as is if not modifying CC code...

It's best not to catch and swallow the exceptions as you asked in your last sentences, but change the only few things that prevent toolkit to run smoothly in asp.net environment (don't throw any unhandled exception. ClearCanvas often throws then catch specific exceptions).

If you compare 2.0SP1 and trunk source code, you will see that many "internal" classes/functions has been made "public".

So take a deep breath and happy recompiling of the SDK...


John-Ed
Advanced Member
Advanced Member
Posts:41

--
2011-02-03 08:45 AM  
Thanks a lot Barbara for providing the valuable information. I just need to find out about recompiling the SDK. Since you have mentioned about the difference of source code on trunk and 2.0SP1. Should I use the source code found on the trunk? I am currently using the Clear Canvas SDK 2.0 libraries. Please can you tell me which tool can I use to edit the code in dlls and the appropriate tutorials on making the right modifications. Lastly, can you please tell me which threads you have looked for editing and compiling the dlls. It will be really helpful. Thanks.


postb99
Senior Member
Senior Member
Posts:162

--
2011-02-03 09:00 AM  
Glad I could make things clearer to you.

I guess you can go on with trunk but don't be afraid if there are problems sometimes...

You have to use Visual Studio (2008 or 2010, but using 2008 is easier). How do you master it ?

I have some notes written in French which are more explicit about technical changes but no time to translate yet.

Here are some posts of interest :

http://www.clearcanvas.ca/dnn/Community/Forums/tabid/69/aff/10/aft/14750/afv/topic/Default.aspx

http://www.clearcanvas.ca/dnn/tabid/69/afv/topic/aff/8/aft/14658/Default.aspx




stewart
Senior Member
Senior Member
Posts:2128

--
2011-02-03 10:22 AM  
See what I mean? I just posted in the other thread about recompiling, and Barbara already got to it :)


Real-time support available to Clinical Edition and Team Edition customers
John-Ed
Advanced Member
Advanced Member
Posts:41

--
2011-02-07 03:41 AM  

Hello everyone, I am using this thread as a follow up for the dicom image configuration message, found here: (http://www.clearcanvas.ca/dnn/Community/Forums/tabid/69/aff/10/aft/15107/afv/topic/Default.aspx)

I know I have posted on multiple locations, so sorry for any inconveniences. I will follow this thread from now on. Thanks for all your help and support.

Regards,

John



John-Ed
Advanced Member
Advanced Member
Posts:41

--
2011-02-07 03:45 AM  

Now some discussion on the configuration exception. Please can any one guide me that which tool can I use to edit and assemble the libraries. I am using Redgate's ,NET Reflector. If you know of a good editor then please share your post here. Thanks.



postb99
Senior Member
Senior Member
Posts:162

--
2011-02-07 03:57 AM  
Hi John,

You have to use Visual Studio to edit source code opening ImageViewer.sln "solution" (= set of projects), then recompile.

Isn't it clear from previous posts and answers ? :(

Are you a programmer ? If not, this will be harder but is still doable with step by step guidance.


postb99
Senior Member
Senior Member
Posts:162

--
2011-02-07 04:59 AM  
Just a quick note not related to this thread specifically : if editing a post, the forum may not send an update e-mail to people subscribed to the thread/forum, or at least it seems so.


John-Ed
Advanced Member
Advanced Member
Posts:41

--
2011-02-07 06:12 AM  

Sorry for the delay. I am trying to open imageviewer.sln but the project could not be loaded correctly. I am using Visual Studio 2010 so the project needs to be converted from the older version. It gives the following message:-

One or more projects were not loaded correctly. Please see the output window for details.


Then it shows the conversion log. I have attached the conversion log with this message.

There is an error sign on the following dlls:-

ClearCanvas.common.dll
ClearCanvas.desktop.dll
ClearCanvas.Imageviewer.dll
ClearCanvas.dicom.dll

I hope you can provide some help on this.

Also let me know which .cs files do I need to edit to compile the dlls. Any instructions will be helpful.

Thanks.


Attachment: UpgradeLog6.XML

John-Ed
Advanced Member
Advanced Member
Posts:41

--
2011-02-07 09:36 AM  
I have changed the target .NET framework of all the projects in imageviewer.sln to 3.5. The referenced dlls in all the projects were missing. I included the dlls from SDK 2.0 in all the projects. After building the project VS is showing errors. Can the new SDK 2.0 dlls work with the image viewer that supported old .NET framework 2.0 dlls. There are some errors showing that some of the methods don't take the given number of arguments. Maybe I need to work with the older libraries. Can any one tell me where can I find the missing dlls in image viewer. They are were missing when I downloaded the project from trunk. Thanks.


postb99
Senior Member
Senior Member
Posts:162

--
2011-02-07 09:44 AM  
I did the same as you, change target framework to 3.5.

Which references are causing troubles for you to compile ? (dll name, project in the solution).

There are a few differences between target framework 2.0 and 3.5. But basically it will work and not throw warnings as you have...


John-Ed
Advanced Member
Advanced Member
Posts:41

--
2011-02-10 07:36 AM  

It was a duplicate post, so I deleted this one.



John-Ed
Advanced Member
Advanced Member
Posts:41

--
2011-02-10 07:36 AM  

I have attached my error log with this message. Please have a look at it and tell me what I can do to remove all the errors. Most of the errors are of namespaces. Is this a reference issue? Errors in name spaces can occur if I am missing a reference. Please tell me which references do I need to add to resolve the errors in my log. Thanks.

Edtt: After reviewing the project I have found out that several projects are not loaded. Some of those are:-

ClearCanvas.Server.ShredHost
ClearCanvas.Server.ShredHoseService
ClearCanvas.Utilities.DicomEditor
ClearCanvas.Utilities.DicomEditor.View.Winforms
ClearCanvas.Utilities.Manifest
ClearCanvas.ImageViewer
ClearCanvas.ImageViewer.DesktopServices
ClearCanvas.ImageViewer.Explorer.Local
ClearCanvas.ImageViewer.Layout.Basic
ClearCanvas.ImageViewer.StudyFinders.LocalDataStore
ClearCanvas.ImageViewer.StudyFinders.Remote
ClearCanvas.ImageViewer.StudyLoaders.LocalDataStore
ClearCanvas.ImageViewer.Tools.Measurement
ClearCanvas.ImageViewer.View.Winforms
ClearCanvas.ImageViewer.Volume.Mpr

After I click on the name of the project, the visual studio says: The project file cannot be loaded.


Attachment: error_log.txt

John-Ed
Advanced Member
Advanced Member
Posts:41

--
2011-02-14 05:32 AM  

Okay I have tried compiling the 'ClearCanvas.ImageViewer.csproj' it gives the following error:-

The imported project "C:\Clear Canvas Image Viewer\Common\ClearCanvas.Strings.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

I have tried to find this file from the trunk, but it is not there. Any suggestions are welcome.



postb99
Senior Member
Senior Member
Posts:162

--
2011-02-16 09:27 AM  
Just a quick note for now : don't try to compare trunk and 2.0 SP1 code, this will only confuse you more.

I don't forget you but don't have free time for now, sorry.


You are not authorized to post a reply.
Page 1 of 212 > >>


Active Forums 4.1
Copyright 2012 ClearCanvas Inc.