Search found 1771 matches

by Michael Onken
Fri, 2020-01-24, 16:00
Forum: DCMTK - General
Topic: png to dicom
Replies: 12
Views: 59

Re: png to dicom

Great :) I consider the allocation in convert() a feature :) Since the parameter is a reference to a pointer, this is usually a sufficient note to the user that the method returns a new pointer for newly allocated memory. There is no reason to make it a reference if one does not return a new pointer...
by Michael Onken
Fri, 2020-01-24, 15:34
Forum: DCMTK - General
Topic: png to dicom
Replies: 12
Views: 59

Re: png to dicom

Please use the dataset/file format variant that I posted instead of yours,i.e. in principle DcmDataset *dataset = NULL; convert(...); DcmFileFormt fileformat(dataset); The convert() call returns a newly allocated dataset, and does not use the empty one (created by DcmFileFormat internally) that you ...
by Michael Onken
Fri, 2020-01-24, 14:32
Forum: DCMTK - General
Topic: png to dicom
Replies: 12
Views: 59

Re: png to dicom

Hi, do you actually feed your "dataset" into the "fileformat"? Otherwise you will write a file without dataset. See how it's done in img2dcm. Applied to your code this would be something like: Image2Dcm i2d; I2DOutputPlug *outPlug = new I2DOutputPlugSC(); I2DImgSource *inputPlug = new I2DJpegSource(...
by Michael Onken
Fri, 2020-01-24, 14:21
Forum: Other DICOM Tools
Topic: Empty AE in modality worklist query
Replies: 1
Views: 22

Re: Empty AE in modality worklist query

Hi, so you use wlmscpfs from DCMTK as your worklist server? There is no way to ignore the missing AE Title(s). Also, at least the Calling AE Title (what you noted as <modalityworklist>) is mapped by wlmscpfs to a directory where the worklist files are. I.e. if you do not get an AE Title there, it ca...
by Michael Onken
Fri, 2020-01-24, 14:00
Forum: DCMTK - General
Topic: png to dicom
Replies: 12
Views: 59

Re: png to dicom

Hi,

in saveFile(), use writeXfer (returned from convert()) instead of EXS_LittleEndianExplicit.

Best regards,
Michael
by Michael Onken
Thu, 2020-01-23, 15:18
Forum: DCMTK - General
Topic: png to dicom
Replies: 12
Views: 59

Re: png to dicom

Hi, yes, I think it should work in memory, though image2dcm and the underlying classes (as the input plugins) usually work on files and therefore the I2DJpegSource plugin might need adaptations (i.e. derive from it or in the worst case copy it and modify methods as necessary). The general flow is th...
by Michael Onken
Thu, 2020-01-23, 14:16
Forum: DCMTK - General
Topic: png to dicom
Replies: 12
Views: 59

Re: png to dicom

Hi, I dont know the PNG format in detail, but it's not possible to simply copy a PNG bitstream to a DICOM dataset's Pixel Data element and create a valie DICOM image from it. DCMTK (if this is part of your question?) has a tool called img2dcm that creates DICOM files from JPEG and BMP. Probably you ...
by Michael Onken
Tue, 2020-01-21, 16:16
Forum: DCMTK - General
Topic: DIMSE Failed to receive message
Replies: 3
Views: 67

Re: DIMSE Failed to receive message

Hi, for JPEG Lossless try storescu's option "-xs" and storescp's option "+xs". If you want to solve the problem (selecting the right transfer syntaxes) in general, use dcmsend instead of storescu and dcmrecv instead of storescp, which both re smart enough to select transfer syntaxes matching your fi...
by Michael Onken
Tue, 2020-01-21, 09:05
Forum: DCMTK - General
Topic: DIMSE Failed to receive message
Replies: 3
Views: 67

Re: DIMSE Failed to receive message

Hi,

could you use -d option on storescu and storescp and post the last few debug messages before the error?

Also, try dcmdump on the file to see whether DCMTK can generally parse it.

Best regards,
Michael
by Michael Onken
Tue, 2019-12-31, 13:43
Forum: DCMTK - General
Topic: How to insert PN Syntex in shell command
Replies: 3
Views: 147

Re: How to insert PN Syntex in shell command

Hi, thank you; I had a closer look and found the problem in your command line: The option +cn expects 3 strings, not a single one (see help output in pdf2dcm --help): +cn --concept-name [CSD] [CV] [CM]: string (default: empty) coded representation of document title defined scheme designator CSD, CV ...
by Michael Onken
Mon, 2019-12-23, 12:09
Forum: DCMTK - General
Topic: How to insert PN Syntex in shell command
Replies: 3
Views: 147

Re: How to insert PN Syntex in shell command

Did you try dcmdump to look for the patient name or a DICOM viewer? In the latter case, try using the correct syntax for DICOM Person Names and use quotes around the value, i.e. if Amithab is the given name, use: pdf2dcm +t Amithab +cn CSD +pn "Kumar^Amithab" +pi 6349 +pb 19701105 +ps M 1575007974_0...
by Michael Onken
Tue, 2019-12-17, 17:09
Forum: DCMTK - General
Topic: How can we add a new tag into DICOMDIR
Replies: 3
Views: 125

Re: How can we add a new tag into DICOMDIR

Yes, the return code is ok.

Probably you insert the data correctly but on main level, while you want to insert the tag in each item containing information for an image?

You should dump() the DICOMDIR and look whether the tags are there and if so, where.

Best,
Michael
by Michael Onken
Sun, 2019-12-15, 21:11
Forum: DCMTK - General
Topic: storescp: execution of command fails
Replies: 5
Views: 255

Re: storescp: execution of command fails

Alright, thanks for sharing the solution :)
by Michael Onken
Fri, 2019-12-13, 11:26
Forum: DCMTK - General
Topic: How can we add a new tag into DICOMDIR
Replies: 3
Views: 125

Re: How can we add a new tag into DICOMDIR

Hi, what do the "item.putAndInsertString()" methods return? e.g. do .... OFCondition result; result = item.putAndInsertString(PRV_PrivateElement1, "Some Text"); if (result.bad()) { std::cerr << result.text() << OFendl; } ... You could also try to print the item right after insertion for debugging pu...
by Michael Onken
Fri, 2019-12-13, 11:17
Forum: DCMTK - General
Topic: Does DCMTK having support of STOW-RS
Replies: 1
Views: 81

Re: Does DCMTK having support of STOW-RS

Dear Akshaybar Singh,

there is no STOW-RS support in DCMTK right now.

Best regards,
Michael