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);
}