Search found 1813 matches

by Michael Onken
Thu, 2019-10-24, 08:42
Forum: DCMTK - General
Topic: dcmodify -if
Replies: 3
Views: 1283

Re: dcmodify -if

Hi, the -if option reads the value from a file, BUT it assumes that the whole file is the new value, i.e the file does not necessarily have to be a DICOM file (or almost never is I guess). So you could create a text file with the desired value of Accession Number inside and use that for -if. This is...
by Michael Onken
Wed, 2019-10-23, 12:55
Forum: DCMTK - General
Topic: Newbie questions on DcmFileFormat and DcmInputStream
Replies: 2
Views: 1050

Re: Newbie questions on DcmFileFormat and DcmInputStream

Hi Daniel, 1. Is there a way to read a file really lazy? It seems DcmFileFormat::read and DcmFileFormat::loadFile reads more than just the header. DCMTK automatically does lazy loading in terms of not loading all data (element values) into memory. The decision whether to load an element's value into...
by Michael Onken
Mon, 2019-10-14, 20:05
Forum: DCMTK - General
Topic: Which library contains a function to dump information of a file? in c, something similar to dcmdump
Replies: 5
Views: 1386

Re: Which library contains a function to dump information of a file? in c, something similar to dcmdump

Hi, I don't now std::filebuf, but can't you just do: OFFilename f = ":\\Users\\User\\Documents\\test.txt"; // or simply: OFString f = ... OFCondition cond; cond = dataset.loadFile(f); if (cond.bad()) std::cerr << "Cannot load file " << f << ": " << cond.text() << std::endl; Also your dataset looks k...
by Michael Onken
Fri, 2019-10-11, 22:34
Forum: DCMTK - General
Topic: Which library contains a function to dump information of a file? in c, something similar to dcmdump
Replies: 5
Views: 1386

Re: Which library contains a function to dump information of a file? in c, something similar to dcmdump

Hi, there is no C but a C++ method that does the printing. It is called... print () :-) That's the method that is called by dcmdump (a good place to look for it, right? :idea: ). You can call print() on a DICOM file (DcmFileFormat) or any other class of the DCMTK dcmdata class hierarchy that is used...
by Michael Onken
Mon, 2019-09-30, 08:48
Forum: DCMTK - General
Topic: dcmodify questions.
Replies: 4
Views: 2516

Re: dcmodify questions.

Hi, until now I was quite optimistic that the current documentation of dcmodify is clear on that it works on single files. The word directory, recursive, or something that points into that direction is not found at all and all other DCMTK tools directly state if they support directories as an argume...
by Michael Onken
Fri, 2019-09-27, 11:24
Forum: DCMTK - General
Topic: dcmodify questions.
Replies: 4
Views: 2516

Re: dcmodify questions.

Hi, dcmodify does not work recursively. You cannot provide directory names as an argument. dcmodify handles every file separately, i.e. it does not care about existing DICOM hierarchies and if you tell it to create a new Series Instance UID (for example), it will do the job separately for each file ...
by Michael Onken
Fri, 2019-09-27, 10:19
Forum: DCMTK - General
Topic: StoreSCU cann't send dicom file with JPEG lossless compressi
Replies: 4
Views: 4336

Re: StoreSCU cann't send dicom file with JPEG lossless compressi

Hi,

As a general solution use dcmsend instead of storescu.

Best regards,
Michael
by Michael Onken
Thu, 2019-09-26, 16:31
Forum: DCMTK - General
Topic: Accurate resizing of ultrasounds using DICOM data
Replies: 1
Views: 909

Re: Accurate resizing of ultrasounds using DICOM data

Hi, Not really a DCMTK question, but.... Ultrasound pixels must not be quadratic but can be rectangular. I guess you already know that after looking at your images ;) This information is stored in DICOM attributes, too. Specifically look for Pixel Aspect Ratio and Pixel Spacing. They are part of the...
by Michael Onken
Wed, 2019-09-25, 08:02
Forum: DCMTK - General
Topic: Problem re-inserting 32 bit image to a DICOM file
Replies: 2
Views: 1074

Re: Problem re-inserting 32 bit image to a DICOM file

Hi Andrew, the DcmItem API that you are using offers calls for nearly all data types like Uint8, Uint32, OFString and so on. However, if the data type (VR) and the respective DCMTK class of the addressed attribute (e.g. Pixel Data) does not offer this call, the method will fail. For Pixel Data, you ...
by Michael Onken
Wed, 2019-09-11, 11:33
Forum: DCMTK - General
Topic: Windows bitmap (HBITMAP) to DICOM Image.
Replies: 1
Views: 991

Re: Windows bitmap (HBITMAP) to DICOM Image.

Hi,

no, right now there is no such class or method.

You could try to extend the existing img2dcm classes, e.g. add a related method to I2DBmpSource used by img2dcm to read from memory instead of a BMP file.

Best regards,
Michael
by Michael Onken
Thu, 2019-09-05, 09:06
Forum: DCMTK - General
Topic: findscu and radiopharmaceutical tag (0018,0031)
Replies: 3
Views: 1144

Re: findscu and radiopharmaceutical tag (0018,0031)

Hi, the tag you mention belongs to the PET image level, i.e. you have to query down with findscu to the IMAGE level. Also, it is inside the Radiopharmaceutical Information​ Sequence (0054,0016). I would try to query that Sequence with empty value with findscu (findscu -k IMAGE -k "(0054,0016)" -k SO...
by Michael Onken
Wed, 2019-08-21, 12:32
Forum: Third-Party DCMTK Applications
Topic: DCMSeg - error on createBinarySegmentation
Replies: 1
Views: 2412

Re: DCMSeg - error on createBinarySegmentation

Hi,

you have to fill in all values on the equipment struct, right now Manufacturer's Model Name is empty.

I will add a related hint in the API documentation of the create... methods.

Best regards,
Michael
by Michael Onken
Tue, 2019-08-13, 08:49
Forum: DCMTK - Installation
Topic: Build dcmtk-3.6.4 failed on Debian 10 with gcc-8.3.0
Replies: 2
Views: 1301

Re: Build dcmtk-3.6.4 failed on Debian 10 with gcc-8.3.0

Hi,

thank you for the report; the includes have been fixed meanwhile in commit 2d2f2 in December 2018.

Best regards,
Michael
by Michael Onken
Thu, 2019-08-08, 22:30
Forum: DCMTK - General
Topic: C-MOVE Query Failure with David Harvey's Testserver
Replies: 1
Views: 994

Re: C-MOVE Query Failure with David Harvey's Testserver

Hi, here it's probably the same (potential) issue as in your other thread: Your storage server is listening on the wrong port (in case of Dave Harvey's site your listen port must be the same port that you connect to on Dave's server, see documentation on his website) or is behind a firewall, or both...
by Michael Onken
Thu, 2019-08-08, 22:26
Forum: DCMTK - General
Topic: C-MOVE Response (Refused: OutOfResourcesSubOperations)
Replies: 1
Views: 1450

Re: C-MOVE Response (Refused: OutOfResourcesSubOperations)

Hi, An error during MOVE that refers to sub operations always refers to a problem on the second connection, i.e. the connection the PACS is starting to the storage server in order to send the images. Probably the storage server is behind a firewall, not configured correctly in the PACS (e.g. wrong p...