Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: \
C: drive is not shared. Please share it in Docker for Windows Settings.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.$ docker pull qiicr/dcmqi
Using default tag: latest
latest: Pulling from qiicr/dcmqi
38892065247a: Already exists
87b645034784: Pull complete
c72dd60da47b: Pull complete
01a53946a0eb: Pull complete
8bb93fc0167f: Pull complete
0cea230bb5f0: Pull complete
4b26feab9bc2: Pull complete
82b0182ab925: Pull complete
3af6a0b06e1b: Pull complete
Digest: sha256:af03e96c28b92d0108453da546217a38665404a2ec327478ce68eaef6b092b14
Status: Downloaded newer image for qiicr/dcmqi:latest$ docker run qiicr/dcmqi itkimage2segimage --help-v <HOST_DIR>:<CONTAINER_DIR>$ mkdir docker_test$ pwd
/Users/fedorov/docker_test
$ ls
pm-example-float.json
pm-example-float.nrrd
pm-example-slice.dcm$ docker run -v /Users/fedorov/docker_test:/tmp qiicr/dcmqi itkimage2paramap \
--inputImage /tmp/pm-example-float.nrrd \
--inputMetadata /tmp/pm-example-float.json \
--outputDICOM /tmp/docker_output_paramap.dcm \
--inputDICOM /tmp/pm-example-slice.dcm
Input image size: [256, 256, 20]
Directions: 0.999981 -0.00540165 -0.00298377
0.00480058 0.984755 -0.173879
0.00387751 0.173861 0.984763
(99QIICR,DWMPxxxxx1,Source image diffusion b-value): NUMERIC: 0, Units: (UCUM,s/mm2,seconds per square millimeter)), Float value(s): <none>
(99QIICR,DWMPxxxxx1,Source image diffusion b-value): NUMERIC: 1400, Units: (UCUM,s/mm2,seconds per square millimeter)), Float value(s): <none>
Saved parametric map as /tmp/docker_output_paramap.dcm



--inputImageLibraryDirectory <std::string>
Location of input DICOM Data to be used for populating image library.
See documentation.
--inputCompositeContextDirectory <std::string>
Location of input DICOM Data to be used for populating composite
context. See documentation.
--outputDICOM <std::string>
File name of the DICOM SR object that will store the result of the
conversion.
--inputMetadata <std::string>
JSON file that contains the list of mesurements and other meta data
items that can be specified by the user. See documentation for
details.{
"@schema": "https://raw.githubusercontent.com/qiicr/dcmqi/master/doc/schemas/sr-tid1500-schema.json#", "SeriesDescription": "Measurements",
"SeriesNumber": "1001",
"InstanceNumber": "1", "compositeContext": [
"liver.dcm"
],
"imageLibrary": [
"01.dcm",
"02.dcm",
"03.dcm"
], "observerContext": {
"ObserverType": "PERSON",
"PersonObserverName": "Reader1"
}, "VerificationFlag": "VERIFIED",
"CompletionFlag": "COMPLETE", "activitySession": "1",
"timePoint": "1", "Measurements": [
{
"MeasurementGroup": {
"TrackingIdentifier": "Measurements group 1",
"ReferencedSegment": 1,
"SourceSeriesForImageSegmentation": "1.2.392.200103.20080913.113635.2.2009.6.22.21.43.10.23431.1",
"segmentationSOPInstanceUID": "1.2.276.0.7230010.3.1.4.0.42154.1458337731.665796",
"Finding": {
"codeValue": "T-D0060",
"codingSchemeDesignator": "SRT",
"codeMeaning": "Organ"
}, "measurementItems": [
{
"value": "37.3289",
"quantity": {
"codeValue": "122713",
"codingSchemeDesignator": "DCM",
"codeMeaning": "Attenuation Coefficient"
},
"units": {
"codeValue": "[hnsf'U]",
"codingSchemeDesignator": "UCUM",
"codeMeaning": "Hounsfield unit"
},
"derivationModifier": {
"codeValue": "R-00317",
"codingSchemeDesignator": "SRT",
"codeMeaning": "Mean"
}
},bash DicomSRValidator.sh <sr_object>
dcmqi supports?dcmqi related to ...?dcmqi for patient care? --skip <int>
Skip empty slices while encoding segmentation image. By default, empty
slices will not be encoded, resulting in a smaller output file size.
(value: 1)
--inputImageList <std::vector<std::string>>
Comma-separated list of file names of the segmentation images in a
format readable by ITK (NRRD, NIfTI, MHD, etc.). Each of the
individual files can contain one or more labels (segments). Segments
from different files are allowed to overlap. See documentation for
details.
--inputDICOMDirectory <std::string>
Directory with the DICOM files corresponding to the original image
that was segmented.
--inputDICOMList <std::vector<std::string>>
Comma-separated list of DICOM images that correspond to the original
image that was segmented. This means you must have access to the
original data in DICOM in order to use the converter (at least for
now).
--outputDICOM <std::string>
File name of the DICOM SEG object that will store the result of
conversion.
--inputMetadata <std::string>
JSON file containing the meta-information that describes the
measurements to be encoded. See documentation for details.
--useLabelIDAsSegmentNumber
Use label IDs from ITK images as Segment Numbers in DICOM. Only works
if label IDs are consecutively numbered starting from 1, otherwise
conversion will fail. (value: 0) --inputDICOM <std::string>
File name of the DICOM image file that should be used to populate the
composite context (attributes related to the patient and imaging
study).
--outputDICOM <std::string>
File name of the DICOM Parametric map object with the result of the
conversion.
--inputMetadata <std::string>
File name of the JSON files containing metadata attributes.
--inputImage <std::string>
File name of the parametric map image in a format readable by ITK
(NRRD, NIfTI, MHD, etc.).

SegmentAlgorithmName not applicable, since segmentation was done manuallyitkimage2segimage --inputImageList brain-label.nrrd \
--inputDICOMDirectory Brain-DICOMs \
--outputDICOM brain.SEG.dcm \
--inputMetadata brain-label-mapping.jsondocker run -v C:\Users\joe\myWorkDirectory:/tmp/myWorkDirectory qiicr/dcmqi \
itkimage2segimage --inputImageList /tmp/myWorkDirectory/brain-label.nrrd \
--inputDICOMDirectory /tmp/myWorkDirectory/Brain-DICOMs \
--outputDICOM /tmp/myWorkDirectory/brain.SEG.dcm \
--inputMetadata /tmp/myWorkDirectory/brain-label-mapping.jsontid1500reader --inputDICOM pet-measurements.SR-1500.dcm \
--outputMetadata pet-measurements.json{
"@schema": "https://raw.githubusercontent.com/qiicr/dcmqi/master/doc/schemas/seg-schema.json#", "ContentCreatorName": "Doe^John",
"ClinicalTrialSeriesID": "Session1",
"ClinicalTrialTimePointID": "1",
"ClinicalTrialCoordinatingCenterName": "BWH",
"SeriesDescription": "Segmentation",
"SeriesNumber": "300",
"InstanceNumber": "1", "segmentAttributes": [
[
{ "labelID": 1,SegmentedPropertyCategoryCodeSequence = (M-01000, SRT, "Morphologically
Altered Structure")
SegmentedPropertyTypeCodeSequence = (M-80003, SRT, "Neoplasm, Primary")
SegmentNumber=1SegmentLabel = 255SegmentLabel = "primary tumor"SegmentLabel = "primary tumor (255)"SegmentLabel = "Neoplasm, Primary" "SegmentDescription": "Liver Segmentation", "SegmentAlgorithmType": "SEMIAUTOMATIC", "SegmentAlgorithmName": "SlicerEditor", "recommendedDisplayRGBValue": [
221,
130,
101
] "SegmentedPropertyCategoryCodeSequence": {
"CodeValue": "T-D0050",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Tissue"
},
"SegmentedPropertyTypeCodeSequence": {
"CodeValue": "T-62000",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Liver"
},{
"@schema": "https://raw.githubusercontent.com/qiicr/dcmqi/master/doc/schemas/pm-schema.json#", "SeriesDescription": "Apparent Diffusion Coefficient",
"SeriesNumber": "701",
"InstanceNumber": "1",
"BodyPartExamined": "PROSTATE", "QuantityValueCode": {
"CodeValue": "113041",
"CodingSchemeDesignator": "DCM",
"CodeMeaning": "Apparent Diffusion Coefficient"
},
"MeasurementUnitsCode": {
"CodeValue": "um2/s",
"CodingSchemeDesignator": "UCUM",
"CodeMeaning": "um2/s"
},
"MeasurementMethodCode": {
"CodeValue": "DWMPxxxx10",
"CodingSchemeDesignator": "99QIICR",
"CodeMeaning": "Mono-exponential diffusion model"
},
"SourceImageDiffusionBValues": [
"0",
"1400"
],
"AnatomicRegionSequence": {
"CodeValue": "T-9200B",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Prostate"
},
"FrameLaterality": "U",
"RealWorldValueSlope": 1,
"DerivedPixelContrast": "ADC"
} "SegmentedPropertyCategoryCodeSequence": {
"CodeValue": "T-D0050",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Tissue"
},
"SegmentedPropertyTypeCodeSequence": {
"CodeValue": "G-A460",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Normal"
},
"AnatomicRegionSequence": {
"CodeValue": "T-D05E4",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Peripheral zone of the prostate"
} "SegmentedPropertyCategoryCodeSequence": {
"CodeValue": "T-D000A",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Anatomical Structure"
},
"SegmentedPropertyTypeCodeSequence": {
"CodeValue": "T-9200B",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Prostate"
} "SegmentedPropertyCategoryCodeSequence": {
"CodeValue": "T-D000A",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Anatomical Structure"
},
"SegmentedPropertyTypeCodeSequence": {
"CodeValue": "T-D05E4",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Peripheral zone of the prostate"
}{
"@schema": "https://raw.githubusercontent.com/qiicr/dcmqi/master/doc/schemas/seg-schema.json#",
"ContentCreatorName": "Reader01",
"ClinicalTrialSeriesID": "Session01",
"ClinicalTrialTimePointID": "@TimePoint@",
"SeriesDescription": "Segmentation",
"SeriesNumber": "@SeriesNumber@",
"InstanceNumber": "1",
"BodyPartExamined": "PROSTATE",
"segmentAttributes": [
[
{
"labelID": 1,
"SegmentDescription": "WholeGland",
"SegmentAlgorithmType": "MANUAL",
"SegmentAlgorithmName": "Slicer",
"SegmentedPropertyCategoryCodeSequence": {
"CodeValue": "T-D000A",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Anatomical Structure"
},
"SegmentedPropertyTypeCodeSequence": {
"CodeValue": "T-9200B",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Prostate"
},
"recommendedDisplayRGBValue": [51, 204, 0]
}
],
[
{
"labelID": 2,
"SegmentDescription": "PeripheralZone",
"SegmentAlgorithmType": "MANUAL",
"SegmentAlgorithmName": "Slicer",
"SegmentedPropertyCategoryCodeSequence": {
"CodeValue": "T-D000A",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Anatomical Structure"
},
"SegmentedPropertyTypeCodeSequence": {
"CodeValue": "T-D05E4",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Peripheral zone of the prostate"
},
"recommendedDisplayRGBValue": [153, 90, 50]
}
],
[
{
"labelID": 3,
"SegmentDescription": "TumorROI_PZ_1",
"SegmentAlgorithmType": "MANUAL",
"SegmentAlgorithmName": "Slicer",
"SegmentedPropertyCategoryCodeSequence": {
"CodeValue": "M-01000",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Morphologically Altered Structure"
},
"SegmentedPropertyTypeCodeSequence": {
"CodeValue": "M-01100",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Lesion"
},
"AnatomicRegionSequence": {
"CodeValue": "T-D05E4",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Peripheral zone of the prostate"
},
"recommendedDisplayRGBValue": [255, 255, 0]
}
],
[
{
"labelID": 8,
"SegmentDescription": "NormalROI_PZ_1",
"SegmentAlgorithmType": "MANUAL",
"SegmentAlgorithmName": "Slicer",
"SegmentedPropertyCategoryCodeSequence": {
"CodeValue": "T-D0050",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Tissue"
},
"SegmentedPropertyTypeCodeSequence": {
"CodeValue": "G-A460",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Normal"
},
"AnatomicRegionSequence": {
"CodeValue": "T-D05E4",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Peripheral zone of the prostate"
},
"recommendedDisplayRGBValue": [51, 204, 0]
}
]
],
"ContentLabel": "SEGMENTATION",
"ContentDescription": "Image segmentation",
"ClinicalTrialCoordinatingCenterName": "dcmqi"
}itkimage2segimage.exe
--inputImageList WholeGland.nrrd,PeripheralZone.nrrd,TumorROI_PZ_1.nrrd,NormalROI_PZ_1.nrrd
--inputDICOMDirectory <Patient>/<Study>/<Series>/orig-img-dicom/
--inputMetadata meta.json
--outputDICOM <out-name>.SEG.dcm"SeriesDescription": "Measurements",
"SeriesNumber": "1001",
"InstanceNumber": "1","compositeContext": [
...
]"imageLibrary": [
...
],"observerContext": {
"ObserverType": "PERSON",
"PersonObserverName": "Reader1"
},"VerificationFlag": "VERIFIED",
"CompletionFlag": "COMPLETE",
"activitySession": "1",
"timePoint": "1", "Measurements": [
{
"TrackingIdentifier": "Measurements group 1", "ReferencedSegment": 1,
"SourceSeriesForImageSegmentation": "1.2.392.200103.20080913.113635.1.2009.6.22.21.43.10.23430.1",
"segmentationSOPInstanceUID": "1.2.276.0.7230010.3.1.4.0.42154.1458337731.665796","quantity": {
"CodeValue": "G-D705",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Volume")
},
"units": {
"CodeValue": "cm3",
"CodingSchemeDesignator": "UCUM",
"CodeMeaning": "cubic centimeter"
}"quantity": {
"CodeValue": "113041",
"CodingSchemeDesignator": "DCM",
"CodeMeaning": "Apparent Diffusion Coefficient"
},
"units": {
"CodeValue": "um2/s",
"CodingSchemeDesignator": "UCUM",
"CodeMeaning": "um2/s"
},
"derivationModifier": {
"CodeValue": "R-00317",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Mean"
}tid1500writer.exe
--inputImageLibraryDirectory <Patient>/<Study>/<Series>/orig-img-dicom/
--inputCompositeContextDirectory <Patient>/<Study>/<Series>/segmentations/
--inputMetadata measurements.json
--outputDICOM <out-name>.SR.dcm "SegmentedPropertyCategoryCodeSequence": {
"CodeValue": "M-01000",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Morphologically Altered Structure"
},
"SegmentedPropertyTypeCodeSequence": {
"CodeValue": "M-01100",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Lesion"
},
"AnatomicRegionSequence": {
"CodeValue": "T-D05E4",
"CodingSchemeDesignator": "SRT",
"CodeMeaning": "Peripheral zone of the prostate"
} -t <nrrd|mhd|mha|nii|nifti|hdr|img>, --outputType <nrrd|mhd|mha|nii
|nifti|hdr|img>
Output ITK format for the output image. (default: nrrd)
--outputDirectory <std::string>
Directory to store parametric map in an ITK format, and the JSON
metadata file.
--inputDICOM <std::string>
File name of the DICOM Parametric map image.$ itkimage2segimage --inputDICOMDirectory CMET-MRhead \
--inputMetadata meta.json \
--inputImageList brainmask-dcmspace.nii.gz,lhrh-dcmspace.nii.gz,gmwm-dcmspace.nii.gz \
--outputDICOM freesurfer_seg.dcm$ ls -lat
total 81944
drwx------+ 329 fedorov staff 11186 Apr 26 17:50 ..
drwxr-xr-x 11 fedorov staff 374 Apr 26 17:43 .
-rw-r--r-- 1 fedorov staff 652400 Apr 26 17:55 freesurfer_seg.dcm.zip
-rw-r--r-- 1 fedorov staff 13061414 Apr 26 17:43 freesurfer_seg.dcm
-rw-r--r--@ 1 fedorov staff 27799607 Apr 26 17:35 CMET-MRhead.zip
-rw-r--r--@ 1 fedorov staff 3918 Apr 26 17:17 meta.json
-rw-r--r--@ 1 fedorov staff 331890 Apr 26 16:05 lhrh-dcmspace.nii.gz
-rw-r--r--@ 1 fedorov staff 514384 Apr 26 16:05 gmwm-dcmspace.nii.gz
-rw-r--r--@ 1 fedorov staff 226039 Apr 26 16:05 brainmask-dcmspace.nii.gzW: CodingSchemeDesignator (0008,0102) absent in CodeSequenceMacro (type 1)
1 of 512 slices mapped to source DICOM images
Found 3 label(s)
Skipping label 0
Processing label 1
Total non-empty slices that will be encoded in SEG for label 1 is 512
(inclusive from 0 to 512)
Processing label 2
Total non-empty slices that will be encoded in SEG for label 2 is 512
(inclusive from 0 to 512)
E: CodingSchemeDesignator (0008,0102) absent in CodeSequenceMacro (type 1)
E: Could not write item #0 in ProcedureCodeSequence: Missing Attribute(s)
FATAL ERROR: Writing of the SEG dataset failed! Please report the problem to the developers, ideally accompanied by a de-identified dataset allowing to reproduce the problem!
ERROR: Conversion failed.(0008,1032) SQ (Sequence with explicit length #=1) # 72, 1 ProcedureCodeSequence
(fffe,e000) na (Item with explicit length #=3) # 64, 1 Item
(0008,0100) SH [M2197] # 6, 1 CodeValue
(0008,0103) SH [0] # 2, 1 CodingSchemeVersion
(0008,0104) LO [BWH MR PELVIS WWO CONTRAST M2197] # 32, 1 CodeMeaningdcmodify -i "ProcedureCodeSequence[0].CodingSchemeDesignator=99UNKNOWN" 000000.dcmsudo npm install jsonlint -g
sudo npm install ajv-cli -gcmake DITK_DIR:PATH=C:\ITK-install \
-DSlicerExecutionModel_DIR:PATH=C:\SlicerExecutionModel\SlicerExecutionModel-build \
-DDCMTK_DIR:PATH=C:\DCMTK-install\cmake \
-DZLIB_ROOT:PATH=c:\zlib-install \
-DZLIB_INCLUDE_DIR:PATH=c:\zlib-install\include \
-DZLIB_LIBRARY:FILEPATH=c:\zlib-install\lib\zlib.lib \
<dcmqi source directory>dcmqi/dcmqi-build/apps/seg/itkimage2segimageCLP.h:214:1: error: stray ‘\’ in program
{
^
dcmqi/dcmqi-build/apps/seg/itkimage2segimageCLP.h:214:3: warning: missing terminating " character
{
^
dcmqi/dcmqi-build/apps/seg/itkimage2segimageCLP.h:214:1: error: missing terminating " character
{
^git tag -s -m "vX.Y.Z" vX.Y.Z mastergit push origin vX.Y.Z
git push origin master




-t <nrrd|mhd|mha|nii|nifti|hdr|img>, --outputType <nrrd|mhd|mha|nii
|nifti|hdr|img>
Output file format for the resulting image data. (default: nrrd)
-p <std::string>, --prefix <std::string>
Prefix for output file.
--outputDirectory <std::string>
Directory to store individual segments saved using the output format
specified files. When specified, file names will contain prefix,
followed by the segment number.
--inputDICOM <std::string>
File name of the input DICOM Segmentation image object.
--mergeSegments
Save all segments into a single file. When segments are
non-overlapping, output is a single 3D file. If overlapping segments
are identified, multiple 3D files will be created each containing
non-overlapping segments. Metadata JSON files will be created for each
such 3D file. (value: 0)






