Skip to content

Commit

Permalink
Fix import PR docstrings (#72)
Browse files Browse the repository at this point in the history
* Fix all sphinx warnings

* Removed all unnecessary modules from doc content tree, fixed all docstrings to match

* Fix unused import
  • Loading branch information
CPBridge authored May 19, 2021
1 parent d34e32c commit 448351f
Show file tree
Hide file tree
Showing 19 changed files with 227 additions and 351 deletions.
128 changes: 0 additions & 128 deletions docs/package.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ highdicom.color module
:undoc-members:
:show-inheritance:

highdicom.content module
++++++++++++++++++++++++

.. automodule:: highdicom.content
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.enum module
+++++++++++++++++++++

Expand Down Expand Up @@ -68,15 +59,6 @@ highdicom.spatial module
:undoc-members:
:show-inheritance:

highdicom.uid module
++++++++++++++++++++++

.. automodule:: highdicom.uid
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.utils module
++++++++++++++++++++++

Expand All @@ -99,16 +81,6 @@ highdicom.legacy package
:show-inheritance:


highdicom.legacy.sop module
+++++++++++++++++++++++++++

.. automodule:: highdicom.legacy.sop
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:


.. _highdicom-seg-subpackage:

highdicom.seg package
Expand All @@ -120,33 +92,6 @@ highdicom.seg package
:undoc-members:
:show-inheritance:

highdicom.seg.content module
++++++++++++++++++++++++++++

.. automodule:: highdicom.seg.content
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.seg.enum module
+++++++++++++++++++++++++

.. automodule:: highdicom.seg.enum
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.seg.sop module
++++++++++++++++++++++++

.. automodule:: highdicom.seg.sop
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.seg.utils module
++++++++++++++++++++++++++

Expand All @@ -167,42 +112,6 @@ highdicom.sr package
:undoc-members:
:show-inheritance:

highdicom.sr.coding module
++++++++++++++++++++++++++

.. automodule:: highdicom.sr.coding
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.sr.content module
+++++++++++++++++++++++++++

.. automodule:: highdicom.sr.content
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.sr.enum module
++++++++++++++++++++++++

.. automodule:: highdicom.sr.enum
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.sr.sop module
+++++++++++++++++++++++

.. automodule:: highdicom.sr.sop
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.sr.utils module
+++++++++++++++++++++++++

Expand All @@ -212,25 +121,6 @@ highdicom.sr.utils module
:undoc-members:
:show-inheritance:

highdicom.sr.templates module
+++++++++++++++++++++++++++++

.. automodule:: highdicom.sr.templates
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.sr.value\_types module
++++++++++++++++++++++++++++++++

.. automodule:: highdicom.sr.value_types
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:


.. _highdicom-sc-subpackage:

highdicom.sc package
Expand All @@ -241,21 +131,3 @@ highdicom.sc package
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.sc.enum module
+++++++++++++++++++++++++

.. automodule:: highdicom.sc.enum
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:

highdicom.sc.sop module
++++++++++++++++++++++++

.. automodule:: highdicom.sc.sop
:members:
:special-members: __call__
:undoc-members:
:show-inheritance:
2 changes: 1 addition & 1 deletion src/highdicom/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def __init__(
Name of the referring physician
content_qualification: Union[str, highdicom.enum.ContentQualificationValues], optional
Indicator of content qualification
coding_schemes: Sequence[highdicom.sr.coding.CodingSchemeIdentificationItem], optional
coding_schemes: Sequence[highdicom.sr.CodingSchemeIdentificationItem], optional
private or public coding schemes that are not part of the
DICOM standard
series_description: str, optional
Expand Down
32 changes: 16 additions & 16 deletions src/highdicom/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(
----------
name: str
Name of the algorithm
family: Union[pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept]
family: Union[pydicom.sr.coding.Code, highdicom.sr.CodedConcept]
Kind of algorithm family
version: str
Version of the algorithm
Expand Down Expand Up @@ -175,7 +175,7 @@ def __eq__(self, other: Any) -> bool:
Parameters
----------
other: highdicom.content.PlanePositionSequence
other: highdicom.PlanePositionSequence
Plane position of other image that should be compared
Returns
Expand Down Expand Up @@ -255,7 +255,7 @@ def __eq__(self, other: Any) -> bool:
Parameters
----------
other: highdicom.content.PlaneOrientationSequence
other: highdicom.PlaneOrientationSequence
Plane position of other image that should be compared
Returns
Expand Down Expand Up @@ -338,7 +338,7 @@ def __init__(
"""
Parameters
----------
procedure: Union[pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept]
procedure: Union[pydicom.sr.coding.Code, highdicom.sr.CodedConcept]
Procedure used to collect the examined specimen
""" # noqa
Expand Down Expand Up @@ -368,13 +368,13 @@ def __init__(
"""
Parameters
----------
method: Union[pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept]
method: Union[pydicom.sr.coding.Code, highdicom.sr.CodedConcept]
Method used to sample the examined specimen from a parent specimen
parent_specimen_id: str
Identifier of the parent specimen
parent_specimen_type: Union[pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept]
parent_specimen_type: Union[pydicom.sr.coding.Code, highdicom.sr.CodedConcept]
Type of the parent specimen
issuer_of_parent_specimen_id: highdicom.content.IssuerOfIdentifier, optional
issuer_of_parent_specimen_id: highdicom.IssuerOfIdentifier, optional
Issuer who created the parent specimen
""" # noqa
Expand Down Expand Up @@ -423,7 +423,7 @@ def __init__(
"""
Parameters
----------
substances: Sequence[Union[pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept]]
substances: Sequence[Union[pydicom.sr.coding.Code, highdicom.sr.CodedConcept]]
Substances used to stain examined specimen(s)
""" # noqa
Expand Down Expand Up @@ -467,18 +467,18 @@ def __init__(
----------
specimen_id: str
Identifier of the processed specimen
processing_type: Union[pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept]
processing_type: Union[pydicom.sr.coding.Code, highdicom.sr.CodedConcept]
Type of processing
processing_procedure: Union[highdicom.content.SpecimenCollection, highdicom.content.SpecimenSampling, highdicom.content.SpecimenStaining]
processing_procedure: Union[highdicom.SpecimenCollection, highdicom.SpecimenSampling, highdicom.SpecimenStaining]
Procedure used during processing
processing_datetime: datetime.datetime, optional
Datetime of processing
processing_description: Union[str, pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept], optional
processing_description: Union[str, pydicom.sr.coding.Code, highdicom.sr.CodedConcept], optional
Description of processing
issuer_of_specimen_id: highdicom.content.IssuerOfIdentifier, optional
fixative: Union[pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept], optional
issuer_of_specimen_id: highdicom.IssuerOfIdentifier, optional
fixative: Union[pydicom.sr.coding.Code, highdicom.sr.CodedConcept], optional
Fixative used during processing
embedding_medium: Union[pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept], optional
embedding_medium: Union[pydicom.sr.coding.Code, highdicom.sr.CodedConcept], optional
Embedding medium used during processing
""" # noqa
Expand Down Expand Up @@ -566,10 +566,10 @@ def __init__(
provided either in form of text or in form of spatial x, y, z
coordinates specifying the position (offset) relative to the
three-dimensional slide coordinate system
specimen_preparation_steps: Sequence[highdicom.content.SpecimenPreparationStep], optional
specimen_preparation_steps: Sequence[highdicom.SpecimenPreparationStep], optional
Steps that were applied during the preparation of the examined
specimen in the laboratory prior to image acquisition
issuer_of_specimen_id: highdicom.content.IssuerOfIdentifier, optional
issuer_of_specimen_id: highdicom.IssuerOfIdentifier, optional
Description of the issuer of the specimen identifier
""" # noqa
Expand Down
4 changes: 2 additions & 2 deletions src/highdicom/sc/sop.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ def __init__(
container_identifier: str, optional
Identifier of the container holding the specimen (required if
`coordinate_system` is ``"SLIDE"``)
issuer_of_container_identifier: highdicom.content.IssuerOfIdentifier, optional
issuer_of_container_identifier: highdicom.IssuerOfIdentifier, optional
Issuer of `container_identifier`
specimen_descriptions: Sequence[highdicom.content.SpecimenDescriptions], optional
specimen_descriptions: Sequence[highdicom.SpecimenDescriptions], optional
Description of each examined specimen (required if
`coordinate_system` is ``"SLIDE"``)
transfer_syntax_uid: str, optional
Expand Down
4 changes: 4 additions & 0 deletions src/highdicom/seg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
SpatialLocationsPreservedValues,
SegmentsOverlapValues,
)
from highdicom.seg.content import (
SegmentDescription,
DimensionIndexSequence,
)
from highdicom.seg import utils

SOP_CLASS_UIDS = {
Expand Down
18 changes: 9 additions & 9 deletions src/highdicom/seg/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,32 @@ def __init__(
Number of the segment.
segment_label: str
Label of the segment
segmented_property_category: Union[pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept]
segmented_property_category: Union[pydicom.sr.coding.Code, highdicom.sr.CodedConcept]
Category of the property the segment represents,
e.g. ``Code("49755003", "SCT", "Morphologically Abnormal Structure")``
(see `CID 7150 <http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_7150.html>`_
"Segmentation Property Categories")
segmented_property_type: Union[pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept]
segmented_property_type: Union[pydicom.sr.coding.Code, highdicom.sr.CodedConcept]
Property the segment represents,
e.g. ``Code("108369006", "SCT", "Neoplasm")``
(see `CID 7151 <http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_7151.html>`_
"Segmentation Property Types")
algorithm_type: Union[str, highdicom.seg.enum.SegmentAlgorithmTypeValues]
algorithm_type: Union[str, highdicom.seg.SegmentAlgorithmTypeValues]
Type of algorithm
algorithm_identification: highdicom.content.AlgorithmIdentificationSequence, optional
algorithm_identification: highdicom.AlgorithmIdentificationSequence, optional
Information useful for identification of the algorithm, such
as its name or version. Required unless the algorithm type is `MANUAL`
tracking_uid: str, optional
Unique tracking identifier (universally unique)
tracking_id: str, optional
Tracking identifier (unique only with the domain of use)
anatomic_regions: Sequence[Union[pydicom.sr.coding.Code, highdicom.sr.coding.CodedConcept]], optional
anatomic_regions: Sequence[Union[pydicom.sr.coding.Code, highdicom.sr.CodedConcept]], optional
Anatomic region(s) into which segment falls,
e.g. ``Code("41216001", "SCT", "Prostate")``
(see `CID 4 <http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_4.html>`_
"Anatomic Region", `CID 4031 <http://dicom.nema.org/medical/dicom/current/output/chtml/part16/sect_CID_4031.html>`_ "Common Anatomic Regions", as
as well as other CIDs for domain-specific anatomic regions)
primary_anatomic_structures: Sequence[Union[highdicom.sr.coding.Code, highdicom.sr.coding.CodedConcept]], optional
primary_anatomic_structures: Sequence[Union[highdicom.sr.Code, highdicom.sr.CodedConcept]], optional
Anatomic structure(s) the segment represents
(see CIDs for domain-specific primary anatomic structures)
Expand Down Expand Up @@ -307,7 +307,7 @@ def get_plane_positions_of_image(
Returns
-------
List[PlanePositionSequence]
List[highdicom.PlanePositionSequence]
Plane position of each frame in the image
"""
Expand Down Expand Up @@ -348,7 +348,7 @@ def get_plane_positions_of_series(
Returns
-------
List[PlanePositionSequence]
List[highdicom.PlanePositionSequence]
Plane position of each frame in the image
"""
Expand Down Expand Up @@ -376,7 +376,7 @@ def get_index_values(
Parameters
----------
plane_positions: Sequence[PlanePositionSequence]
plane_positions: Sequence[highdicom.PlanePositionSequence]
Plane position of frames in a multi-frame image or in a series of
single-frame images
Expand Down
Loading

0 comments on commit 448351f

Please sign in to comment.