Source code for fileformats.medimage.itk

import typing as ty
from fileformats.core.mixin import WithMagicNumber
from fileformats.image import (
    RasterImage,
    VectorImage,
    Bitmap,
    Jpeg,
    Tiff,
)
from fileformats.application import Gzip
from .nifti import Nifti1, NiftiGz
from .dicom import DicomImage


[docs] class GDCM(DicomImage): # iana_mime = None pass
[docs] class GIPL(RasterImage): ext = ".gipl"
[docs] class VTK(VectorImage): ext = ".vtk"
[docs] class PGM(RasterImage): ext = ".pgm"
[docs] class MetaImage(RasterImage): ext = ".mhd"
[docs] class Nrrd(WithMagicNumber, RasterImage): ext = ".nrrd" alternate_exts = (".nhdr",) magic_number = b"NRRD"
[docs] class NrrdGz(Gzip[Nrrd]): # type: ignore[type-arg] ext = ".nrrd.gz" alternate_exts = (".nhdr.gz",)
ItkImage = ty.Union[ Nifti1, NiftiGz, DicomImage, Bitmap, Tiff, Jpeg, GIPL, MetaImage, Nrrd, NrrdGz, PGM ] ItkAll = ty.Union[ Nifti1, NiftiGz, DicomImage, Bitmap, Tiff, Jpeg, GIPL, MetaImage, Nrrd, NrrdGz, PGM, VTK, ] __all__ = [ "GDCM", "GIPL", "VTK", "PGM", "MetaImage", "Nrrd", "NrrdGz", "ItkImage", "ItkAll", ]