public static void DoCompress(List <Image> ImageList, string sessionId)
 {
     lock (_authorizeKey)
     {
         CompressParam param = new CompressParam();
         Dicom2JpegCompressWorker.ProcessCompress(param);
         Thread.Sleep(1000);
         //Console.WriteLine("Name:" + Thread.CurrentThread.Name + " count:" + count.ToString());
     }
 }
        public static CompressResult ProcessCompress(CompressParam param)
        {
            int result = 1;

            try
            {
                result = MiniPacsDllImporter.dicom2jpg(param.sopInstanceUID, param.dicomFileName, param.outputFileName + "_1.jtf",
                                                       1200, 1200);
            }
            catch (Exception ex)
            {
                //GXLogManager.WriteLog(GXLogModule.JP2ManagementServer_CompressWorker, GXLogLevel.Error, GXLogCode.DEFAULT, ex);
            }

            return((result == 1) ? CompressResult.SUCCESS : CompressResult.FAIL);
        }