Rescale slope/intercept on MONOCHROME1

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
paolom
Posts: 169
Joined: Tue, 2008-09-16, 15:02

Rescale slope/intercept on MONOCHROME1

#1 Post by paolom »

Hi,
I've a DICOM image CR with this value:

Code: Select all


# Dicom-File-Format

# Dicom-Meta-Information-Header
# Used TransferSyntax: Little Endian Explicit
(0002,0000) UL 214                                      #   4, 1 FileMetaInformationGroupLength
(0002,0001) OB 00\01                                    #   2, 1 FileMetaInformationVersion
(0002,0002) UI =ComputedRadiographyImageStorage         #  26, 1 MediaStorageSOPClassUID
(0002,0003) UI [1.2.392.200036.9125.9.0.286240385.528292096.429498184] #  54, 1 MediaStorageSOPInstanceUID
(0002,0010) UI =LittleEndianExplicit                    #  20, 1 TransferSyntaxUID
(0002,0012) UI [1.2.276.0.7230010.3.0.3.6.0]            #  28, 1 ImplementationClassUID
(0002,0013) SH [OFFIS_DCMTK_360]                        #  16, 1 ImplementationVersionName
(0002,0016) AE [FCR-CSL]                                #   8, 1 SourceApplicationEntityTitle

# Dicom-Data-Set
# Used TransferSyntax: Little Endian Explicit
(0008,0000) UL 460                                      #   4, 1 GenericGroupLength
(0008,0005) CS [ISO_IR 100]                             #  10, 1 SpecificCharacterSet
(0008,0008) CS [DERIVED\PRIMARY\POST_PROCESSED\\\\\\100000] #  42, 9 ImageType
(0008,0016) UI =ComputedRadiographyImageStorage         #  26, 1 SOPClassUID
(0008,0018) UI [1.2.392.200036.9125.9.0.286240385.528292096.429498184] #  54, 1 SOPInstanceUID
(0008,0020) DA [20130801]                               #   8, 1 StudyDate
(0008,0021) DA [20130801]                               #   8, 1 SeriesDate
(0008,0022) DA [20130801]                               #   8, 1 AcquisitionDate
(0008,0023) DA [20130801]                               #   8, 1 ContentDate
(0008,0030) TM [113231.000]                             #  10, 1 StudyTime
(0008,0031) TM [113237.000]                             #  10, 1 SeriesTime
(0008,0032) TM [113237.343]                             #  10, 1 AcquisitionTime
(0008,0033) TM [113526.031]                             #  10, 1 ContentTime
(0008,0050) SH [182795]                                 #   6, 1 AccessionNumber
(0008,0060) CS [CR]                                     #   2, 1 Modality
(0008,0070) LO [xxxx]                   		   #  20, 1 Manufacturer
(0008,0080) LO [xxxx]                        		   #  16, 1 InstitutionName
(0008,0090) PN (no value available)                     #   0, 0 ReferringPhysicianName
(0008,1010) SH [RU0]                                    #   4, 1 StationName
(0008,1030) LO [RX BACINO]                              #  10, 1 StudyDescription
(0008,2111) ST [G1.1O#0.60-0.03,MCT1.0AJ0.3,C*1.0*1.0]  #  38, 1 DerivationDescription
(0009,0000) UL 224                                      #   4, 1 PrivateGroupLength
(0009,0010) LO [FDMS 1.0]                               #   8, 1 PrivateCreator
(0009,1004) UN 46\45\44\44\69\63\6f\6d\53\43\50\20      #  12, 1 Unknown Tag & Data
(0009,1005) UN 11\0f\ae\81\1f\7d\19\00\19\99\9f\48      #  12, 1 Unknown Tag & Data
(0009,1006) UN 00\00\00\00\00\00\00\00\00\00\00\00      #  12, 1 Unknown Tag & Data
(0009,1008) UN 00\00\00\00                              #   4, 1 Unknown Tag & Data
(0009,1009) UN 00\00\00\00                              #   4, 1 Unknown Tag & Data
(0009,100c) UN 11\0f\ae\81\1f\7d\19\00\19\99\9f\48      #  12, 1 Unknown Tag & Data
(0009,1010) UN 45\33                                    #   2, 1 Unknown Tag & Data
(0009,1080) UN (no value available)                     #   0, 1 Unknown Tag & Data
(0009,1090) UN (no value available)                     #   0, 1 Unknown Tag & Data
(0009,1092) UN (no value available)                     #   0, 1 Unknown Tag & Data
(0009,10f0) UN 30\31                                    #   2, 1 Unknown Tag & Data
(0009,10f1) UN 31\30\30\30                              #   4, 1 Unknown Tag & Data
(0010,0000) UL 94                                       #   4, 1 GenericGroupLength
(0010,0010) PN [xxxx]                        		   #  16, 1 PatientName
(0010,0020) LO [56215]                                  #   6, 1 PatientID
(0010,0030) DA [19760609]                               #   8, 1 PatientBirthDate
(0010,0040) CS [F]                                      #   2, 1 PatientSex
(0010,1010) AS [037Y]                                   #   4, 1 PatientAge
(0010,4000) LT [RX BACINO]                              #  10, 1 PatientComments
(0018,0000) UL 126                                      #   4, 1 GenericGroupLength
(0018,0010) LO (no value available)                     #   0, 0 ContrastBolusAgent
(0018,0015) CS [PELVIS]                                 #   6, 1 BodyPartExamined
(0018,1004) LO [a46476340c]                             #  10, 1 PlateID
(0018,1164) DS [0.10\0.10]                              #  10, 2 ImagerPixelSpacing
(0018,1400) LO [BACINO GENERALE]                        #  16, 1 AcquisitionDeviceProcessingDescription
(0018,1401) LO [0500]                                   #   4, 1 AcquisitionDeviceProcessingCode
(0018,1508) CS [NONE]                                   #   4, 1 PositionerType
(0018,5101) CS (no value available)                     #   0, 0 ViewPosition
(0018,6000) DS [200]                                    #   4, 1 Sensitivity
(0019,0000) UL 138                                      #   4, 1 PrivateGroupLength
(0019,0010) LO [FDMS 1.0]                               #   8, 1 PrivateCreator
(0019,1015) UN (no value available)                     #   0, 1 Unknown Tag & Data
(0019,1032) UN (no value available)                     #   0, 1 Unknown Tag & Data
(0019,1040) UN 52\54                                    #   2, 1 Unknown Tag & Data
(0019,1050) UN 30\20                                    #   2, 1 Unknown Tag & Data
(0019,1060) UN (no value available)                     #   0, 1 Unknown Tag & Data
(0019,1080) UN 30\30                                    #   2, 1 Unknown Tag & Data
(0019,1081) UN 30\20                                    #   2, 1 Unknown Tag & Data
(0019,1090) UN 50\45\4c\56\49\53                        #   6, 1 Unknown Tag & Data
(0019,1091) UN (no value available)                     #   0, 1 Unknown Tag & Data
(0020,0000) UL 184                                      #   4, 1 GenericGroupLength
(0020,000d) UI [1.2.392.200036.9125.2.251532572159.64720985450.2592104] #  54, 1 StudyInstanceUID
(0020,000e) UI [1.2.392.200036.9125.3.251532572159.64720985450.2592105] #  54, 1 SeriesInstanceUID
(0020,0010) SH (no value available)                     #   0, 0 StudyID
(0020,0011) IS [1001]                                   #   4, 1 SeriesNumber
(0020,0012) IS [032]                                    #   4, 1 AcquisitionNumber
(0020,0013) IS [1001]                                   #   4, 1 InstanceNumber
(0020,0020) CS (no value available)                     #   0, 0 PatientOrientation
(0020,0060) CS (no value available)                     #   0, 0 Laterality
(0021,0000) UL 92                                       #   4, 1 PrivateGroupLength
(0021,0010) LO [FDMS 1.0]                               #   8, 1 PrivateCreator
(0021,1010) UN 41\30\33\32                              #   4, 1 Unknown Tag & Data
(0021,1030) UN 20\20                                    #   2, 1 Unknown Tag & Data
(0021,1040) UN 30\31                                    #   2, 1 Unknown Tag & Data
(0021,1050) UN 30\31\30\30\30\30\30\30                  #   8, 1 Unknown Tag & Data
(0021,1080) UN (no value available)                     #   0, 1 Unknown Tag & Data
(0025,0000) UL 58                                       #   4, 1 PrivateGroupLength
(0025,0010) LO [FDMS 1.0]                               #   8, 1 PrivateCreator
(0025,1010) UN c8\00                                    #   2, 1 Unknown Tag & Data
(0025,1011) UN 00\00                                    #   2, 1 Unknown Tag & Data
(0025,1012) UN c8\00                                    #   2, 1 Unknown Tag & Data
(0028,0000) UL 148                                      #   4, 1 GenericGroupLength
(0028,0002) US 1                                        #   2, 1 SamplesPerPixel
(0028,0004) CS [MONOCHROME1]                            #  12, 1 PhotometricInterpretation
(0028,0010) US 3520                                     #   2, 1 Rows
(0028,0011) US 4280                                     #   2, 1 Columns
(0028,0030) DS [0.10\0.10]                              #  10, 2 PixelSpacing
(0028,0100) US 16                                       #   2, 1 BitsAllocated
(0028,0101) US 10                                       #   2, 1 BitsStored
(0028,0102) US 9                                        #   2, 1 HighBit
(0028,0103) US 0                                        #   2, 1 PixelRepresentation
(0028,1052) DS [0]                                      #   2, 1 RescaleIntercept
(0028,1053) DS [1]                                      #   2, 1 RescaleSlope
(0028,1054) LO [US]                                     #   2, 1 RescaleType
(0028,2110) CS [00]                                     #   2, 1 LossyImageCompression
(0029,0000) UL 88                                       #   4, 1 PrivateGroupLength
(0029,0010) LO [FDMS 1.0]                               #   8, 1 PrivateCreator
(0029,1020) UN 30\30\31\20                              #   4, 1 Unknown Tag & Data
(0029,1030) UN 31\44                                    #   2, 1 Unknown Tag & Data
(0029,1034) UN 64\00                                    #   2, 1 Unknown Tag & Data
(0029,1044) UN 4b\32                                    #   2, 1 Unknown Tag & Data
(0029,1050) UN 30\30                                    #   2, 1 Unknown Tag & Data
(0032,0000) UL 16                                       #   4, 1 GenericGroupLength
(0032,1033) LO (no value available)                     #   0, 0 RequestingService
(0032,4000) LT (no value available)                     #   0, 0 RETIRED_StudyComments
(2010,0000) UL 74                                       #   4, 1 GenericGroupLength
(2010,0010) ST [STANDARD\1,1]                           #  12, 1 ImageDisplayFormat
(2010,0030) CS [CR00]                                   #   4, 1 AnnotationDisplayFormatID
(2010,0040) CS [LANDSCAPE]                              #  10, 1 FilmOrientation
(2010,0100) CS [BLACK]                                  #   6, 1 BorderDensity
(2010,0140) CS [NO]                                     #   2, 1 Trim
(50f1,0000) UL 44                                       #   4, 1 PrivateGroupLength
(50f1,0010) LO [FDMS 1.0]                               #   8, 1 PrivateCreator
(50f1,1010) UN 31\30                                    #   2, 1 Unknown Tag & Data
(50f1,1020) UN 30\30                                    #   2, 1 Unknown Tag & Data
(7fe0,0000) UL 30131212                                 #   4, 1 ACR_NEMA_2C_VariablePixelDataGroupLength
(7fe0,0010) OW =./MP000001.0.raw                        # 30131200, 1 PixelData
I create the DicomImage with

Code: Select all

DicomImage image = new DicomImage(dataSet, EXS_LittleEndianExplicit, rescaleSlope, rescaleIntercept, CIF_KeepYCbCrColorModel); 
but the image seems to be inverted.

Does the problem is to consider the rescale values? Why?

Thanks

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Rescale slope/intercept on MONOCHROME1

#2 Post by J. Riesmeier »

What is the value of "rescaleSlope" and "rescaleIntercept", and why are you specifying them manually?

paolom
Posts: 169
Joined: Tue, 2008-09-16, 15:02

Re: Rescale slope/intercept on MONOCHROME1

#3 Post by paolom »

As you can see from the dump the values are:

RescaleIntercept (0028,1052) is 0
RescaleSlope (0028,1053) is 1

I extract these values from the dicom dataset if presents and I use it on the DicomImage constructor.

It works for all the others DICOM Image.

What I'm wrong?

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Rescale slope/intercept on MONOCHROME1

#4 Post by J. Riesmeier »

As usual, reading the documentation helps :-)
NB: This constructor ignores the Photometric Interpretation stored in the DICOM dataset and always creates a MONOCHROME2 image - useful in combination with Presentation States.
So, I would suggest to use the standard constructor, either with filename or with pointer to the DICOM object.

paolom
Posts: 169
Joined: Tue, 2008-09-16, 15:02

Re: Rescale slope/intercept on MONOCHROME1

#5 Post by paolom »

So, what the mean of this constructor??

Code: Select all

DicomImage::DicomImage	(	DcmObject * 	object,
const E_TransferSyntax 	xfer,
const double 	slope,
const double 	intercept,
const unsigned long 	flags = 0,
const unsigned long 	fstart = 0,
const unsigned long 	fcount = 0	 
)	
how can I consider the rescale Slope/Intercept values?

J. Riesmeier
DCMTK Developer
Posts: 2506
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Rescale slope/intercept on MONOCHROME1

#6 Post by J. Riesmeier »

This constructor has been introduced to be used by then GSPS classes in dcmpstat (e.g. for DICOMscope). For the grayscale softcopy presentation state, the DICOM standard requires that the value of Photometric Interpretation is ignored and that the Rescale Slope/Intercept values from the GSPS object are used (rather than the ones from the image object).
how can I consider the rescale Slope/Intercept values?
For the standard constructors the following applies: Unless you use the flag CIF_IgnoreModalityTransformation, the Rescale Slope/Intercept values from the image are used (if present).

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest