How to save a single frame dicom

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

How to save a single frame dicom

#1 Post by George »

Hello,

I humbly ask to get a dicom of single frame given a multi-frame dicom

Code: Select all

            DicomImage *dicomImage = new DicomImage(dicomConverted.c_str(), CIF_UsePartialAccessToPixelData, frameNumber, 1 );
            if (dicomImage->getStatus() != EIS_Normal)
            {
                LOG("Error: Unable to load DICOM file: ");
                delete dicomImage;
                continue;
            }
I noticed such functionality in dcmquant, also main important thing is not loose qaulity of image or have different dicom tags

Best Regards
George

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: How to save a single frame dicom

#2 Post by J. Riesmeier »

Short comment from my side: Using the DicomImage class for extracting frames from a multi-frame image without losing information is certainly not the way to go. This is because the main purpose of this class is rendering images for display.

George
Posts: 52
Joined: Sun, 2023-11-12, 16:50

Re: How to save a single frame dicom

#3 Post by George »

Hello,

I humbly request to know how to do it just in case
also, is there a way that you recommend?

Best Regards
George

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1446
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

Re: How to save a single frame dicom

#4 Post by Marco Eichelberg »

There is no general answer to this question. If you have a DICOM image type that exists both in a single frame and a multiframe variety, then converting from multiframe to single frame requires an adaptation of all physical parameters related to the image acquisition. This is a fairly complex tasks and depends on the details of the modality.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest