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: 41
Members Members: 0
Total Total: 41

Online Now Online Now:

ClearCanvas Community Forums

Help required in for writing Imageviewer in WPF
Last Post 2010-06-09 11:08 AM by stewart. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Saghar
New Member
New Member
Posts:1

--
2010-05-31 05:46 AM  

Hi all, 

I am developing Image viewer in WPF. I am new to DICOM and also to clearcanvas. I went through lot of posts of this forum and in result created a WPF Project which load DICOM images using the followin.

LocalSopDataSource dicomDataSource = new LocalSopDataSource(m_filePath);

                    ImageSop imageSop = new ImageSop(dicomDataSource);

                    IEnumerable images = PresentationImageFactory.Create(imageSop).ToArray();

                    int i = 1;

                    foreach (IPresentationImage presentationImage in images)

                    {

                        int Width = imageSop.Frames[i].Columns;

                        int height = imageSop.Frames[i].Rows;

                        

                        Bitmap bmp = presentationImage.DrawToBitmap(Width, height);

                        m_imageList.Add(Imaging.CreateBitmapSourceFromHBitmap(bmp.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty,

                                                                              BitmapSizeOptions.FromWidthAndHeight(Width, height)));

                        i++;

                    }

 

Now I have to add support for the following things.

  • window leveling
  • zoom
  • pan
  • full screen view
  • rotation
  • flip

Which projects from clearcanvas code are usable for me. Where to start. Is there any sample project available in WPF?

Thanks in advance.

 

Tags: Imageviwer WPF
stewart
Senior Member
Senior Member
Posts:2032

--
2010-06-09 11:08 AM  
Those are all handled internally by the presentation image renderer each time the image draws, and you manipulate those things by changing properties of the presentation image itself. Have a look in the CC.ImageViewer.Tools.Standard project, which is where all of these things are done and you should just be able to take the code and paste it into your viewer. One exception is the "full screen" view, but that is handled by passing the desired size to the PresentationImage.DrawToBitmap method.

Best regards,
Stewart
Real-time support available to Clinical Edition and Team Edition customers
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.