[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Acquiring Dental RVG on Linux



On Wed, Jan 05, 2022 at 03:19:12PM +0100, Karsten Hilbert wrote:
> > You may want to give CLAHE (Contrast Limited Adaptive Histogram Equalization) a try.
> >
> > It's implemented in OpenCV.
> 
> For what it's worth, here's code which so does:

Some updates:

- Using various OpenCV recipes or interactive tools like gimp, it's
  turning out to be hard to figure out exact processing needed. Most
  probably it's multiple such operations in a sequence.

- Tried neural network. It kind of works, but given the nature of data,
  there is no margin for error. Also it's a brute force approach. Tried
  just for the sake of it.

- Will possibly try an LUT now. Again not very elegant, but might be more
  accurate than neural net and less costly. But not sure, whether across
  images the lookup table would be uniform or not.

- Experimented with the relation between raw pixel value and vendor's
  final image. It becomes a function when 2 adjacent pixels (overall 9x9)
  matrix are considered together. But this was studied on only 1 image.

- Will need more images. Gathering raw data from usbmon every time will
  take a lot of time. Instead, found that the vendor software provides a
  way to export the raw image. This makes it easy to gather several images
  for study.

- Using pydicom package, found several details from the dicom header,
  placed by the vendor software.

Please do have a look at a sample header attached. If you find any fields
that may give any hints about the calibration or post processing that the
vendor software applies, please do highlight.

-- 
Mayuresh
Dataset.file_meta -------------------------------
(0002, 0000) File Meta Information Group Length  UL: 182
(0002, 0001) File Meta Information Version       OB: b'\x00\x01'
(0002, 0002) Media Storage SOP Class UID         UI: Digital Intra-Oral X-Ray Image Storage - For Processing
(0002, 0003) Media Storage SOP Instance UID      UI: 1.2.250.1.90.3.2561937961.1609603392.484
(0002, 0010) Transfer Syntax UID                 UI: JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])
(0002, 0012) Implementation Class UID            UI: 1.2.250.1.90.50.6.14.7.3
(0002, 0013) Implementation Version Name         SH: 'TW_6_14_7_3'
-------------------------------------------------
(0008, 0005) Specific Character Set              CS: 'ISO_IR 100'
(0008, 0008) Image Type                          CS: ['ORIGINAL', 'PRIMARY']
(0008, 0016) SOP Class UID                       UI: Digital Intra-Oral X-Ray Image Storage - For Processing
(0008, 0018) SOP Instance UID                    UI: 1.2.250.1.90.3.2561937961.1609603392.484
(0008, 0020) Study Date                          DA: '20210102'
(0008, 0021) Series Date                         DA: '20210102'
(0008, 0022) Acquisition Date                    DA: '20210102'
(0008, 0023) Content Date                        DA: '20210102'
(0008, 0030) Study Time                          TM: '170055'
(0008, 0031) Series Time                         TM: '170312'
(0008, 0032) Acquisition Time                    TM: '170312'
(0008, 0033) Content Time                        TM: '170312'
(0008, 0050) Accession Number                    SH: ''
(0008, 0060) Modality                            CS: 'IO'
(0008, 0068) Presentation Intent Type            CS: 'FOR PROCESSING'
(0008, 0070) Manufacturer                        LO: 'Carestream-Trophy'
(0008, 0080) Institution Name                    LO: ''
(0008, 0090) Referring Physician's Name          PN: 'winxp'
(0008, 1030) Study Description                   LO: ''
(0008, 1050) Performing Physician's Name         PN: 'winxp'
(0008, 1052)  Performing Physician Identification Sequence  0 item(s) ---- 
(0008, 1090) Manufacturer's Model Name           LO: 'RVG 5200'
(0008, 2218)  Anatomic Region Sequence  1 item(s) ---- 
   (0008, 0100) Code Value                          SH: 'T-11170'
   (0008, 0102) Coding Scheme Designator            SH: 'SNM3'
   (0008, 0104) Code Meaning                        LO: 'Maxilla'
   ---------
(0008, 2228)  Primary Anatomic Structure Sequence  1 item(s) ---- 
   (0008, 0100) Code Value                          SH: 'T-54210'
   (0008, 0102) Coding Scheme Designator            SH: 'SNM3'
   (0008, 0104) Code Meaning                        LO: 'Maxillary right third molar tooth'
   ---------
