dcmqi icon indicating copy to clipboard operation
dcmqi copied to clipboard

Add a linear measurement converter

Open fedorov opened this issue 9 years ago • 3 comments
trafficstars

Example from David:

% dcsrdump FromEmel_20150506/jjvector4276015677.84977662.6.74.6217627.81381.667482524.159327.4255.136_extract.dcm 
: CONTAINER: (126000,DCM,"Imaging Measurement Report")  [SEPARATE] (DCMR,1500)
        >HAS CONCEPT MOD: CODE: (121049,DCM,"Language of Content Item and Descendants")  = (eng,RFC3066,"English")
                >>HAS CONCEPT MOD: CODE: (121046,DCM,"Country of Language")  = (US,ISO3166_1,"United States")
        >HAS OBS CONTEXT: PNAME: (121008,DCM,"Person Observer Name")  = "admin"
        >HAS OBS CONTEXT: TEXT: (RP-100006,99RPH,"Person Observer's Login Name")  = "admin"
        >HAS CONCEPT MOD: CODE: (121058,DCM,"Procedure reported")  = (24587-8,LN,"brain mri wo+w contr iv")
        >CONTAINS: CONTAINER: (111028,DCM,"Image Library")  [SEPARATE]
                >>CONTAINS: CONTAINER: (126200,DCM,"Image Library Group")  [SEPARATE]
                        >>>CONTAINS: IMAGE:  = (1.2.840.10008.5.1.4.1.1.4,1.3.12.2.1107.5.2.30.25226.3.2007080608524411252220157)
        >CONTAINS: CONTAINER: (126010,DCM,"Imaging Measurements")  [SEPARATE]
                >>CONTAINS: CONTAINER: (125007,DCM,"Measurement Group")  [SEPARATE]
                        >>>HAS OBS CONTEXT: TEXT: (112039,DCM,"Tracking Identifier")  = "Lesion7~sp1~-~sp1~-1~sp1~#FFFFFF"
                        >>>HAS OBS CONTEXT: UIDREF: (112040,DCM,"Tracking Unique Identifier")  = "1266843.1.76.1940.865.49429.781249.3097277773.935694841.27403146"
                        >>>CONTAINS: CODE: (121071,DCM,"Finding")  = (jjv-5,epad-plugin,"epad-plugin")
                        >>>CONTAINS: NUM: (G-D7FE,SRT,"Length")  = 0.0 (mm,UCUM,"millimeter")
                                >>>>INFERRED FROM: SCOORD:  = POLYLINE {72.1983489990234,186.446273803711,88.0661163330078,176.92561340332,76.1652908325195,206.280990600586,62.6776847839355,193.586776733398}
                                        >>>>>SELECTED FROM: IMAGE:  = (1.2.840.10008.5.1.4.1.1.4,1.3.12.2.1107.5.2.30.25226.3.2007080608524411252220157) 

fedorov avatar May 28 '16 16:05 fedorov

---------- Forwarded message ----------
From: David Clunie <[email protected]>
Date: Sun, May 29, 2016 at 8:39 AM
Subject: Re: Bi-dimensional measurement
To: Steve Pieper <[email protected]>
Cc: Andrey Fedorov <[email protected]>, Jörg Riesmeier <[email protected]>


Hi Steve, Andrey (and I cc'd Jörg, since this is about SR)

Short answer:

  Measurement Group
  >Tracking Identifier
  >Tracking Unique Identifier
  >Measurement Method = WHO
  >Long Axis = 9.21 mm
  >>SCOORD POLYLINE (x1,y1) (x2,y2)
  >Short Axis = 7.59 mm
  >>SCOORD POLYLINE (x3,y3) (x4,y4)

Long answer:

Ideally we want to make sure that whether the measurements
are made by:

- hand drawing separate short and long axes

- a single tool that produces long and short axes

- a tool that automatically finds longest axis on
planar (axial) images (from manually or auto
segmented planar ROI)

- a tool that automatically finds (axial) slice
with longest axis on volume images (from manually
or auto segmented multiple planar ROIs or volumetric
ROI)

they would all be encoded with a similar representation.

The question arises as to how to encode SCOORDS for
beginning and end points of "lines" that represent the
long or short axes, but at the same time encode that they
are related to one another and/or to a particular area
or volume (whether defined as SCOORD isocontour coordinates
or reference to SEG object).

It is also important to identify which is the long vs. short,
since RECIST 1.1 [4] uses "sum of longest diameters" EXCEPT for
lymph nodes, where short axis is used, cf. WHO that uses both
and does not treat lymph nodes specially.

This implies that it is necessary to make sure that longest
value goes in the long axis, since these could swap depending
on how user drags the end points.

So, turning to how to use TID 1500 do this ...

For the case of adding the "long axis" to a volumetric
ROI, there is already an example of this in PS3.17
Annex RRR:

http://dicom.nema.org/medical/dicom/current/output/chtml/part17/sect_RRR.2.html#table_RRR.2-1

It has the pattern:

  Measurement Group
  >Tracking Identifier
  >Tracking Unique Identifier
  >Referenced Segment
  ...
  >Finding Site
  ...
  >Volume = 3267.46 mm3
  >>Measurement Method = Sum of segmented voxel volumes
  >Long Axis = 9.21 mm
  >>Measurement Method = RECIST 1.1

Note that the measurement method comes from CID 6147 Response
Criteria:

http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_6147.html

and there is a WHO code in there (112029, DCM, "WHO") too.

So, for the case where there is no volumetric or planar
segmented ROI for which the long and short axis measurements
are being made, I would suggest just encoding (using TID 320
inside TID 300 inside TID 1501 as previously discussed for
when you asked about "length" alone), using the "Measurement
Group" concept to keep the measurements related as applying
to the same lesion:

http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_A.html#sect_TID_1501

which would look like:

  Measurement Group
  >Tracking Identifier
  >Tracking Unique Identifier
  >Long Axis = 9.21 mm
  >>SCOORD POLYLINE (x1,y1) (x2,y2)
  >>Measurement Method = WHO
  >Short Axis = 7.59 mm
  >>SCOORD POLYLINE (x1,y1) (x2,y2)
  >>Measurement Method = WHO

or better still, with the common measurement method factored
out since there is nothing else in the measurement group,
as TID 1501 permits:

  Measurement Group
  >Tracking Identifier
  >Tracking Unique Identifier
  >Measurement Method = WHO
  >Long Axis = 9.21 mm
  >>SCOORD POLYLINE (x1,y1) (x2,y2)
  >Short Axis = 7.59 mm
  >>SCOORD POLYLINE (x3,y3) (x4,y4)

(one would not do this refactoring if there were other measurements
in the same group like area or mean intensity).

To extend this to three dimensions, e.g., as is sometimes
used for brain tumor measurements [3], one could encode:

  Measurement Group
  >Tracking Identifier
  >Tracking Unique Identifier
  >Measurement Method = Triorthogonal Line Segments (new code)
  >Long Axis = 9.21 mm
  >>SCOORD POLYLINE (x1,y1) (x2,y2)
  >Short Axis = 7.59 mm
  >>SCOORD POLYLINE (x3,y3) (x4,y4)
  >Perpendicular Axis = 7.59 mm
  >>SCOORD POLYLINE (x5,y5) (x6,y6)

I discussed some of these design issues in my old SR
for clinical trial results paper[1], and the way I did it
back in the RadPharm/Siemens SCR/QIBA days is described
in the QIBA CT 1B R2 document [2]. Neither of these has
been updated to reflect TID 1500 though, and so the
patterns that we need to use may be slightly different.

At the time I selected the measurement codes for 2D
measurements to be:

(G-A185, SRT, "Long Axis")
(G-A186, SRT, "Short Axis")

and I would use those again (and they are listed in CID
7470 Linear Measurements):

http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_7470.html

in which:

(G-A187, SRT, "Perpendicular Axis")

also occurs, and is probably OK to use for the third
dimension in lieu of anything more specific being
standardized (when I did the RadPharm implementation, I
made up a (RP-101017, 99RPH, "Normal Axis") code; not
sure how I missed reusing G-A187).

Though now that I look at these concepts again, I realize
that they are in SNOMED "topographical modifiers" and do
not actually convey the concept of "length" as in "length
in the XX axis"; this is probably implicit from concept
but is a bit untidy, now that I think of it. There might
be an argument for adding new codes that are more specific:

- "length of longest dimension in transverse plane"
- "length of orthogonal dimension in transverse plane"
- "length of dimension in axis orthogonal to transverse plane"

RECIST 1.1 actually uses the expression "longest diameter in
the plane of measurement is to be recorded", which implies
some relaxation of the earlier transverse (inappropriately
called "axial") dimension requirement. Still, one could
envisage a construct that defined this explicitly, perhaps
by adding a new concept to the template such as "plane of
measurement":

  Measurement Group
  >Tracking Identifier
  >Tracking Unique Identifier
  >Measurement Method = Triorthogonal Line Segments (new code)
  >Plane of Measurement (new concept) = Transverse (new code)
  >Long Axis = 9.21 mm
  >>SCOORD POLYLINE (x1,y1) (x2,y2)
  >Short Axis = 7.59 mm
  >>SCOORD POLYLINE (x3,y3) (x4,y4)
  >Perpendicular Axis = 7.59 mm
  >>SCOORD POLYLINE (x5,y5) (x6,y6)

David

PS. For RadPharm, for what I called a the time the "measurement
type" I specified private codes for:

(RP-100103, 99RPH, "Line Segment")
(RP-100104, 99RPH, "Biorthogonal Line Segments")
(RP-101016, 99RPH, "Triorthogonal Line Segments")
(RP-100105, 99RPH, "Angle")

and it might be worth considering whether or not to add these
to DICOM with a CP

PPS. This does not address the "independent arms" approach to
the short axis measurement, but since you don't need that for
now I think we can skip it. If we did need it, it would be
just another pair of measurements in the same style with
appropriately specific concepts.

References.

[1] Clunie DA. DICOM Structured Reporting and Cancer Clinical Trials Results. Cancer Informatics [Internet]. 2007 May 12;4(CIN-ImSI-Clunie-et-al). Available from: http://www.la-press.com/dicom-structured-reporting-and-cancer-clinical-trials-results-article-a240

[2] Clunie, David A. Encoding of Oncology Clinical Trial Read Results in DICOM SR  - Abbreviated QIBA CT 1B R2 Content [Internet]. CoreLab Partners; 2012. Available from: http://qibawiki.rsna.org/images/5/58/ClinicalTrialResults_20121229_QIBA.doc

[3] Shah GD, Kesari S, Xu R, Batchelor TT, O’Neill AM, Hochberg FH, et al. Comparison of linear and volumetric criteria in assessing tumor response in adult high-grade gliomas. Neuro-Oncology. 2006;8(1):38–46. Available from: http://neuro-oncology.oxfordjournals.org/content/8/1/38.full

[4] Eisenhauer EA, Therasse P, Bogaerts J, Schwartz LH, Sargent D, Ford R, et al. New response evaluation criteria in solid tumours: Revised RECIST guideline (version 1.1). European Journal of Cancer. 2009 Jan;45(2):228–47.


On 5/26/16 12:11 PM, Steve Pieper wrote:> This should tell you everything about the measurement.
>
>
> ---------- Forwarded message ----------
> From: Erik Ziegler <[email protected]>
> Date: 2016-05-26 11:21 GMT-04:00
> Subject: Bidirectional GIF
> To: Steve Pieper <[email protected]>
>
>
> [image: Inline image 1]
>

On 5/26/16 11:16 AM, Steve Pieper wrote:
>
> Hi David -
>
> Just confirmed that the use case is that the short axis is just a single
> line.  Erik from OHIF is working on getting and example and pulling up
> their database api description.
>
> Thanks,
> Steve
>
> On Thu, May 26, 2016 at 10:51 AM, David Clunie <[email protected]> wrote:
>
>> My Internet connection dropped again whilst you were talking
>> about this.
>>
>> Just to confirm, you want:
>>
>> - axial plane
>>
>> - one of which is the longest axial dimension
>>
>> - the other is perpendicular
>>
>> - the two 'arms' of the perpendicular measurement on
>> either side of the long axis can be moved independently
>>
>> This requires a relatively complex representation that
>> encodes three separate line segments provides the length
>> of each, and
>>
>> Much more common in my experience, BTW., is the short axis
>> being a single line, not two separate arms that move
>> independently.
>>
>> David
>>
>

fedorov avatar May 31 '16 10:05 fedorov

Related to this, I followed the example from the Archive.zip files to implement a javascript structured report demo.

https://github.com/pieper/dcmjs/commit/cb2846a29e208e8fc1325a636146e156e739d212

pieper avatar Jul 05 '17 22:07 pieper

The live (prototype) demo is here:

https://pieper.github.io/dcmjs/examples/linearMeasurements/index.html

pieper avatar Jul 06 '17 12:07 pieper