Search found 1444 matches

by Marco Eichelberg
Sun, 2023-12-24, 18:16
Forum: DCMTK - General
Topic: Questions on DCM File TAG Modification and LNK2019 Error
Replies: 7
Views: 8983

Re: Questions on DCM File TAG Modification and LNK2019 Error

Also, I changed the DCM_SourceApplicationEntityTitle with metaInfo, but it still doesn't work. Check the API documentation for DcmFileFormat::writeFile() at https://support.dcmtk.org/docs/classDcmFileFormat.html. By default, the content of the meta-header is discarded and a new meta-header is creat...
by Marco Eichelberg
Sun, 2023-12-24, 18:11
Forum: DCMTK - General
Topic: error handling with storescu
Replies: 3
Views: 4847

Re: error handling with storescu

storescu will return a nonzero return code if anything went wrong. You can use that to determine that the files should not be deleted yet, but the return code as such will not tell you what exactly went wrong or which image was not fully transmitted. Furthermore, running storescu with "sudo&quo...
by Marco Eichelberg
Mon, 2023-12-18, 16:40
Forum: DCMTK - General
Topic: Questions on DCM File TAG Modification and LNK2019 Error
Replies: 7
Views: 8983

Re: Questions on DCM File TAG Modification and LNK2019 Error

Concerning your first question: (0002,0016) Source Application Entity Title is an attribute that must only appear in the metaheader, never in the main dataset - it is forbidden there. Try writing it to the metaheader instead of the main dataset. Concerning the second question: If you are compiling w...
by Marco Eichelberg
Sat, 2023-12-09, 16:32
Forum: DCMTK - General
Topic: PhotometricInterpretation Conversion
Replies: 1
Views: 4427

Re: PhotometricInterpretation Conversion

I am not aware of any library that would support conversion of color models (PhotometricInterpretation) from any to any. This also does not make too much sense: For display on a monitor, you always need RGB, because that is how screens work Palette Color is essentially a space-efficient encoding for...
by Marco Eichelberg
Thu, 2023-11-23, 13:23
Forum: DCMTK - General
Topic: Windows port is not immediately released after ASC_dropNetwork
Replies: 2
Views: 3932

Re: Windows port is not immediately released after ASC_dropNetwork

By default, in all operating systems a closed listen socket will be kept in the TIME_WAIT state by the operating system for some time, in order to "catch" packets that were sent to that socket and have not yet arrived. On Posix systems (such as Linux), DCMTK explicitly disables this delay ...
by Marco Eichelberg
Thu, 2023-11-23, 12:41
Forum: DCMTK - General
Topic: FindSCU Chinese Unicode problem
Replies: 12
Views: 75311

Re: FindSCU Chinese Unicode problem

If you want DCMTK to convert character sets, then you need to compile it with one of the character set conversion libraries supported, i.e. GNU libiconv or ICU.
by Marco Eichelberg
Thu, 2023-11-23, 12:36
Forum: DCMTK - General
Topic: Large dicom files
Replies: 12
Views: 30016

Re: Large dicom files

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%. Th...
by Marco Eichelberg
Tue, 2023-11-21, 14:25
Forum: DCMTK - General
Topic: Large dicom files
Replies: 12
Views: 30016

Re: Large dicom files

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 t...
by Marco Eichelberg
Tue, 2023-11-21, 13:48
Forum: DCMTK - General
Topic: Transfer syntax conversion
Replies: 3
Views: 4550

Re: Transfer syntax conversion

The problem with this image file is that it is compressed with JPEG 2000, and cannot be decompressed. In compressed form, the pixel data already allocates about 3 GBytes of data (17444 frames of 512x512 color pixels). In decompressed form, the image would be 12.8 GBytes large, but uncompressed DICOM...
by Marco Eichelberg
Tue, 2023-11-14, 09:21
Forum: DCMTK - General
Topic: Large dicom files
Replies: 12
Views: 30016

Re: Large dicom files

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...
by Marco Eichelberg
Tue, 2023-10-31, 12:09
Forum: DCMTK - General
Topic: Difference in ImageStatus after processing dicom file using dcmtk library
Replies: 16
Views: 16358

Re: Difference in ImageStatus after processing dicom file using dcmtk library

I have looked at the test image you provided. Due to the file size, you simply cannot decompress it, because the decompressed pixel data element would be larger than 4 GBytes, the upper limit for (7fe0,0010) Pixel Data in uncompressed format. You can, however, use DcmElement::getUncompressedFrame() ...
by Marco Eichelberg
Sat, 2023-09-30, 15:03
Forum: DCMTK - General
Topic: Compile dcmtk
Replies: 3
Views: 5090

Re: Compile dcmtk

I presume that you are working on Linux. The DCMTK build scripts on Linux expect pre-compiled developer versions of the external libraries to be available before CMake is run. For all of these libraries, official development packages exist on most Linux distributions, e.g. on Debian/Ubuntu, you just...
by Marco Eichelberg
Mon, 2023-09-18, 10:19
Forum: DCMTK - General
Topic: storescp .tmp file during receive and rename to dcm
Replies: 2
Views: 2086

Re: storescp .tmp file during receive and rename to dcm

You could use the --exec-on-reception command line option to rename the incoming files after the receive process is complete. As an example, the following command line (for Linux) will cause storescp to append a ".dcm" filename extension only once a file has been completely received and wr...
by Marco Eichelberg
Fri, 2023-09-15, 17:11
Forum: DCMTK - General
Topic: How to change TransferSyntaxUID
Replies: 2
Views: 2666

Re: How to change TransferSyntaxUID

On the other hand, if this is just a single file you are trying to fix, I would use dcmdump +W and dump2dcm to convert the dataset to a text file, and back, while keeping the pixel data in the binary file created by the dcmdump +W option.
by Marco Eichelberg
Fri, 2023-09-15, 17:09
Forum: DCMTK - General
Topic: How to change TransferSyntaxUID
Replies: 2
Views: 2666

Re: How to change TransferSyntaxUID

I don't think that changing the UID in the metaheader is a function that is foreseen in DCMTK because the transfer syntax value is directly bound to the encoding used, i.e. if you change transfer syntax to MPEG4, then DCMTK will look for an encoder module that would convert uncompressed pixel data t...