Commit 10c6a860 authored by Billy Amélie's avatar Billy Amélie
Browse files

Merge branch 'master' of https://gitlab.insa-rouen.fr/dbannier/projet_fr into AmelieBranch

parents e63402ce 5ee911c6
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/
.ipynb_checkpoints
.ipynb_checkpoints/*
.ipynb_checkpoints/
*/.ipynb_checkpoints/*
# IPython
......@@ -9,4 +10,5 @@ profile_default/
ipython_config.py
# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/
\ No newline at end of file
# git rm -r .ipynb_checkpoints/
%% Cell type:markdown id: tags:
https://pydicom.github.io/pydicom/stable/tutorials/dataset_basics.html
Utile pour le rapport:
http://www.dimitripianeta.fr/documents/traitements/comprendre%20les%20m%C3%A9tadonn%C3%A9es%20.pdf
%% Cell type:code id: tags:
``` python
input_directory='../osic-pulmonary-fibrosis-progression'
patient = 'ID00419637202311204720264'
image = '10.dcm'
path = f'{input_directory}/train/{patient}/{image}'
```
%% Cell type:code id: tags:
``` python
import pydicom
ds = pydicom.filereader.dcmread(path)
ds
```
%%%% Output: execute_result
Dataset.file_meta -------------------------------
(0002, 0000) File Meta Information Group Length UL: 200
(0002, 0001) File Meta Information Version OB: b'\x00\x01'
(0002, 0002) Media Storage SOP Class UID UI: CT Image Storage
(0002, 0003) Media Storage SOP Instance UID UI: 2.25.15591725989708101768360543306906204110
(0002, 0010) Transfer Syntax UID UI: Explicit VR Little Endian
(0002, 0012) Implementation Class UID UI: 1.2.276.0.7230010.3.0.3.6.1
(0002, 0013) Implementation Version Name SH: 'OSIRIX_361'
(0002, 0016) Source Application Entity Title AE: 'ANONYMOUS'
-------------------------------------------------
(0008, 0005) Specific Character Set CS: 'ISO_IR 100'
(0008, 0008) Image Type CS: ['ORIGINAL', 'PRIMARY', 'AXIAL']
(0008, 0018) SOP Instance UID UI: 2.25.15591725989708101768360543306906204110
(0008, 0060) Modality CS: 'CT'
(0008, 0070) Manufacturer LO: 'PACSGEAR'
(0008, 1090) Manufacturer's Model Name LO: 'LightSpeed VCT'
(0010, 0010) Patient's Name PN: 'ID00419637202311204720264'
(0010, 0020) Patient ID LO: 'ID00419637202311204720264'
(0010, 0040) Patient's Sex CS: ''
(0012, 0063) De-identification Method LO: 'Table;'
(0018, 0015) Body Part Examined CS: 'Chest'
(0018, 0050) Slice Thickness DS: "1.25"
(0018, 0060) KVP DS: "120.0"
(0018, 1110) Distance Source to Detector DS: "949.075012"
(0018, 1111) Distance Source to Patient DS: "541.0"
(0018, 1120) Gantry/Detector Tilt DS: "0.0"
(0018, 1130) Table Height DS: "197.0"
(0018, 1140) Rotation Direction CS: 'CW'
(0018, 1151) X-Ray Tube Current IS: "301"
(0018, 1170) Generator Power IS: "36000"
(0018, 1190) Focal Spot(s) DS: "0.7"
(0018, 1210) Convolution Kernel SH: 'BONEPLUS'
(0018, 5100) Patient Position CS: 'FFS'
(0020, 000d) Study Instance UID UI: 2.25.24142809421030670533829469959522337181
(0020, 000e) Series Instance UID UI: 2.25.72922870310959542985933229225637751168
(0020, 0010) Study ID SH: ''
(0020, 0013) Instance Number IS: "10"
(0020, 0020) Patient Orientation CS: ''
(0020, 0032) Image Position (Patient) DS: [-212.600, -170.700, -54.000]
(0020, 0037) Image Orientation (Patient) DS: [1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000]
(0020, 0052) Frame of Reference UID UI: 2.25.87733149435852076944786005695371983233
(0020, 1040) Position Reference Indicator LO: 'SN'
(0020, 1041) Slice Location DS: "-54.0"
(0028, 0002) Samples per Pixel US: 1
(0028, 0004) Photometric Interpretation CS: 'MONOCHROME2'
(0028, 0010) Rows US: 1100
(0028, 0011) Columns US: 888
(0028, 0030) Pixel Spacing DS: [0.820312, 0.820312]
(0028, 0100) Bits Allocated US: 16
(0028, 0101) Bits Stored US: 16
(0028, 0102) High Bit US: 15
(0028, 0103) Pixel Representation US: 1
(0028, 0120) Pixel Padding Value US: 63536
(0028, 1050) Window Center DS: "-500.0"
(0028, 1051) Window Width DS: "-1500.0"
(0028, 1052) Rescale Intercept DS: "0.0"
(0028, 1053) Rescale Slope DS: "1.0"
(0028, 1054) Rescale Type LO: 'HU'
(7fe0, 0010) Pixel Data OW: Array of 1953600 elements
%% Cell type:code id: tags:
``` python
elem = ds[0x0018, 0x1111]
elem
```
%%%% Output: execute_result
(0018, 1111) Distance Source to Patient DS: "541.0"
%% Cell type:code id: tags:
``` python
elem.keyword
```
%%%% Output: execute_result
'DistanceSourceToPatient'
%% Cell type:code id: tags:
``` python
elem.value
```
%%%% Output: execute_result
"541.0"
%% Cell type:code id: tags:
``` python
ds['DistanceSourceToPatient']
```
%%%% Output: execute_result
(0018, 1111) Distance Source to Patient DS: "541.0"
%% Cell type:code id: tags:
``` python
ds.DistanceSourceToPatient
```
%%%% Output: execute_result
"541.0"
%% Cell type:code id: tags:
``` python
```
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
%% Cell type:markdown id: tags:
https://pydicom.github.io/pydicom/stable/tutorials/dataset_basics.html
Utile pour le rapport:
http://www.dimitripianeta.fr/documents/traitements/comprendre%20les%20m%C3%A9tadonn%C3%A9es%20.pdf
%% Cell type:code id: tags:
``` python
input_directory='../osic-pulmonary-fibrosis-progression'
patient = 'ID00419637202311204720264'
image = '10.dcm'
path = f'{input_directory}/train/{patient}/{image}'
```
%% Cell type:code id: tags:
``` python
import pydicom
ds = pydicom.filereader.dcmread(path)
ds
```
%%%% Output: execute_result
Dataset.file_meta -------------------------------
(0002, 0000) File Meta Information Group Length UL: 200
(0002, 0001) File Meta Information Version OB: b'\x00\x01'
(0002, 0002) Media Storage SOP Class UID UI: CT Image Storage
(0002, 0003) Media Storage SOP Instance UID UI: 2.25.15591725989708101768360543306906204110
(0002, 0010) Transfer Syntax UID UI: Explicit VR Little Endian
(0002, 0012) Implementation Class UID UI: 1.2.276.0.7230010.3.0.3.6.1
(0002, 0013) Implementation Version Name SH: 'OSIRIX_361'
(0002, 0016) Source Application Entity Title AE: 'ANONYMOUS'
-------------------------------------------------
(0008, 0005) Specific Character Set CS: 'ISO_IR 100'
(0008, 0008) Image Type CS: ['ORIGINAL', 'PRIMARY', 'AXIAL']
(0008, 0018) SOP Instance UID UI: 2.25.15591725989708101768360543306906204110
(0008, 0060) Modality CS: 'CT'
(0008, 0070) Manufacturer LO: 'PACSGEAR'
(0008, 1090) Manufacturer's Model Name LO: 'LightSpeed VCT'
(0010, 0010) Patient's Name PN: 'ID00419637202311204720264'
(0010, 0020) Patient ID LO: 'ID00419637202311204720264'
(0010, 0040) Patient's Sex CS: ''
(0012, 0063) De-identification Method LO: 'Table;'
(0018, 0015) Body Part Examined CS: 'Chest'
(0018, 0050) Slice Thickness DS: "1.25"
(0018, 0060) KVP DS: "120.0"
(0018, 1110) Distance Source to Detector DS: "949.075012"
(0018, 1111) Distance Source to Patient DS: "541.0"
(0018, 1120) Gantry/Detector Tilt DS: "0.0"
(0018, 1130) Table Height DS: "197.0"
(0018, 1140) Rotation Direction CS: 'CW'
(0018, 1151) X-Ray Tube Current IS: "301"
(0018, 1170) Generator Power IS: "36000"
(0018, 1190) Focal Spot(s) DS: "0.7"
(0018, 1210) Convolution Kernel SH: 'BONEPLUS'
(0018, 5100) Patient Position CS: 'FFS'
(0020, 000d) Study Instance UID UI: 2.25.24142809421030670533829469959522337181
(0020, 000e) Series Instance UID UI: 2.25.72922870310959542985933229225637751168
(0020, 0010) Study ID SH: ''
(0020, 0013) Instance Number IS: "10"
(0020, 0020) Patient Orientation CS: ''
(0020, 0032) Image Position (Patient) DS: [-212.600, -170.700, -54.000]
(0020, 0037) Image Orientation (Patient) DS: [1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000]
(0020, 0052) Frame of Reference UID UI: 2.25.87733149435852076944786005695371983233
(0020, 1040) Position Reference Indicator LO: 'SN'
(0020, 1041) Slice Location DS: "-54.0"
(0028, 0002) Samples per Pixel US: 1
(0028, 0004) Photometric Interpretation CS: 'MONOCHROME2'
(0028, 0010) Rows US: 1100
(0028, 0011) Columns US: 888
(0028, 0030) Pixel Spacing DS: [0.820312, 0.820312]
(0028, 0100) Bits Allocated US: 16
(0028, 0101) Bits Stored US: 16
(0028, 0102) High Bit US: 15
(0028, 0103) Pixel Representation US: 1
(0028, 0120) Pixel Padding Value US: 63536
(0028, 1050) Window Center DS: "-500.0"
(0028, 1051) Window Width DS: "-1500.0"
(0028, 1052) Rescale Intercept DS: "0.0"
(0028, 1053) Rescale Slope DS: "1.0"
(0028, 1054) Rescale Type LO: 'HU'
(7fe0, 0010) Pixel Data OW: Array of 1953600 elements
%% Cell type:code id: tags:
``` python
elem = ds[0x0018, 0x1111]
elem
```
%%%% Output: execute_result
(0018, 1111) Distance Source to Patient DS: "541.0"
%% Cell type:code id: tags:
``` python
elem.keyword
```
%%%% Output: execute_result
'DistanceSourceToPatient'
%% Cell type:code id: tags:
``` python
elem.value
```
%%%% Output: execute_result
"541.0"
%% Cell type:code id: tags:
``` python
ds['DistanceSourceToPatient']
```
%%%% Output: execute_result
(0018, 1111) Distance Source to Patient DS: "541.0"
%% Cell type:code id: tags:
``` python
ds.DistanceSourceToPatient
```
%%%% Output: execute_result
"541.0"
%% Cell type:code id: tags:
``` python
```
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment