Metadata-Version: 1.1
Name: medvis
Version: 0.0.1
Summary: Some utilities to visualise medical images and masks
Home-page: https://github.com/yngvem/medvis
Author: medvis
Author-email: yngve.m.moe@gmail.com
License: "MIT license",
Description: ======
        MedVis
        ======
        
        Tools to visualise medical images.
        
        ------------
        Installation
        ------------
        
        To install, run
        
        .. code::
        
            pip install medvis
        
        -------
        Example
        -------
        
        The following example will plot a PET/CT image with alpha blended PET signal ontop
        of a grayscale CT image. The outline of two masks are shown with a legend that specifies
        what the different colours represent.
        
        .. code:: python
        
                import matplotlib.pyplot as plt
                import medvis
                
                
                ct_image = ...
                pet_image = ...
                binary_true_mask = ...
                binary_pred_mask = ...
        
                true_colour = "tomato"
                pred_colour = "skyblue"
        
                blended_pet_image = medvis.apply_cmap_with_blend(pet_image, 'magma')
                true_mask_outline = medvis.create_outline(binary_true_mask, width=2, colour=true_colour)
                pred_mask_outline = medvis.create_outline(binary_pred_mask, width=2, colour=pred_colour)
        
                fig, ax = plt.subplots()
                ax.imshow(ct_image, cmap='gray')
                ax.imshow(blended_pet_image)
                ax.imshow(true_mask_outline)
                ax.imshow(pred_mask_outline)
                medvis.create_legend([true_colour, pred_colour], ["True mask", "Predicted mask"], ax=ax)
        
                plt.show()
                
        
Keywords: medvis
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
