diff --git a/docs/package.rst b/docs/package.rst index 7bc340b0..9dd22c5a 100644 --- a/docs/package.rst +++ b/docs/package.rst @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: diff --git a/src/highdicom/_module_utils.py b/src/highdicom/_module_utils.py index 887ed5a8..01c8c110 100644 --- a/src/highdicom/_module_utils.py +++ b/src/highdicom/_module_utils.py @@ -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 diff --git a/src/highdicom/base.py b/src/highdicom/base.py index 6f355dd0..93f3680a 100644 --- a/src/highdicom/base.py +++ b/src/highdicom/base.py @@ -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 ---------- @@ -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 ---------- diff --git a/src/highdicom/seg/content.py b/src/highdicom/seg/content.py index baf956f4..32f467e1 100644 --- a/src/highdicom/seg/content.py +++ b/src/highdicom/seg/content.py @@ -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. diff --git a/src/highdicom/sr/content.py b/src/highdicom/sr/content.py index 0aec3aa5..f7a2897a 100644 --- a/src/highdicom/sr/content.py +++ b/src/highdicom/sr/content.py @@ -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 @@ -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