DICOMReader#
- class DICOMReader(*args, **kwargs)[source]#
DICOM Reader for reading
.dcmfiles.Wraps vtkDICOMImageReader.
This reader reads a single file or a path containing a several
.dcmfiles (DICOM stack).- Parameters:
- path
str Path to the single DICOM (
.dcm) file to be opened or the directory containing a stack of DICOM files.
- path
Examples#
Download Python source code | Download Jupyter notebook
Read a DICOM stack.
>>> import pyvista as pv
>>> from pyvista import examples
>>> path = examples.download_dicom_stack(load=False)
>>> reader = pv.DICOMReader(path)
>>> dataset = reader.read()
>>> dataset.plot(volume=True, zoom=3, show_scalar_bar=False)
Note
The example dataset is the CPTAC-SAR collection from The Cancer
Imaging Archive, distributed under CC BY 3.0 and subject to the
TCIA Data Usage Policy. See
download_dicom_stack() for the
required attribution and usage terms.