GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Can i use WinRar soft compress the DICOM file? · Issue #97 · DICOMcloud/DICOMcloud

Can i use WinRar soft compress the DICOM file? #97

New issue
Copy link
New issue
Copy link
Open
Open
Can i use WinRar soft compress the DICOM file?#97
Copy link

Description

@wangning08115
wangning08115
opened on Jun 27, 2020
Issue body actions

I have many dicom files.
They are very big.
For Example: One Study has 100 dicom files. The are more than 100MB, When i use WinRar soft to compress them, will be 20MB.

I know the WinRar soft compress file can True reduction the dicom file when uncompress them.
So i want use compress for DICOMcloud project.
Am I right?
And can you give me some help, some suggest?

Activity

  1. wangning08115 commented on Jun 27, 2020

    @wangning08115
    wangning08115
    on Jun 27, 2020
    Author
    More actions

    @Zaid-Safadi can you give me some help, some suggest?

  2. Zaid-Safadi commented on Jun 28, 2020

    @Zaid-Safadi
    Zaid-Safadi
    on Jun 28, 2020
    Member
    More actions

    @wangning08115 I'm not sure I understand your requirement.
    Do you want the studies to be compressed by the DICOMcloud once they are stored to save on disk space? or
    Do you want to ZIP them on your machine using WinRar then store them to DICOMcloud? or
    Do you want the DICOMcloud send a compressed version when a client query for them?

    I guess all the above could be implemented. I'll be happy to give you direction if you want to submit a PR with this feature.

  3. wangning08115 commented on Jun 28, 2020

    @wangning08115
    wangning08115
    on Jun 28, 2020
    Author
    More actions

    Yes, I want the studies to be compressed by the DICOMcloud once they are stored to save on disk space.
    Disk space is expensive. I have very large dicom files on Cloud storage.

    I found code: StorageSettings.MediaTypes
    When change mediaTyle use below code:
    MediaTypes.Add ( new DicomMediaProperties ( MimeMediaTypes.DICOM, DicomTransferSyntax.JPEGLSLossless.UID.UID ) ) ;
    The DicomTransferSyntax.JPEGLSLossless type can save compressed file on disk.

    But i don't know JPEGLSLossless is realy Lossless compression? No any data lost?

    Thanks for you.

  4. Zaid-Safadi commented on Jun 28, 2020

    @Zaid-Safadi
    Zaid-Safadi
    on Jun 28, 2020
    Member
    More actions

    @wangning08115 sounds interesting feature. Check the code under:
    https://github.com/DICOMcloud/DICOMcloud/tree/development/DICOMcloud/IO
    one way might be to add a version of the "Upload" method with a flag to compress and then support this in ObservableStorageLocation and let it unzip it automatically in the "download" method. You will want a way to know if the file is zipped though when the "download" method is called.

    Finally, .NET seems to have a library to ZIP/Unzip that you can use:
    https://docs.microsoft.com/en-us/dotnet/api/system.io.compression.zipfile?view=netframework-4.7.2

    There might be other ways to do this as well but this should give you a good start

  5. wangning08115 commented on Jun 28, 2020

    @wangning08115
    wangning08115
    on Jun 28, 2020
    Author
    More actions

    @Zaid-Safadi I think your ZIP/Unzip use System.IO.Compression idea is good.

    And now :
    I found code: StorageSettings.MediaTypes
    When change mediaTyle use below code:
    MediaTypes.Add ( new DicomMediaProperties ( MimeMediaTypes.DICOM, DicomTransferSyntax.JPEGLSLossless.UID.UID ) ) ;
    The DicomTransferSyntax.JPEGLSLossless type can save compressed file on disk.

    But i don't know JPEGLSLossless is realy Lossless compression? No any data lost?

  6. Zaid-Safadi commented on Jul 16, 2020

    @Zaid-Safadi
    Zaid-Safadi
    on Jul 16, 2020
    Member
    More actions

    @wangning08115 yes the JPEGLossless is supposed to be really lossless compression without any data loss. The issue with always using this is the overhead on encoding and decoding the images whether it is on the server or the client side.

    If you are worried more about the storage space over speed then go for it but if you care about performance then you probably want to keep the data uncompressed.

    I like the idea of storing the images zipped on disk and unzipping before transmitting, I created a project that zips the dicom images for download on the client side here https://github.com/DICOMcloud/DicomConverter/blob/master/DicomConverter/Types/ZippingService.cs
    If you decide to support this in DICOMcloud I'll be happy to help.

  7. celeron533 commented on Feb 16, 2022

    @celeron533
    celeron533
    on Feb 16, 2022
    Contributor
    More actions

    @wangning08115 When on Windows NTFS file system, you can also set the specific directory or even the drive to compress files. Since it is working on file system level, the compress and decompress procedure is transparent to the application. Although its compress ratio is not as good as rar or zip, it gives best practice without modify any code of the application.

    https://bing.com/search?q=ntfs+compression

    And for DICOM file content transmit optimize, perhaps something like GZip in HTTP could help.

    PS. WinRar is not free, recommend to use 7z to compress files/folders.

  8. wangning08115 commented on Mar 13, 2023

    @wangning08115
    wangning08115
    on Mar 13, 2023
    Author
    More actions

    @Zaid-Safadi Hi , I have some question.

    You say "Do you want the DICOMcloud send a compressed version when a client query for them?" in above content.

    Now, I want DICOMcloud send a compressed version when a client query for them.
    One study has 100 dcm files. More than 100MB.
    So when dicom web viewer open one study, need load more than 100MB data, so it slowly.
    How can the DICOMcloud api provide compressed image to web viewer.
    I want viewer load fast.
    How can i do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.