src.imagedata package
Subpackages
- src.imagedata.apps package
- src.imagedata.archives package
- Submodules
- src.imagedata.archives.abstractarchive module
AbstractArchiveAbstractArchive.add_localfile()AbstractArchive.authorsAbstractArchive.baseAbstractArchive.basename()AbstractArchive.close()AbstractArchive.construct_filename()AbstractArchive.descriptionAbstractArchive.exists()AbstractArchive.getmembers()AbstractArchive.getnames()AbstractArchive.is_file()AbstractArchive.mimetypesAbstractArchive.nameAbstractArchive.new_local_file()AbstractArchive.open()AbstractArchive.pathAbstractArchive.plugin_typeAbstractArchive.rootAbstractArchive.set_member_naming_scheme()AbstractArchive.to_localfile()AbstractArchive.transportAbstractArchive.urlAbstractArchive.use_query()AbstractArchive.versionAbstractArchive.writedata()
MemberNoOtherInstanceWriteMultipleArchives
- src.imagedata.archives.filesystemarchive module
FilesystemArchiveFilesystemArchive.add_localfile()FilesystemArchive.authorsFilesystemArchive.baseFilesystemArchive.basename()FilesystemArchive.close()FilesystemArchive.construct_filename()FilesystemArchive.descriptionFilesystemArchive.exists()FilesystemArchive.extensionsFilesystemArchive.getmembers()FilesystemArchive.getnames()FilesystemArchive.is_file()FilesystemArchive.levelFilesystemArchive.mimetypesFilesystemArchive.nameFilesystemArchive.new_local_file()FilesystemArchive.open()FilesystemArchive.pathFilesystemArchive.rootFilesystemArchive.to_localfile()FilesystemArchive.urlFilesystemArchive.use_query()FilesystemArchive.versionFilesystemArchive.writedata()
NoSuchFileReadOnlyErrorWriteOnFile
- src.imagedata.archives.zipfilearchive module
WriteFileIOZipfileArchiveZipfileArchive.add_localfile()ZipfileArchive.authorsZipfileArchive.baseZipfileArchive.basename()ZipfileArchive.close()ZipfileArchive.construct_filename()ZipfileArchive.descriptionZipfileArchive.exists()ZipfileArchive.getmembers()ZipfileArchive.getnames()ZipfileArchive.is_file()ZipfileArchive.mimetypesZipfileArchive.nameZipfileArchive.new_local_file()ZipfileArchive.open()ZipfileArchive.pathZipfileArchive.rootZipfileArchive.to_localfile()ZipfileArchive.urlZipfileArchive.use_query()ZipfileArchive.versionZipfileArchive.writedata()
list_files()
- Module contents
- src.imagedata.formats package
- src.imagedata.transports package
- Submodules
- src.imagedata.transports.abstracttransport module
AbstractTransportAbstractTransport.authorsAbstractTransport.close()AbstractTransport.descriptionAbstractTransport.exists()AbstractTransport.info()AbstractTransport.isfile()AbstractTransport.mimetypeAbstractTransport.nameAbstractTransport.open()AbstractTransport.plugin_typeAbstractTransport.schemesAbstractTransport.urlAbstractTransport.versionAbstractTransport.walk()
NoOtherInstance
- src.imagedata.transports.dicomtransport module
- src.imagedata.transports.filetransport module
FileTransportFileTransport.authorsFileTransport.close()FileTransport.descriptionFileTransport.exists()FileTransport.info()FileTransport.isfile()FileTransport.nameFileTransport.netlocFileTransport.open()FileTransport.optsFileTransport.pathFileTransport.schemesFileTransport.urlFileTransport.versionFileTransport.walk()
- src.imagedata.transports.xnattransport module
XnatTransportXnatTransport.authorsXnatTransport.close()XnatTransport.descriptionXnatTransport.exists()XnatTransport.info()XnatTransport.isfile()XnatTransport.mimetypeXnatTransport.nameXnatTransport.netlocXnatTransport.open()XnatTransport.optsXnatTransport.read_directory_onlyXnatTransport.schemesXnatTransport.urlXnatTransport.versionXnatTransport.walk()
- Module contents
Submodules
src.imagedata.axis module
src.imagedata.cmdline module
src.imagedata.collections module
src.imagedata.header module
src.imagedata.image_data module
src.imagedata.list_plugins module
src.imagedata.readdata module
Read/Write image files, calling appropriate transport, archive and format plugins
- src.imagedata.readdata.read(urls, order=None, opts=None, input_format=None)[source]
Read image data, calling appropriate transport, archive and format plugins
- Parameters:
urls – list of urls or url to read (list of str, or str)
order – determine how to sort the images (default: auto-detect)
opts – input options (argparse.Namespace or dict)
input_format – specify a particular input format (default: auto-detect)
- Returns:
- tuple of
hdr: header instance
si[tag,slice,rows,columns]: numpy array
- Raises:
ValueError – When no sources are given.
UnknownOptionType – When opts cannot be made into a dict.
FileNotFoundError – When specified URL cannot be opened.
UnknownInputError – When the input format could not be determined.
CannotSort – When input data cannot be sorted.
- src.imagedata.readdata.sorted_plugins_dicom_first(plugins, input_format)[source]
Sort plugins such that any Nifti plugin is used early.
- src.imagedata.readdata.write(si, url, opts=None, formats=None)[source]
Write image data, calling appropriate format plugins
- Parameters:
si[tag – Series array
slice – Series array
rows – Series array
columns] – Series array
url – output destination url
opts – Output options (argparse.Namespace or dict)
formats – list of output formats, overriding opts.output_format (list or str)
- Raises:
UnknownOptionType – When opts cannot be made into a dict.
TypeError – List of output format is not list().
ValueError – Wrong number of destinations given, or no way to write multidimensional image.
imagedata.formats.WriteNotImplemented – Cannot write this image format.