• 大小: 10.12MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-16
  • 语言: C#
  • 标签: C#  Jpeg  转Dicom  Dicom  

资源简介

Dicom 转Jpeg 支持3种不同的方式转换将dicom转成jpeg Jpeg 转Dicom, 可以将jpeg png等主流图片格式转为dicom文件

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DICOMCoverter
{
    public enum TypeOfDicomFile
    {
        NotDicom
        Dicom3File
        DicomOldTypeFile
        DicomUnknownTransferSyntax
    };

    public class DicomDecoder
    {
        #region 定义变量与初始化

        const uint PIXEL_REPRESENTATION = 0x00280103;
        const uint TRANSFER_SYNTAX_UID = 0x00020010;
        const uint MODALITY = 0x00080060;
        const uint SLICE_THICKNESS = 0x00180050;
        const uint SLICE_SPACING = 0x00180088;
        const uint SAMPLES_PER_PIXEL = 0x00280002;
        const uint PHOTOMETRIC_INTERPRETATION = 0x00280004;
        const uint PLANAR_CONFIGURATION = 0x00280006;
        const uint NUMBER_OF_frameS = 0x00280008;
        const uint ROWS = 0x00280010;
        const uint COLUMNS = 0x00280011;
        const uint PIXEL_SPACING = 0x00280030;
        const uint BITS_ALLOCATED = 0x00280100;
        const uint WINDOW_CENTER = 0x00281050;
        const uint WINDOW_WIDTH = 0x00281051;
        const uint RESCALE_INTERCEPT = 0x00281052;
        const uint RESCALE_SLOPE = 0x00281053;
        const uint RED_PALETTE = 0x00281201;
        const uint GREEN_PALETTE = 0x00281202;
        const uint BLUE_PALETTE = 0x00281203;
        const uint ICON_IMAGE_SEQUENCE = 0x00880200;
        const uint PIXEL_DATA = 0x7FE00010;

        const string ITEM = “FFFEE000“;
        const string ITEM_DELIMITATION = “FFFEE00D“;
        const string SEQUENCE_DELIMITATION = “FFFEE0DD“;

        const int
            AE = 0x4145
            AS = 0x4153
            AT = 0x4154
            CS = 0x4353
            DA = 0x4441
            DS = 0x4453
            DT = 0x4454
            FD = 0x4644
            FL = 0x464C
            IS = 0x4953
            LO = 0x4C4F
            LT = 0x4C54
            PN = 0x504E
            SH = 0x5348
            SL = 0x534C
            SS = 0x5353
            ST = 0x5354
            TM = 0x544D
            UI = 0x5549
            UL = 0x554C
            US = 0x5553
            UT = 0x5554
            OB = 0x4F42
            OW = 0x4F57
            SQ = 0x5351
            UN = 0x554E
            QQ = 0x3F3F
            RT = 0x5254;
        const int ID_OFFSET = 128;  //location of “DICM“
        const int IMPLICIT_VR = 0x2D2D; // ‘--‘ 
        const String DICM = “DICM“;

        public int bitsAllocated;
        public int width;
        public int height;
        public int offset;
        public int nImages;
        public int samplesPerPixel;
        public double pixelDepth = 1.0;
        public double pixelWidth = 1.0;
        public double pixelHeight = 1.0;
        public string unit;
        public double windowCentre windowWidth;
        public bool signedImage;
  

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      85450  2016-06-01 10:04  DICOMCoverter\.vs\config\applicationhost.config

    ..A..H.    145920  2016-10-25 16:05  DICOMCoverter\.vs\DICOMCoverter\v14\.suo

     文件        189  2016-09-05 10:27  DICOMCoverter\DICOMCoverter\App.config

     文件      22688  2016-10-25 16:26  DICOMCoverter\DICOMCoverter\bin\Debug\DICOMCoverter.vshost.exe

     文件     128394  2016-07-20 09:29  DICOMCoverter\DICOMCoverter\bin\Debug\Files\Dicom.jpg

     文件    5435648  2016-08-25 16:27  DICOMCoverter\DICOMCoverter\bin\Debug\Files\DX0001.DCM

     文件       7376  2016-10-25 16:07  DICOMCoverter\DICOMCoverter\DICOMCoverter.csproj

     文件        228  2016-09-05 15:51  DICOMCoverter\DICOMCoverter\DICOMCoverter.csproj.user

     文件      32359  2016-09-18 16:57  DICOMCoverter\DICOMCoverter\DicomDecoder.cs

     文件      43057  2016-09-06 15:54  DICOMCoverter\DICOMCoverter\DicomDictionary.cs

     文件     879616  2016-07-18 16:38  DICOMCoverter\DICOMCoverter\dll\Dicom.Native.dll

     文件    1097216  2016-07-18 16:38  DICOMCoverter\DICOMCoverter\dll\Dicom.Native64.dll

     文件     393728  2016-10-09 15:28  DICOMCoverter\DICOMCoverter\dll\RasterEdge.Imaging.Basic.Codec.dll

     文件     294400  2016-10-09 15:27  DICOMCoverter\DICOMCoverter\dll\RasterEdge.Imaging.Basic.dll

     文件     126976  2016-10-09 15:51  DICOMCoverter\DICOMCoverter\dll\RasterEdge.Imaging.DICOM.dll

     文件      74240  2016-10-09 15:50  DICOMCoverter\DICOMCoverter\dll\RasterEdge.Imaging.JPEG2000.dll

     文件      41472  2016-10-09 15:28  DICOMCoverter\DICOMCoverter\dll\RasterEdge.Imaging.Processing.dll

     文件     249856  2016-10-09 16:52  DICOMCoverter\DICOMCoverter\dll\RasterEdge.XDoc.WindowsViewer.dll

     文件   14376448  2016-08-16 20:51  DICOMCoverter\DICOMCoverter\dll\RasterEdge.XImage.Raster.Core.dll

     文件     113152  2016-10-09 15:28  DICOMCoverter\DICOMCoverter\dll\RasterEdge.XImage.Raster.dll

     文件       7953  2016-10-25 16:27  DICOMCoverter\DICOMCoverter\Form1.cs

     文件       2665  2016-10-25 15:52  DICOMCoverter\DICOMCoverter\Form1.Designer.cs

     文件       5817  2016-10-25 15:52  DICOMCoverter\DICOMCoverter\Form1.resx

     文件      12542  2016-09-14 09:32  DICOMCoverter\DICOMCoverter\ImageControl.cs

     文件       1622  2016-10-25 15:50  DICOMCoverter\DICOMCoverter\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件      15438  2016-10-25 09:03  DICOMCoverter\DICOMCoverter\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件          0  2016-09-05 10:27  DICOMCoverter\DICOMCoverter\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2016-09-05 10:27  DICOMCoverter\DICOMCoverter\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2016-09-05 10:27  DICOMCoverter\DICOMCoverter\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件        679  2016-09-20 19:24  DICOMCoverter\DICOMCoverter\packages.config

............此处省略22个文件信息

评论

共有 条评论