Saturday, February 04, 2012
Google Custom Search

ClearCanvas Highlights

Download our  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: b3lad
New Today New Today: 6
New Yesterday New Yesterday: 26
User Count Overall: 20479

People Online People Online:
Visitors Visitors: 40
Members Members: 0
Total Total: 40

Online Now Online Now:

ClearCanvas Community Forums

ww and wl in clibboard
Last Post 2010-08-15 05:40 PM by santiagoo. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
santiagoo
Posts:12

--
2010-07-23 11:05 AM  

hi, how to get the ww and wl of an image in the clipboard, sorry for my English

stewart
Senior Member
Senior Member
Posts:2032

--
2010-08-09 10:43 AM  

This may not be exactly right ... it's off the top of my head.

IClipboardItem item = theSelectedItem;
IVoiLutProvider provider = item as IVoiLutProvider;
if (provider != null)
{
   double ww, wc;
   IVoiLutLinear lut = provider.VoiLutManager.GetLut() as IVoiLutLinear;
   if (lut != null)
   {
       ww = lut.WindowWidth;
       wc = lut.WindowCenter;
   }
}

Note: the IClipboardItem can also be an IDisplaySet, in which case you would need to iterate over it's PresentationImages.

 

Real-time support available to Clinical Edition and Team Edition customers
santiagoo
Posts:12

--
2010-08-15 05:40 PM  

thanks for the help, I leave the full code...

foreach (IClipboardItem clipboardItem in this.Context.SelectedClipboardItems) 
{ 
   if (clipboardItem.Item is IPresentationImage) 
   { 
     IPresentationImage image = (IPresentationImage)clipboardItem.Item; 
     double ww = 0, wc = 0; 
     IVoiLutProvider provider = ((IVoiLutProvider)image); 
     IVoiLutLinear lut = provider.VoiLutManager.GetLut() as IVoiLutLinear; 

       if (lut != null) 
       { 
       ww = lut.WindowWidth; 
       wc = lut.WindowCenter; 
       } 
  } 
}

 

You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.