Large dicom files

All other questions regarding DCMTK

Moderator: Moderator Team

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

Large dicom files

#1 Post by George »

Hello,

I am a beginner with new dcmtk tools, I am really in a need to be able to split large dicom files into N dicoms or at least extract all its frames into bmp properly.
This is the file https://drive.google.com/file/d/1rBZw-o ... sp=sharing
I tried many tools our there, it will be nice to give me a hand

Best Regards
George

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

Re: Large dicom files

#2 Post by Marco Eichelberg »

In general, it is not possible to split a large DICOM multi-frame image into many smaller files without in-depth knowledge of the DICOM standard and the physical parameters of the acquisition device. In brief, I would not recommend this route.

Extracting all frames from a (very) large DICOM image is rather easy, though. For this purpose you need to use class DicomImage.
The constructor of this class allows you to pass the number of the start frame and the number of frames to be read, so you can use
this feature to only read a smaller number of frames into memory:

Code: Select all

https://support.dcmtk.org/docs/classDicomImage.html#a3d2f3f9c368a5d809a0341bb8885a5c8
You can then iterate through the frames using DicomImage::processNextFrames().

You can store individual frames as BMP files by calling DicomImage::writeBMP():

Code: Select all

https://support.dcmtk.org/docs/classDicomImage.html#a39314b116ef8cff60f3150326f4e76f0
PS. Since this thread is not related to JPEG 2000 or the DCMJP2K module, I will move it to the appropriate board.

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

Re: Large dicom files

#3 Post by George »

Hello,

Also can you give an example please with main, also should I be worried about the JPEG200 would it interfere.

Best Regards
George

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

Re: Large dicom files

#4 Post by George »

Hello,

I would also add that I tried using the below code and it failed with this output:

#include "dcmtk/dcmimgle/dcmimage.h"
#include "dcmtk/dcmdata/dctk.h"

int main(int argc, char* argv[]) {
if (argc != 2) {
std::cerr << "Usage: " << argv[0] << " <DICOM_FILE_PATH>" << std::endl;
return EXIT_FAILURE;
}

const char* dicomFilePath = argv[1];

DicomImage* dicomImage = new DicomImage(dicomFilePath);

if (dicomImage->getStatus() != EIS_Normal) {
std::cerr << "Error: Unable to load DICOM file: " << dicomFilePath << std::endl;
return EXIT_FAILURE;
}

unsigned int frameNumber = 0;

// Use a while loop with processNextFrames
while (dicomImage->processNextFrames()) {
// Create a BMP file name for each frame
std::string bmpFileName = "frame_" + std::to_string(frameNumber) + ".bmp";

// Write the current frame as a BMP file
if (dicomImage->writeBMP(bmpFileName.c_str()) != 0) {
std::cerr << "Error: Unable to write BMP file for frame " << frameNumber << std::endl;
delete dicomImage;
return EXIT_FAILURE;
}

std::cout << "Frame " << frameNumber << " saved as " << bmpFileName << std::endl;

++frameNumber;
}

// Clean up
delete dicomImage;

return EXIT_SUCCESS;
}

The output:

s$ ./a.out CSTORERQ_SM_1.3.46.670589.45.1.1.4993912214784.1.5436.1538561391456.5-iwatt.dcm
E: can't change to unencapsulated representation for pixel data
E: can't determine 'PhotometricInterpretation' of decompressed image
E: mandatory attribute 'PhotometricInterpretation' is missing or can't be determined
Error: Unable to load DICOM file: CSTORERQ_SM_1.3.46.670589.45.1.1.4993912214784.1.5436.1538561391456.5-iwatt.dcm

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

Re: Large dicom files

#5 Post by J. Riesmeier »

You did not pass the parameters to the constructor as Marco suggested:

Code: Select all

DicomImage* dicomImage = new DicomImage(dicomFilePath);
See this Howto: Access multi-frame images without loading complete pixel data.

However, please note that the public DCMTK does not support decompressing JPEG2000-compressed DICOM images. You need e.g. the DCMJP2K extension, which has to be licensed separately.

And, to answer your original question: You could split the DICOM WSI file by using a Concatenation of Instances, but there is no ready-to-use tool in the DCMTK for doing this.

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

Re: Large dicom files

#6 Post by George »

I used the last code of J. Riesmeier and I noticed that I still have an issue.

~$ g++ -I./dcmtk/dcmimgle/include/ -I./dcmtk/build/config/include/ -I./dcmtk/ofstd/include/ -I./dcmtk/dcmdata/include/ -I./dcmtk/oflog/include/ -I./dcmtk/dcmjpeg/include/ xe.cpp ./dcmtk/build/lib/libcmr.a ./dcmtk/build/lib/libdcmect.a ./dcmtk/build/lib/libdcmimgle.a ./dcmtk/build/lib/libdcmjpls.a ./dcmtk/build/lib/libdcmpstat.a ./dcmtk/build/lib/libdcmseg.a ./dcmtk/build/lib/libdcmtls.a ./dcmtk/build/lib/libdcmxml.a ./dcmtk/build/lib/libijg16.a ./dcmtk/build/lib/liboflog.a ./dcmtk/build/lib/libdcmdata.a ./dcmtk/build/lib/libdcmfg.a ./dcmtk/build/lib/libdcmiod.a ./dcmtk/build/lib/libdcmnet.a ./dcmtk/build/lib/libdcmqrdb.a ./dcmtk/build/lib/libdcmsr.a ./dcmtk/build/lib/libdcmtract.a ./dcmtk/build/lib/libi2d.a ./dcmtk/build/lib/libijg8.a ./dcmtk/build/lib/libofstd.a ./dcmtk/build/lib/libdcmdsig.a ./dcmtk/build/lib/libdcmimage.a ./dcmtk/build/lib/libdcmjpeg.a ./dcmtk/build/lib/libdcmpmap.a ./dcmtk/build/lib/libdcmrt.a ./dcmtk/build/lib/libdcmtkcharls.a ./dcmtk/build/lib/libdcmwlm.a ./dcmtk/build/lib/libijg12.a ./dcmtk/build/lib/liboficonv.a -lz
:~$ ./a.out CSTORERQ_SM_1.3.46.670589.45.1.1.4993912214784.1.5436.1538561391456.5-iwatt.dcm
E: can't determine 'PhotometricInterpretation' of decompressed image
E: mandatory attribute 'PhotometricInterpretation' is missing or can't be determined
:~$ dcmdump CSTORERQ_SM_1.3.46.670589.45.1.1.4993912214784.1.5436.1538561391456.5-iwatt.dcm | grep 0028,0004
(0028,0004) CS [YBR_RCT] # 8, 1 PhotometricInterpretation

any recomendation how to clear this problem properly?

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

Re: Large dicom files

#7 Post by J. Riesmeier »

The DICOM image is JPEG2000 compressed. As I wrote in my previous posting, the public DCMTK cannot decompress such images. You need e.g. the DCMJP2K extension for doing this.

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

Re: Large dicom files

#8 Post by George »

I have a version that is in normal format and was decompressed and I still have issues with the code sir, any idea why?

:~$ g++ -I./dcmtk/dcmimgle/include/ -I./dcmtk/build/config/include/ -I./dcmtk/ofstd/include/ -I./dcmtk/dcmdata/include/ -I./dcmtk/oflog/include/ -I./dcmtk/dcmjpeg/include/ xe.cpp ./dcmtk/build/lib/libcmr.a ./dcmtk/build/lib/libdcmect.a ./dcmtk/build/lib/libdcmimgle.a ./dcmtk/build/lib/libdcmjpls.a ./dcmtk/build/lib/libdcmpstat.a ./dcmtk/build/lib/libdcmseg.a ./dcmtk/build/lib/libdcmtls.a ./dcmtk/build/lib/libdcmxml.a ./dcmtk/build/lib/libijg16.a ./dcmtk/build/lib/liboflog.a ./dcmtk/build/lib/libdcmdata.a ./dcmtk/build/lib/libdcmfg.a ./dcmtk/build/lib/libdcmiod.a ./dcmtk/build/lib/libdcmnet.a ./dcmtk/build/lib/libdcmqrdb.a ./dcmtk/build/lib/libdcmsr.a ./dcmtk/build/lib/libdcmtract.a ./dcmtk/build/lib/libi2d.a ./dcmtk/build/lib/libijg8.a ./dcmtk/build/lib/libofstd.a ./dcmtk/build/lib/libdcmdsig.a ./dcmtk/build/lib/libdcmimage.a ./dcmtk/build/lib/libdcmjpeg.a ./dcmtk/build/lib/libdcmpmap.a ./dcmtk/build/lib/libdcmrt.a ./dcmtk/build/lib/libdcmtkcharls.a ./dcmtk/build/lib/libdcmwlm.a ./dcmtk/build/lib/libijg12.a ./dcmtk/build/lib/liboficonv.a -lz
:~$ ./a.out CSTORERQ_converted.dcm
E: unsupported value for 'PhotometricInterpretation' (RGB)

