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: 9
Members Members: 5
Total Total: 14

Online Now Online Now:
01: ednfran
02: nyeisin
03: sfrank
04: munir24hr
05: demidias

ClearCanvas Community Forums

Need help for printing
Last Post 2010-03-10 08:31 AM by maensari. 7 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
maensari
Basic Member
Basic Member
Posts:16

--
2010-02-15 12:12 AM  

Hi, i am in trouble and i need help. i want to print dicom image to Film Printer. i have fuji drypix 4000 printer

i am using BasicGrayscalePrintScu Class to print out but i always getting this error message
The type initializer for 'ClearCanvas.Common.Platform' threw an exception.

at the line
Connect(clientAETitle, remoteAE, remoteHost, remotePort);

inside the function of
Print (....

am giving right perameter values but i don't understand that what is the reason of the error.

i would like to show the parameters what am passing into print function that is

("my computer name", "printer AE title", "printer IP address", 104, "Complete dcm file path");

and here is my complete code


        private void SendPrintRequest1(string clientAETitle, string remoteAE, string remoteHost ,int remotePort, string file1)
        {
            BasicGrayscalePrintScu printScu = new BasicGrayscalePrintScu();
            BasicFilmSessionModuleIod basicFilmSessionModuleIod = new BasicFilmSessionModuleIod();
            basicFilmSessionModuleIod.PrintPriority = PrintPriority.High;
            basicFilmSessionModuleIod.NumberOfCopies = 1;
            basicFilmSessionModuleIod.OwnerId = "ME";
            basicFilmSessionModuleIod.FilmDestinationString = "BIN_1";
            basicFilmSessionModuleIod.MediumType = MediumType.BlueFilm;
            basicFilmSessionModuleIod.FilmSessionLabel = "TEST TEST";

            BasicFilmBoxModuleIod basicFilmBoxModuleIod = new BasicFilmBoxModuleIod();
            // Set it to print 1 image
            basicFilmBoxModuleIod.ImageDisplayFormat = @"STANDARD\1,1";
            basicFilmBoxModuleIod.FilmSizeId = FilmSize.IN14x17;
            basicFilmBoxModuleIod.BorderDensity = "BLACK";
            basicFilmBoxModuleIod.EmptyImageDensity = "BLACK";
            basicFilmBoxModuleIod.MagnificationType = MagnificationType.Bilinear;
            basicFilmBoxModuleIod.FilmOrientation = FilmOrientation.Portrait;
            basicFilmBoxModuleIod.MinDensity = 20;
            basicFilmBoxModuleIod.MaxDensity = 200;
            basicFilmBoxModuleIod.Trim = DicomBoolean.No;

            //IList imageBoxPixelModuleIods = new List();
            IList imageBoxPixelModuleIods = new List();
            ImageBoxPixelModuleIod imageBoxPixelModuleIod = new ImageBoxPixelModuleIod();
            imageBoxPixelModuleIod.ImageBoxPosition = 1;
            imageBoxPixelModuleIod.Polarity = Polarity.Normal;
            imageBoxPixelModuleIod.MagnificationType = MagnificationType.Bilinear;
            imageBoxPixelModuleIod.RequestedDecimateCropBehavior = DecimateCropBehavior.Crop;
            imageBoxPixelModuleIod.SmoothingType = SmoothingType.None;

            var basicGrayscaleImageSequence = new BasicGrayscaleImageSequenceIod();
            basicGrayscaleImageSequence.AddDicomFileValues(file1);

            imageBoxPixelModuleIod.BasicGrayscaleImageSequenceList.Add(basicGrayscaleImageSequence);
            imageBoxPixelModuleIods.Add(imageBoxPixelModuleIod);

            DicomState actual = printScu.Print(clientAETitle, remoteAE, remoteHost, remotePort, basicFilmSessionModuleIod, basicFilmBoxModuleIod, imageBoxPixelModuleIods);
        }
 

dblanchard
Senior Member
Senior Member
Posts:185

--
2010-02-15 12:45 AM  
what is the exact exception? did you look at the inner exception?

I think there are still issues with the scanning for plugins. I disabled scanning for plugins in my version of the code since I don't use it...

dan
stewart
Senior Member
Senior Member
Posts:2032

--
2010-02-23 11:30 AM  
Can't remember if I already answered this in another post, but this is generally because you are missing the log4net.dll that all the CC framework depends on.

Hope this helps,
Stewart
Real-time support available to Clinical Edition and Team Edition customers
maensari
Basic Member
Basic Member
Posts:16

--
2010-02-26 02:16 AM  
thanks stewart
i included log4net.dll
and error is changed the new error is
No plugins could be found
but when i addred another dll that is ClearCanvas.Desktop.dll then i am not getting any error but my DicomState returns Failure from Print method of BasicGrayscalePrintScu Class
waiting for your reply
maensari
Basic Member
Basic Member
Posts:16

--
2010-02-26 02:41 AM  
hi stewart
here i got the most Precise error that i am getting inside BasicGrayscalePrintScu class in Print method where connect method trying to connect server and return stutus value is TimeoutExpired

should i need to extend the read or write time
maensari
Basic Member
Basic Member
Posts:16

--
2010-02-26 07:59 AM  
my application still giving me this error message "Timeout Expired for remote host DTYPIX, aborting connection"
DTYPIX is my printer machine name

PrinterStatusScu shows printer status is NORMAL and VarifcationScu return the verification result and that is SUCCESS but when i call print method i get error
here i don't understand what should i do plz help me
stewart
Senior Member
Senior Member
Posts:2032

--
2010-03-04 04:27 PM  

Hi, there are settings you can add to the .config file for read and write timeouts.  You can just copy them from Dicom/app.config (called NetworkSettings).

Hope this helps,

Stewart

Real-time support available to Clinical Edition and Team Edition customers
maensari
Basic Member
Basic Member
Posts:16

--
2010-03-10 08:31 AM  
thanks you very much stewart
i tried what you said but unfortunatly it did not work for me. am still looking to get a successful code for printing a dicom file from dicom film printer.

Anjum
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.