This file is indexed.

/usr/share/pyshared/spyderplugins/io_dicom.py is in python-spyderlib 2.1.9-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- coding:utf-8 -*-
"""Example of I/O plugin for loading DICOM files"""

import os.path as osp

try:
    import dicom
    def load_dicom(filename):
        try:
            name = osp.splitext(osp.basename(filename))[0]
            return {name: dicom.ReadFile(filename).PixelArray}, None
        except Exception, error:
            return None, str(error)
except ImportError:
    load_dicom = None

#===============================================================================
# The following statements are required to register this I/O plugin:
#===============================================================================
FORMAT_NAME = "DICOM images"
FORMAT_EXT  = ".dcm"
FORMAT_LOAD = load_dicom
FORMAT_SAVE = None