Friday, September 10, 2010
Google Custom Search

Go to...

Recent Forum Posts

Our Community

Membership Membership:
Latest New User Latest: bunk_C1
New Today New Today: 16
New Yesterday New Yesterday: 20
User Count Overall: 10768

People Online People Online:
Visitors Visitors: 4
Members Members: 1
Total Total: 5

Online Now Online Now:
01: osmosis

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:1454

--
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.

 

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 2010 ClearCanvas Inc.