Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/package.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ highdicom package
.. automodule:: highdicom
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -21,6 +22,7 @@ highdicom.color module
.. automodule:: highdicom.color
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -31,6 +33,7 @@ highdicom.frame module
.. automodule:: highdicom.frame
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -41,6 +44,7 @@ highdicom.io module
.. automodule:: highdicom.io
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -51,6 +55,7 @@ highdicom.spatial module
.. automodule:: highdicom.spatial
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -61,6 +66,7 @@ highdicom.valuerep module
.. automodule:: highdicom.valuerep
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -71,6 +77,7 @@ highdicom.utils module
.. automodule:: highdicom.utils
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -81,6 +88,7 @@ highdicom.pixels module
.. automodule:: highdicom.pixels
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -93,6 +101,7 @@ highdicom.legacy package
.. automodule:: highdicom.legacy
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -105,6 +114,7 @@ highdicom.ann package
.. automodule:: highdicom.ann
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -117,6 +127,7 @@ highdicom.ko package
.. automodule:: highdicom.ko
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -129,6 +140,7 @@ highdicom.pm package
.. automodule:: highdicom.pm
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -141,6 +153,7 @@ highdicom.pr package
.. automodule:: highdicom.pr
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -153,6 +166,7 @@ highdicom.seg package
.. automodule:: highdicom.seg
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -163,6 +177,7 @@ highdicom.seg.utils module
.. automodule:: highdicom.seg.utils
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -175,6 +190,7 @@ highdicom.sr package
.. automodule:: highdicom.sr
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -185,6 +201,7 @@ highdicom.sr.utils module
.. automodule:: highdicom.sr.utils
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
Expand All @@ -197,6 +214,7 @@ highdicom.sc package
.. automodule:: highdicom.sc
:members:
:inherited-members: pydicom.dataset.Dataset,pydicom.sequence.Sequence,Dataset,Sequence,list,str,DataElementSequence,enum.Enum,Enum,
:exclude-members: copy_patient_and_study_information,copy_specimen_information
:special-members: __call__
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions src/highdicom/_module_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def check_required_attributes(
If any of the required (type 1 or 2) attributes are not present
in the dataset for the given module.

Notes
-----
Note
----
This function merely checks for the presence of required attributes.
It does not check whether the data elements are empty or not, whether
there are additional, invalid attributes, or whether the values of the
Expand Down
29 changes: 24 additions & 5 deletions src/highdicom/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,19 @@ def _copy_root_attributes_of_module(
self._copy_attribute(dataset, str(item['keyword']))

def copy_patient_and_study_information(self, dataset: Dataset) -> None:
"""Copies patient- and study-related metadata from `dataset` that
are defined in the following modules: Patient, General Study,
Patient Study, Clinical Trial Subject and Clinical Trial Study.
"""Copies patient- and study-related metadata from `dataset`.

Information defined in the following modules is included: Patient,
General Study, Patient Study, Clinical Trial Subject and Clinical Trial
Study.

Note
----
This method is intended to be used by those writing sub-classes of
:class:`highdicom.SOPClass`. It is *not* necessary for users of
sub-classes of :class:`highdicom.SOPClass` (including all DICOM IODs
implemented in highdicom), or indeed most users of the library, to call
this function directly.

Parameters
----------
Expand All @@ -407,8 +417,17 @@ def copy_patient_and_study_information(self, dataset: Dataset) -> None:
self._copy_root_attributes_of_module(dataset, 'Study')

def copy_specimen_information(self, dataset: Dataset) -> None:
"""Copies specimen-related metadata from `dataset` that
are defined in the Specimen module.
"""Copies specimen-related metadata from `dataset`.

Information defined in the Specimen module is included.

Note
----
This method is intended to be used by those writing sub-classes of
:class:`highdicom.SOPClass`. It is *not* necessary for users of
sub-classes of :class:`highdicom.SOPClass` (including all DICOM IODs
implemented in highdicom), or indeed most users of the library, to call
this function directly.

Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions src/highdicom/seg/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ def __init__(
display_color: Union[highdicom.color.CIELabColor, None], optional
A recommended color to render this segment.

Notes
-----
Note
----
When segment descriptions are passed to a segmentation instance they
must have consecutive segment numbers, starting at 1 for the first
segment added.
Expand Down
8 changes: 4 additions & 4 deletions src/highdicom/sr/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -1716,8 +1716,8 @@ def from_segmentation(
highdicom.sr.ReferencedSegment
Content item representing a reference to the segment

Notes
-----
Note
----
This method will attempt to deduce source image information
from information provided in the segmentation instance. If
available, it will use information specific to the segment
Expand Down Expand Up @@ -2108,8 +2108,8 @@ def from_segmentation(
highdicom.sr.ReferencedSegment
Content item representing a reference to the segment

Notes
-----
Note
----
This method will attempt to deduce source image information from
information provided in the segmentation instance. If available, it
will used information specific to the segment and frame numbers (if
Expand Down