ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Create Dicom: problem with standard tags and default value

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PincoPallino Posted - Feb 07 2026 : 13:32:35
Hi,
using version 14.0.1.
I read a group of images with TImageEnMIO with
IoParams.BitsPerSample := 14;
IoParams.SamplesPerPixel := 1;
Bitmap.PixelFormat := ie16g;
then I save in Dicom format.
The problem is that the code in iemio.pas from line 5114 overwrites the BitsPerSample in Dicom image even if (like very often) it already has a different value.
The right values for this information would be the BitsStored for internal Dicom context.

And then, in file iedicom.pas
from line 8746
if (ctx.Params.SamplesPerPixel = 1) and (ctx.Params.BitsPerSample = 16) then
begin
// Gray scale 16 bit
ctx.Params.DICOM_Tags.SetTagString($0028, $0004, IEDICOM_PHOTOMETINTERPRET_MONOCHROME_ZEROISBLACK); // Photometric interpretation
ctx.Params.DICOM_Tags.SetTagNumeric($0028, $0100, 16); // Bits allocated
ctx.Params.DICOM_Tags.SetTagNumeric($0028, $0101, 16); // Bits stored
ctx.Params.DICOM_Tags.SetTagNumeric($0028, $0102, 15); // High bit

The values for BitAllocated and BitsStored are fixed and I haven't found a way to change. Except editing the dicom file directly.
This is a problem with medical images because having a wrong value leads to displaying ugly images.

It would be very usefull at least a new property in TIOParams
property DICOM_BitsStored: Integer read fDICOM_BitsStored write fDICOM_BitsStored;
Best regards
PP
9   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Feb 13 2026 : 14:18:48
Thanks Pinco,

Please email me to test the beta.

Nigel
Xequte Software
www.imageen.com
PincoPallino Posted - Feb 13 2026 : 02:29:18
Attached one image.

NB: File extension .dcm - this extension is not allowed
So change the extension!


attach/PincoPallino/202621322842_508_anon.DCM.zip
513.67 KB
xequte Posted - Feb 11 2026 : 21:15:50
Sorry Pinco, I was meaning a file created by a third party application, but it is OK, I have found one. Can you please email me to test a DICOM_BitsStored property.

Nigel
Xequte Software
www.imageen.com
PincoPallino Posted - Feb 11 2026 : 07:50:25
Hi Nigel,
the image I already sent you was recorded at 14 bit, the original was divided in some hundreds raw files that I loaded with TImageEnMIO than saved to Dicom and finally patched by hand the tags BitsStored and HighBit.
All (not many) images I've are near identical :-(
I will ask them to give me more material to work with.
PP
xequte Posted - Feb 11 2026 : 03:13:18
Hi Pinco

Can you forward me some samples where BitsPerSample it is internally recorded as 14?



Nigel
Xequte Software
www.imageen.com
PincoPallino Posted - Feb 10 2026 : 04:57:57
Hi Nigel,
the image is not invalid. It can be read by all software.
But saying that has 16 bit "used" when are only 14 or 12 create some problem in visualization.
It's an incorrect information!
xequte Posted - Feb 09 2026 : 15:31:01
Thanks, so at this time, ImageEn will always save ie16g images as SamplesPerPixel = 1 and BitsPerSample = 16. Are you seeing invalid images being created in this way?


Nigel
Xequte Software
www.imageen.com
PincoPallino Posted - Feb 09 2026 : 04:02:20
I sent you (using SwissTransfer) a Dicom.
xequte Posted - Feb 08 2026 : 14:02:02
Hi

We have been doing a lot of work with PixelFormats in our current beta. Can you forward us some of your BPP14 images so we can test this?

Nigel
Xequte Software
www.imageen.com