(0009, 0011) Private Creator                     LO: 'TROPHY'
(0009, 1105) Private tag data                    DS: '6.14.7.3'
(0009, 1109) Private tag data                    UL: 0
(0009, 110a) Private tag data                    UL: 1983368088
(0009, 1111) Private tag data                    US: 3
(0009, 1112) Private tag data                    SL: 0
(0009, 1115) Private tag data                    US: 0
(0009, 1117) Private tag data                    SL: 0
(0009, 1118) Private tag data                    SL: 0
(0009, 1119) Private tag data                    SL: 0
(0009, 111a) Private tag data                    CS: '00'
(0009, 111b) Private tag data                    DS: [0.019, 0.019]
(0009, 1131) Private tag data                    US: 1
(0009, 1133) Private tag data                    US: 96
(0009, 1134) Private tag data                    US: 4095
(0009, 11b0)  Private tag data  1 item(s) ---- 
   (0009, 0011) Private Creator                     LO: 'TROPHY'
   (0009, 11b1) Private tag data                    CS: 'SHARPNESS'
   (0009, 11b2) Private tag data                    US: 4
   (0009, 11b3) Private tag data                    SS: 3
   ---------
(0010, 0010) Patient's Name                      PN: 'XXXXXXXXXXXXXXXXXXX'
(0010, 0020) Patient ID                          LO: '7967857769788483927579686575926866926546828671926548484848484854'
(0010, 0030) Patient's Birth Date                DA: '19000101'
(0010, 0040) Patient's Sex                       CS: 'O'
(0018, 1000) Device Serial Number                LO: 'DJJC0023'
(0018, 1020) Software Versions                   LO: 'TW 6.14.7.3'
(0018, 1050) Spatial Resolution                  DS: "20.0"
(0018, 1164) Imager Pixel Spacing                DS: [0.019000, 0.019000]
(0018, 1200) Date of Last Calibration            DA: '20151002'
(0018, 1201) Time of Last Calibration            TM: '000000'
(0018, 1401) Acquisition Device Processing Code  LO: '17'
(0018, 1508) Positioner Type                     CS: 'NONE'
(0018, 1510) Positioner Primary Angle            DS: "0.0"
(0018, 7004) Detector Type                       CS: 'SCINTILLATOR'
(0018, 700a) Detector ID                         SH: ''
(0018, 702a) Detector Manufacturer Name          LO: 'Carestream-Trophy'
(0018, 702b) Detector Manufacturer's Model Name  LO: ''
(0018, 7030) Field of View Origin                DS: [0, 0]
(0018, 7032) Field of View Rotation              DS: "90.0"
(0018, 7034) Field of View Horizontal Flip       CS: 'NO'
(0020, 000d) Study Instance UID                  UI: 1.2.250.1.90.1.2561937961.1609603255.906
(0020, 000e) Series Instance UID                 UI: 1.2.250.1.90.2.2561937961.1609603392.484
(0020, 0010) Study ID                            SH: ''
(0020, 0011) Series Number                       IS: "1"
(0020, 0013) Instance Number                     IS: "1"
(0020, 0020) Patient Orientation                 CS: ['A', 'F']
(0020, 0062) Image Laterality                    CS: 'R'
(0020, 4000) Image Comments                      LT: ''
(0028, 0002) Samples per Pixel                   US: 1
(0028, 0004) Photometric Interpretation          CS: 'MONOCHROME2'
(0028, 0010) Rows                                US: 1168
(0028, 0011) Columns                             US: 1562
(0028, 0030) Pixel Spacing                       DS: [0.019000, 0.019000]
(0028, 0100) Bits Allocated                      US: 16
(0028, 0101) Bits Stored                         US: 12
(0028, 0102) High Bit                            US: 11
(0028, 0103) Pixel Representation                US: 0
(0028, 0301) Burned In Annotation                CS: 'NO'
(0028, 1040) Pixel Intensity Relationship        CS: 'LIN'
(0028, 1041) Pixel Intensity Relationship Sign   SS: -1
(0028, 1052) Rescale Intercept                   DS: "0.0"
(0028, 1053) Rescale Slope                       DS: "1.0"
(0028, 1054) Rescale Type                        LO: 'US'
(0028, 2110) Lossy Image Compression             CS: '00'
(0040, 0555)  Acquisition Context Sequence  0 item(s) ---- 
(0088, 0200)  Icon Image Sequence  1 item(s) ---- 
   (0028, 0002) Samples per Pixel                   US: 1
   (0028, 0004) Photometric Interpretation          CS: 'MONOCHROME2'
   (0028, 0010) Rows                                US: 116
   (0028, 0011) Columns                             US: 156
   (0028, 0100) Bits Allocated                      US: 8
   (0028, 0101) Bits Stored                         US: 8
   (0028, 0102) High Bit                            US: 7
   (0028, 0103) Pixel Representation                US: 0
   (7fe0, 0010) Pixel Data                          OB: Array of 18096 elements
   ---------
(2050, 0020) Presentation LUT Shape              CS: 'IDENTITY'
(7fe0, 0010) Pixel Data                          OB: Array of 1371108 elements

Reply to: