Search found 1352 matches

by Marco Eichelberg
Tue, 2022-09-06, 19:19
Forum: DCMTK - General
Topic: dcmodify: image extremely truncated
Replies: 7
Views: 150

Re: dcmodify: image extremely truncated

My guess is that this is indeed some out-of-memory condition. dcmodify calls DcmItem::loadAllDataIntoMemory() to load the entire DICOM file into main memory before starting to modify it, but apparently does not check the return code of this call. Are you perhaps using a 32-bit binary? That would exp...
by Marco Eichelberg
Tue, 2022-09-06, 19:09
Forum: DCMTK - General
Topic: Invalid sop instance uid - bad Dicom file
Replies: 11
Views: 157

Re: Invalid sop instance uid - bad Dicom file

That quote only means that applications are not supposed to read meaning into the structure of the UIDs (e.g. they must not assume that UID 1.2.3.4 is in any way related to UID 1.2.3). That does not prevent an application to check whether or not a UID is syntactically valid, i.e. contains no leading...
by Marco Eichelberg
Tue, 2022-09-06, 17:28
Forum: DCMTK - Installation
Topic: Can DCMTK be built relocatable on Windows with ICU and OpenSSL?
Replies: 1
Views: 87

Re: Can DCMTK be built relocatable on Windows with ICU and OpenSSL?

On Windows, DCMTK uses a different mechanism (defined in CMake/3rdparty.cmake) to locate the external support libraries such as OpenSSL. This makes use of the CMake find_path() command, which apparently always returns an absolute path. It should not be overly difficult to add some code in that file ...
by Marco Eichelberg
Fri, 2022-08-26, 10:56
Forum: DCMTK - General
Topic: JPEG lossless Cornell images with Huffman table overflow
Replies: 1
Views: 86

Re: JPEG lossless Cornell images with Huffman table overflow

I don't think this is related to the "well-known" Cornell bug, which is an overflow in the Huffman table values that only occurs when the Cornell encoder is used for image data with more than 8 bits/sample.
by Marco Eichelberg
Wed, 2022-08-17, 14:07
Forum: DCMTK - Installation
Topic: TUTORIAL: Compile DCMTK for Apple Silicon (M1)
Replies: 1
Views: 2344

Re: TUTORIAL: Compile DCMTK for Apple Silicon (M1)

As a brief follow-up, the current development version of DCMTK available from our git repository compiles and runs on MacOS ARM "out of the box", without any modifications.
We have meanwhile integrated an M1 MacMini into our nightly build infrastructure to make sure it stays that way :wink:
by Marco Eichelberg
Wed, 2022-08-17, 14:03
Forum: DCMTK - General
Topic: Cybersecurity issues reported for DCMTK
Replies: 6
Views: 362

Re: Cybersecurity issues reported for DCMTK

Sorry for the late reply. The attack vector was indeed that a malicious attacker could send a DICOM image with an invalid SOP Instance UID, which would be used as part of a filename. Under certain conditions (including something like "../../../../" in the UID) storescp can be manipulated to store th...
by Marco Eichelberg
Wed, 2022-08-17, 13:47
Forum: DCMTK - General
Topic: MPEG-4 to DICOM File?
Replies: 5
Views: 298

Re: MPEG-4 to DICOM File?

This is entirely possible with DCMTK, there is just no command line tool to do it.

With regard to using the various classes for compressed images, see Image2Dcm::insertEncapsulatedPixelDataFirstFrame() (file dcmdata/libi2d/i2d.cc) as an example.
by Marco Eichelberg
Wed, 2022-08-17, 13:43
Forum: DCMTK - General
Topic: how to download dicom from PACS?
Replies: 1
Views: 96

Re: how to download dicom from PACS?

Three issues in your example: DICOM tags contain a comma, not a period character: 0008,0052 You need to specify the port under which movescu will accept incoming images using the --port option In your PACS server(!), you need to configure PACSAET as an application entity that can receive images, spe...
by Marco Eichelberg
Wed, 2022-08-17, 13:38
Forum: DCMTK - General
Topic: on the fly (de)compression
Replies: 2
Views: 148

Re: on the fly (de)compression

The call to chooseRepresentation() causes DCMTK to decompress the image and to then discard the JPEG compressed original. This explains why sending in JPEG lossless fails after decompression. The problem is that in some cases decompression requires changes in the main dataset (e.g. Photometric Inter...
by Marco Eichelberg
Tue, 2022-06-14, 11:00
Forum: DCMTK - General
Topic: Static Linking DCMTK
Replies: 5
Views: 437

Re: Static Linking DCMTK

You might have noticed that with DCMTK 3.6.7 we have introduced "DCMTK_PORTABLE_LINUX_BINARIES" as another build option. This tries to link all libraries except glibc statically and should result in fairly portable binaries.
by Marco Eichelberg
Thu, 2022-06-09, 15:21
Forum: DCMTK - General
Topic: Static Linking DCMTK
Replies: 5
Views: 437

Re: Static Linking DCMTK

Also, what does the DCMTK_LINK_STATIC do? DCMTK_LINK_STATIC tries to create truly static DCMTK command line tool binaries, i.e. it calls gcc -static . Such binaries are not ELF binaries anymore and depend on no shared object (i.e. just require a compatible kernel), but unfortunately under Linux the...
by Marco Eichelberg
Tue, 2022-05-31, 12:06
Forum: DCMTK - General
Topic: Problem with Pixel Representation while creating a Dicom
Replies: 8
Views: 561

Re: Problem with Pixel Representation while creating a Dicom

You don't need to register an encoder, since you are not using that.
Use new DcmPixelSequence(DCM_PixelSequenceTag) and new DcmPixelItem(DCM_PixelItemTag).
Don't forget the call to DcmPixelData::putOriginalRepresentation().
by Marco Eichelberg
Mon, 2022-05-30, 14:39
Forum: DCMTK - General
Topic: DCMTK TLS with Windows Security Support Provider Interface (SSPI)
Replies: 1
Views: 169

Re: DCMTK TLS with Windows Security Support Provider Interface (SSPI)

In principle, I see no reason why this should be impossible. The dcmtls module was designed to exhibit as little of the OpenSSL API as possible to the rest of the toolkit (specifically, to the dcmnet library), exactly for this purpose: to simplify an alternative implementation not based on OpenSSL. ...
by Marco Eichelberg
Wed, 2022-05-25, 17:32
Forum: DCMTK - General
Topic: create one Dicom file from multiple images
Replies: 14
Views: 17218

Re: create one Dicom file from multiple images

There is no command line tool in DCMTK that would allow you to do this, but the underlying class library contains everything needed to implement such functionality. Look at the following sample code, which expects a DICOM dataset that has been already loaded ( DcmFileFormat::loadFile() ) and overwri...
by Marco Eichelberg
Wed, 2022-05-25, 17:25
Forum: DCMTK - General
Topic: Problem with Pixel Representation while creating a Dicom
Replies: 8
Views: 561

Re: Problem with Pixel Representation while creating a Dicom

The problem is related to the way you are inserting the pixel data into the dataset. Class DcmPixelData, which is used for this attribute, is able to manage both an uncompressed and one or more compressed versions of the same bitmap in memory at the same time. A call to putAndInsertUint8Array() will...