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: 4
Total Total: 14

Online Now Online Now:
01: okdicom
02: ednfran
03: nyeisin
04: sfrank

ClearCanvas Community Forums

Simple Dicom Viewer
Last Post 2010-08-27 12:07 AM by stewart. 5 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Michael2000
Basic Member
Basic Member
Posts:14

--
2010-08-02 10:59 PM  

hi friends,

i m assigned at small project concern with dicom.now,i can get image from dicom by converting IPresentationImage to bitmap and show those image at panel.For me,it's difficult to implement image viewer for separately use in my application.My question is :

(1)Is there any problem in showing like this?

my program is simple and i also get it from this forum.Please answer me and advise me.

Regards

Michael

stewart
Senior Member
Senior Member
Posts:2032

--
2010-08-09 02:44 PM  
Michael, there's nothing wrong with using IPresentationImage.DrawToBitmap to render an image and show it in a panel: that works fine. However, as I've mentioned to others before, if your goal is to embed the entire ImageViewer in your application, it will likely be difficult because it wasn't designed with that in mind.
Real-time support available to Clinical Edition and Team Edition customers
Michael2000
Basic Member
Basic Member
Posts:14

--
2010-08-10 10:12 PM  
thanks,Stewart
now,i want to show pictures like cine function.i found there has about 2000 images in one dicom file.How i do?Please share me if there has any example.

Regards
Michael
Michael2000
Basic Member
Basic Member
Posts:14

--
2010-08-11 03:41 AM  
Hi friends,
now i face one problem that is some dicom files are not working properly with my
program,but,it is ok on imageviewer workstation.I used IPresentationImage.DrawToBitmap
function to get bitmap file.I got black plain image with "Unsupported transfer syntax" error text.
My codes are below.

LocalSopDataSource dataSource = new LocalSopDataSource(strImgName);
ImageSop imageSop = new ImageSop(dataSource);
MoveSop = new ImageSop(dataSource);
PresentationImage theOne = null;

theOne = PresentationImageFactory.Create(MoveSop.Frames[FrameNo]);
imageSop.Dispose();
Bitmap orgbmp = null;
orgbmp = theOne.DrawToBitmap(550, 550);

PictureBox.Image = orgbmp;
PictureBox.Refresh();

So,please help me how to solve this problem?

Regards
Michael

Michael2000
Basic Member
Basic Member
Posts:14

--
2010-08-16 05:23 AM  

i used  vs2008 c#.net on 32 bit version and all dlls are already referenced in my application.ClearCanvas.Common;ClearCanvas.Desktop;ClearCanvas.Dicom;
ClearCanvas.Dicom.Codec.Jpeg;ClearCanvas.Dicom.Codec.Rle;ClearCanvas.ImageViewer;
ClearCanvas.ImageViewer.Rendering;ClearCanvas.ImageViewer.Imaging;
ClearCanvas.ImageViewer.StudyManagement;log4net;

 

And also they are found in Debug folder,in my log file i found error like this :

 

 

2010-08-16 17:08:27,921 [9] ERROR - Exception thrown
   at ClearCanvas.Common.PluginFinder.FindPlugin(String path)
   at ClearCanvas.Common.PluginFinder.FindPlugin(String path)
   at ClearCanvas.Common.Utilities.FileProcessor.<>c__DisplayClass1.b__0(String filePath, Boolean& cancel)
   at ClearCanvas.Common.Utilities.FileProcessor.ProcessDirectory(String path, String searchPattern, ProcessFileCancellable proc, Boolean recursive, Boolean& cancel)
   at ClearCanvas.Common.Utilities.FileProcessor.Process(String path, String searchPattern, ProcessFileCancellable proc, Boolean recursive)
   at ClearCanvas.Common.Utilities.FileProcessor.Process(String path, String searchPattern, ProcessFile proc, Boolean recursive)
   at ClearCanvas.Common.PluginManager.FindPlugins(String path)
2010-08-16 17:08:28,002 [9] WARN  - Exception thrown ClearCanvas.Common.PluginException: No plugins could be found.
   at ClearCanvas.Common.PluginManager.FindPlugins(String path)
   at ClearCanvas.Common.PluginManager.LoadPlugins()
   at ClearCanvas.Common.PluginManager.EnsurePluginsLoaded()
   at ClearCanvas.Common.PluginManager.get_Extensions()
   at ClearCanvas.Common.DefaultExtensionFactory.BuildExtensionMapOnce()
   at ClearCanvas.Common.DefaultExtensionFactory.ListExtensionsHelper(ExtensionPoint extensionPoint, ExtensionFilter filter)
   at ClearCanvas.Common.DefaultExtensionFactory.CreateExtensions(ExtensionPoint extensionPoint, ExtensionFilter filter, Boolean justOne)
   at ClearCanvas.Common.ExtensionPoint.CreateExtensionsHelper(ExtensionFilter filter, Boolean justOne)
   at ClearCanvas.Common.ExtensionPoint.CreateExtension()
   at ClearCanvas.ImageViewer.BasicPresentationImage.get_ImageRenderer()
   at ClearCanvas.Dicom.Codec.DicomCodecRegistry..cctor()
2010-08-16 17:08:28,907 [9] ERROR - Exception thrown ClearCanvas.Dicom.Codec.DicomCodecException: Unsupported transfer syntax
   at ClearCanvas.ImageViewer.StudyManagement.DicomMessageSopDataSource.DicomMessageSopFrameData.CreateNormalizedPixelData()
   at ClearCanvas.ImageViewer.StudyManagement.StandardSopDataSource.StandardSopFrameData.GetNormalizedPixelData()
   at ClearCanvas.ImageViewer.StudyManagement.Frame.GetNormalizedPixelData()
   at ClearCanvas.ImageViewer.Imaging.PixelData.GetPixelData()
   at ClearCanvas.ImageViewer.Imaging.PixelData.get_Raw()
   at ClearCanvas.ImageViewer.Rendering.ImageRenderer.Render(ImageGraphic imageGraphic, IntPtr pDstPixelData, Int32 dstWidth, Int32 dstBytesPerPixel, Rectangle clientRectangle)
   at ClearCanvas.ImageViewer.Rendering.GdiRenderer.DrawImageGraphic(ImageGraphic imageGraphic)
   at ClearCanvas.ImageViewer.Rendering.RendererBase.DrawSceneGraph(CompositeGraphic sceneGraph)
   at ClearCanvas.ImageViewer.Rendering.RendererBase.DrawSceneGraph(CompositeGraphic sceneGraph)
   at ClearCanvas.ImageViewer.Rendering.RendererBase.Render()
   at ClearCanvas.ImageViewer.Rendering.GdiRenderer.Render()
   at ClearCanvas.ImageViewer.Rendering.RendererBase.Draw(DrawArgs drawArgs)


Some images are shown as plain of black.Please help me.I really need it.

 

Regards

Michael

 

 

stewart
Senior Member
Senior Member
Posts:2032

--
2010-08-27 12:07 AM  
Michael, it is likely that CC does not have a codec for the Transfer Syntax of the image you are trying to draw. If you dump the file in the regular viewer/workstation, what is the Transfer Syntax UID?
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.