~$ dcmdump CSTORERQ_converted.dcm | grep 0028,0004
(0028,0004) CS [RGB] # 4, 1 PhotometricInterpretation

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

Re: Large dicom files

#9 Post by J. Riesmeier »

By default, the DicomImage class only supports monochrome DICOM images. In order to register support for color images (such as yours), you need to include the header file "dcmtk/dcmimage/diregist.h" into your source code and recompile.

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

Re: Large dicom files

#10 Post by George »

Hello,

I would love to mention that I tried your advise and I was managed to use the code better but I still had the error below:

I: processing frame 1031 to 1040
I: processing frame 1041 to 1050
I: processing frame 1051 to 1060
E: can't access partial value from byte offset 833617920 to 841482239: Invalid offset
E: can't convert input pixel data

Also, I was not able to use writeBmp function properly and when I did I got this result:

I: processing frame 1 to 10
Error: Unable to write BMP file for frame 10

Code: Select all

#include "dcmtk/config/osconfig.h"
#include "dcmtk/dcmimgle/dcmimage.h"
#include "dcmtk/dcmimage/diregist.h"
#include "dcmtk/dcmdata/dctk.h"
#include <string>

int main(int argc, char *argv[])
{
    OFLog::configure(OFLogger::INFO_LOG_LEVEL);

    DicomImage *image = new DicomImage("CSTORERQ_converted.dcm",CIF_UsePartialAccessToPixelData, 0, 10 /* fcount */);

    if (image->getStatus() == EIS_Normal)
    {
        do {
            DCMIMGLE_INFO("processing frame " << image->getFirstFrame() + 1 << " to "
                                              << image->getFirstFrame() + image->getFrameCount());

std::string frameNumStr = std::to_string(image->getFrameCount());
std::string bmpFileName = "frame_" + frameNumStr + ".bmp";

                // Write the current frame as a BMP file
                if (image->writeBMP(bmpFileName.c_str()) != 0) {
                        std::cerr << "Error: Unable to write BMP file for frame " << image->getFrameCount() << std::endl;
                        delete image;
                        return EXIT_FAILURE;
                }

        } while (image->processNextFrames());
    }

    delete image;

    return 0;
}
I would also add that I ran the dcmtk team consultant code with your header and this is output

:~$ ./a.out CSTORERQ_converted.dcm
W: computed (4572839936) and stored (277872640) pixel count differ

Code: Select all

#include "dcmtk/dcmimgle/dcmimage.h"
#include "dcmtk/dcmjpeg/djdecode.h"
#include "dcmtk/dcmimage/diregist.h"


int main(int argc, char* argv[]) {
    if (argc != 2) {
        std::cerr << "Usage: " << argv[0] << " <DICOM_FILE_PATH>" << std::endl;
        return EXIT_FAILURE;
    }

    const char* dicomFilePath = argv[1];

    DicomImage* dicomImage = new DicomImage(dicomFilePath);

    if (dicomImage->getStatus() != EIS_Normal) {
        std::cerr << "Error: Unable to load DICOM file: " << dicomFilePath << std::endl;
        return EXIT_FAILURE;
    }

    unsigned int frameNumber = 0;

    while (dicomImage->processNextFrames()) {
        std::string bmpFileName = "frame_" + std::to_string(frameNumber) + ".bmp";

        if (dicomImage->writeBMP(bmpFileName.c_str()) != 0) {
            std::cerr << "Error: Unable to write BMP file for frame " << frameNumber << std::endl;
            delete dicomImage;
            return EXIT_FAILURE;
        }

        ++frameNumber;
    }

    delete dicomImage;

    return EXIT_SUCCESS;

}
looking forward for your update, they are very helpful

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

