@@ -146,7 +146,7 @@ One particularly important characteristic of a segmentation image is its
146146"Segmentation Type" (0062,0001). There are three options here, contained within
147147the highdicom enum :class: `highdicom.seg.SegmentationTypeValues `:
148148
149- - ``"BINARY" `` segmentations stores each segment in a separate set of frames.
149+ - ``"BINARY" `` segmentations store each segment in a separate set of frames.
150150 Within each segment, pixels can only take the value 0 (meaning that the pixel
151151 does not belong to the segment) or 1 (meaning that the pixel does belong to
152152 the segment). Note that although the name may suggest that only one segment
659659 This removes from you the requirement to ensure that the frames of your
660660 segmentation array are correctly aligned with those from the source images,
661661 removing a common source of error. As long as the affine matrix of the volume
662- you pass correctly describes the array, a correct segmentation will be
663- produced regardless of the correspondence with the source images.
662+ you pass correctly describes the position of the pixel array in the
663+ frame-of-reference coordinate system, a correct segmentation will be produced
664+ regardless of the correspondence with the source images.
664665* It *does not * change the way that the input array is encoded as frames in the
665666 segmentation. Regardless of whether or not you pass a volume or a "plain"
666667 NumPy array, each index down axis 0 of the input array becomes one frame in
@@ -672,11 +673,11 @@ do:
672673 "rearrange" the volume to match the layout of the source images.
673674
674675Sometimes, you may wish to ensure that the "layout" (i.e. which spatial
675- direction is used as the frame direction, which as the row direction and which
676+ direction is used as the frame direction, which as the row direction, and which
676677as the column direction) matches that of the source images, and this may
677678involve undoing various operations (flips, crops, dimension permutations) that
678679were done in your analysis pipeline. One common reason for this is that some
679- viewers will only display the segmentation if is aligned in this way (see
680+ viewers will only display the segmentation if it is aligned in this way (see
680681:ref: `seg-viewers `). While the segmentation constructor does not handle this
681682for you, you should be able to use the :meth: `highdicom.Volume.match_geometry `
682683method to automatically crop/pad/flip/permute your segmentation volume back to
@@ -851,7 +852,7 @@ When creating a Segmentation, various per-frame metadata are placed within the
851852"Per Frame Functional Groups Sequence" attribute, with one item of this
852853sequence describing one frame of the Segmentation. Within each item, the
853854"Derivation Image Sequence" is in particular worth discussing. This sequence
854- specifies, which frame(s) of the source image (or image series) were used to
855+ specifies, which frames of the source image (or image series) were used to
855856derive the segmentation frame. The "Derivation Image Sequence" should always be
856857present but may have length zero.
857858
@@ -871,15 +872,15 @@ whenever it is possible to do so. If you pass a plain NumPy array aligned with
871872the source images to the Segmentation constructor, this is straightforward. If
872873instead you pass a :class: `highdicom.Volume ` object to the ``pixel_array ``
873874argument, or manually specify the ``plane_positions ``, ``plane_orientation ``
874- and/or ``pixel_measures `` argumentsm , ``highdicom `` will attempt to match the
875+ and/or ``pixel_measures `` arguments , ``highdicom `` will attempt to match the
875876spatial location of the each segmentation frame to those of the source
876877frames/images, using a small tolerance to allow for small numerical errors.
877878There are three possibilities here:
878879
879880- The orientation, spacing and positions of the frames all match. In this case,
880881 the "Derivation Image Sequence" will indicate the matched frames, and further
881- use the "Spatial Locations Preserved" attribute that there is pixel-for-pixel
882- alignment.
882+ use the "Spatial Locations Preserved" attribute to communicate that there is
883+ pixel-for-pixel alignment.
883884- Segmentation frames are related to source frames by only in-plane rotations,
884885 flips, and or/scaling. There is still frame-by-frame correspondence, but no
885886 pixel-for-pixel correspondence. In this situation, the "Derivation Image
@@ -890,7 +891,7 @@ There are three possibilities here:
890891 and/or scaling between source frames and segmentation frames). In this
891892 situation, the "Derivation Image Sequence" is left empty.
892893
893- If you require the "Derivation Image Sequence" be populated and you are using a
894+ If you require the "Derivation Image Sequence" to be populated and you are using a
894895:class: `highdicom.Volume ` as input to the constructor, follow the method in the
895896`seg-from-volume `_ section to match the geometry before passing to the constructor.
896897
@@ -1896,7 +1897,7 @@ you are experiencing problems:
18961897 in the documentation for the ``pixel_array `` argument of the
18971898 :class: `highdicom.seg.Segmentation ` constructor. Alternatively, consider
18981899 passing a :class: `highdicom.Volume ` instead, if that is appropriate in your
1899- situation, to make this easier (and also check the following point).
1900+ situation, to make this easier (then also check the following point).
19001901 - If you are passing a :class: `highdicom.Volume ` to the constructor, make
19011902 sure you use the :class: `highdicom.Volume.match_geometry ` method on the
19021903 segmentation volume first, following the explanation in
0 commit comments