Re: Large dicom files

#11 Post by Marco Eichelberg »

You would have to post a dcmdump output of that file - without that it is difficult to guess what may be the problem.
However, based on the warning printed (computed (4572839936) and stored (277872640) pixel count differ), the pixel data seems to be incomplete. This is understandable, given that the total number of pixels would be larger than the maximum attribute size that is possible in DICOM - you cannot have 4,572,839,936 pixels in a file that is smaller than 4 GBytes.

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

Re: Large dicom files

#12 Post by George »

dcmdump CSTORERQ_converted.dcm

# Dicom-File-Format

# Dicom-Meta-Information-Header
# Used TransferSyntax: Little Endian Explicit
(0002,0000) UL 206 # 4, 1 FileMetaInformationGroupLength
(0002,0001) OB 00\01 # 2, 1 FileMetaInformationVersion
(0002,0002) UI =VLWholeSlideMicroscopyImageStorage # 30, 1 MediaStorageSOPClassUID
(0002,0003) UI [1.3.46.670589.45.1.1.4993912214784.1.5436.1538561391456.5] # 58, 1 MediaStorageSOPInstanceUID
(0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
(0002,0012) UI [1.2.276.0.7230010.3.0.3.6.6] # 28, 1 ImplementationClassUID
(0002,0013) SH [OFFIS_DCMTK_366] # 16, 1 ImplementationVersionName

# Dicom-Data-Set
# Used TransferSyntax: Little Endian Explicit
(0008,0008) CS [ORIGINAL\PRIMARY\VOLUME\NONE] # 28, 4 ImageType
(0008,0012) DA [20181003] # 8, 1 InstanceCreationDate
(0008,0013) TM [100951] # 6, 1 InstanceCreationTime
(0008,0016) UI =VLWholeSlideMicroscopyImageStorage # 30, 1 SOPClassUID
(0008,0018) UI [1.3.46.670589.45.1.1.4993912214784.1.5436.1538561391456.5] # 58, 1 SOPInstanceUID
(0008,0020) DA [20181003] # 8, 1 StudyDate
(0008,0023) DA [20181003] # 8, 1 ContentDate
(0008,002a) DT [20170921123431] # 14, 1 AcquisitionDateTime
(0008,0030) TM [095255] # 6, 1 StudyTime
(0008,0033) TM [100951] # 6, 1 ContentTime
(0008,0050) SH [D18-3001] # 8, 1 AccessionNumber
(0008,0060) CS [SM] # 2, 1 Modality
(0008,0070) LO [Philips] # 8, 1 Manufacturer
(0008,0080) LO [Philips Healthcare] # 18, 1 InstitutionName
(0008,0081) ST [Hospital address] # 16, 1 InstitutionAddress
(0008,0090) PN (no value available) # 0, 0 ReferringPhysicianName
(0008,1040) LO [Digital Pathology] # 18, 1 InstitutionalDepartmentName
(0008,1090) LO [ UFS Scanner] # 12, 1 ManufacturerModelName
(0008,2111) ST [PHILIPS UFS V1.6.6426 | Quality=2 | DWT=1 | Compressor=16] # 58, 1 DerivationDescription
(0008,9206) CS [VOLUME] # 6, 1 VolumetricProperties
(0010,0010) PN [Philips^Chris] # 14, 1 PatientName
(0010,0020) LO [345678] # 6, 1 PatientID
(0010,0030) DA [20030303] # 8, 1 PatientBirthDate
(0010,0040) CS [O] # 2, 1 PatientSex
(0018,1000) LO [FMT0114] # 8, 1 DeviceSerialNumber
(0018,1020) LO [1.6.6426\20150402_R48] # 22, 2 SoftwareVersions
(0018,1200) DA [20170921] # 8, 1 DateOfLastCalibration
(0018,1201) TM [123423] # 6, 1 TimeOfLastCalibration
(0018,9073) FD 5 # 8, 1 AcquisitionDuration
(0020,000d) UI [1.3.46.670589.45.1.1.4993912214784.1.5436.1538560375246] # 56, 1 StudyInstanceUID
(0020,000e) UI [1.3.46.670589.45.1.1.4993912214784.1.5436.1538561391456.3] # 58, 1 SeriesInstanceUID
(0020,0010) SH (no value available) # 0, 0 StudyID
(0020,0011) IS [2] # 2, 1 SeriesNumber
(0020,0013) IS [1] # 2, 1 InstanceNumber
(0020,0020) CS (no value available) # 0, 0 PatientOrientation
(0020,0052) UI [1.22.333.4444.55555] # 20, 1 FrameOfReferenceUID
(0020,1040) LO [SLIDE_CORNER] # 12, 1 PositionReferenceIndicator
(0020,9221) SQ (Sequence with explicit length #=1) # 42, 1 DimensionOrganizationSequence
(fffe,e000) na (Item with explicit length #=1) # 34, 1 Item
(0020,9164) UI [1.22.333.4444.55555.666666] # 26, 1 DimensionOrganizationUID
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0020,9222) SQ (Sequence with explicit length #=1) # 94, 1 DimensionIndexSequence
(fffe,e000) na (Item with explicit length #=3) # 86, 1 Item
(0020,9164) UI [1.22.333.4444.55555.666666] # 26, 1 DimensionOrganizationUID
(0020,9165) AT (0048,021a) # 4, 1 DimensionIndexPointer
(0020,9421) LO [Plane Position (Slide) Sequence] # 32, 1 DimensionDescriptionLabel
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0020,9311) CS [TILED_FULL] # 10, 1 DimensionOrganizationType
(0028,0002) US 3 # 2, 1 SamplesPerPixel
(0028,0004) CS [RGB] # 4, 1 PhotometricInterpretation
(0028,0006) US 0 # 2, 1 PlanarConfiguration
(0028,0008) IS [17444] # 6, 1 NumberOfFrames
(0028,0010) US 512 # 2, 1 Rows
(0028,0011) US 512 # 2, 1 Columns
(0028,0100) US 8 # 2, 1 BitsAllocated
(0028,0101) US 8 # 2, 1 BitsStored
(0028,0102) US 7 # 2, 1 HighBit
(0028,0103) US 0 # 2, 1 PixelRepresentation
(0028,0301) CS [NO] # 2, 1 BurnedInAnnotation
(0028,2110) CS [01] # 2, 1 LossyImageCompression
(0028,2112) DS [3] # 2, 1 LossyImageCompressionRatio
(0028,2114) CS [PHILIPS_DP_1_0] # 14, 1 LossyImageCompressionMethod
(0040,0512) LO [D18-3001-A-1-2] # 14, 1 ContainerIdentifier
(0040,0513) SQ (Sequence with explicit length #=0) # 0, 1 IssuerOfTheContainerIdentifierSequence
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0040,0518) SQ (Sequence with explicit length #=1) # 60, 1 ContainerTypeCodeSequence
(fffe,e000) na (Item with explicit length #=3) # 52, 1 Item
(0008,0100) SH [A-0101B] # 8, 1 CodeValue
(0008,0102) SH [SRT] # 4, 1 CodingSchemeDesignator
(0008,0104) LO [Microscope slide] # 16, 1 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0040,0555) SQ (Sequence with explicit length #=0) # 0, 1 AcquisitionContextSequence
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0040,0560) SQ (Sequence with explicit length #=1) # 116, 1 SpecimenDescriptionSequence
(fffe,e000) na (Item with explicit length #=4) # 108, 1 Item
(0040,0551) LO [D18-3001-A-1-2] # 14, 1 SpecimenIdentifier
(0040,0554) UI [1.3.46.670589.45.1.1.4993912214784.1.996.1539338288979] # 54, 1 SpecimenUID
(0040,0562) SQ (Sequence with explicit length #=0) # 0, 1 IssuerOfTheSpecimenIdentifierSequence
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0040,0610) SQ (Sequence with explicit length #=0) # 0, 1 SpecimenPreparationSequence
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0048,0001) FL 12.5440006 # 4, 1 ImagedVolumeWidth
(0048,0002) FL 22.7840004 # 4, 1 ImagedVolumeHeight
(0048,0003) FL 9.99999975e-05 # 4, 1 ImagedVolumeDepth
(0048,0006) UL 50176 # 4, 1 TotalPixelMatrixColumns
(0048,0007) UL 91136 # 4, 1 TotalPixelMatrixRows
(0048,0008) SQ (Sequence with explicit length #=1) # 56, 1 TotalPixelMatrixOriginSequence
(fffe,e000) na (Item with explicit length #=2) # 48, 1 Item
(0040,072a) DS [2.48972431077694] # 16, 1 XOffsetInSlideCoordinateSystem
(0040,073a) DS [24.8972431077694] # 16, 1 YOffsetInSlideCoordinateSystem
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0048,0010) CS [NO] # 2, 1 SpecimenLabelInImage
(0048,0011) CS [MANUAL] # 6, 1 FocusMethod
(0048,0012) CS [NO] # 2, 1 ExtendedDepthOfField
(0048,0102) DS [0\1\0\1\0\0] # 12, 6 ImageOrientationSlide
(0048,0105) SQ (Sequence with explicit length #=1) # 3328, 1 OpticalPathSequence
(fffe,e000) na (Item with explicit length #=4) # 3320, 1 Item
(0022,0016) SQ (Sequence with explicit length #=1) # 68, 1 IlluminationTypeCodeSequence
(fffe,e000) na (Item with explicit length #=3) # 60, 1 Item
(0008,0100) SH [111741] # 6, 1 CodeValue
(0008,0102) SH [DCM] # 4, 1 CodingSchemeDesignator
(0008,0104) LO [Transmission illumination] # 26, 1 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0028,2000) OB 00\00\0c\48\4c\69\6e\6f\02\10\00\00\73\63\6e\72\52\47\42\20\58\59... # 3144, 1 ICCProfile
(0048,0106) SH [Op_001] # 6, 1 OpticalPathIdentifier
(0048,0108) SQ (Sequence with explicit length #=1) # 58, 1 IlluminationColorCodeSequence
(fffe,e000) na (Item with explicit length #=3) # 50, 1 Item
(0008,0100) SH [R-102C0] # 8, 1 CodeValue
(0008,0102) SH [SRT] # 4, 1 CodingSchemeDesignator
(0008,0104) LO [Full Spectrum] # 14, 1 CodeMeaning
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0048,0302) UL 1 # 4, 1 NumberOfOpticalPaths
(0048,0303) UL 1 # 4, 1 TotalPixelMatrixFocalPlanes
(2200,0002) UT (no value available) # 0, 0 LabelText
(2200,0005) LT (no value available) # 0, 0 BarcodeValue
(5200,9229) SQ (Sequence with explicit length #=1) # 156, 1 SharedFunctionalGroupsSequence
(fffe,e000) na (Item with explicit length #=3) # 148, 1 Item
(0028,9110) SQ (Sequence with explicit length #=1) # 46, 1 PixelMeasuresSequence
(fffe,e000) na (Item with explicit length #=2) # 38, 1 Item
(0018,0050) DS [0.0001] # 6, 1 SliceThickness
(0028,0030) DS [0.00025\0.00025] # 16, 2 PixelSpacing
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0040,0710) SQ (Sequence with explicit length #=1) # 44, 1 WholeSlideMicroscopyImageFrameTypeSequence
(fffe,e000) na (Item with explicit length #=1) # 36, 1 Item
(0008,9007) CS [ORIGINAL\PRIMARY\VOLUME\NONE] # 28, 4 FrameType
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(0048,0207) SQ (Sequence with explicit length #=1) # 22, 1 OpticalPathIdentificationSequence
(fffe,e000) na (Item with explicit length #=1) # 14, 1 Item
(0048,0106) SH [Op_001] # 6, 1 OpticalPathIdentifier
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem
(7fe0,0010) OB fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe\fe... # 833617920, 1 PixelData

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

Re: Large dicom files

#13 Post by Marco Eichelberg »

This file is defective. It should contain uncompressed pixel data for 17444 frames of 512x512 pixels of 3 bytes per pixel (RGB), i.e. 13,718,519,808 bytes of pixel data (which is not possible in an uncompressed DICOM file). In fact, only 833,617,920 bytes of pixel data are present, less than 10%. This means that decoding will fail around frame 1060 or 1061, when the pixel data "suddenly" ends.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest