asap.dataimport package
Submodules
asap.dataimport.apply_mipmaps_to_render module
- class asap.dataimport.apply_mipmaps_to_render.AddMipMapsToStack(schema_type=None, *args, **kwargs)[source]
Bases:
StackTransitionModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
AddMipMapsToStackParameters
- default_output_schema
alias of
AddMipMapsToStackOutput
- default_schema
alias of
AddMipMapsToStackParameters
asap.dataimport.create_mipmaps module
- exception asap.dataimport.create_mipmaps.CreateMipMapException[source]
Bases:
RenderModuleException
Exception raised when there is a problem creating a mipmap
- asap.dataimport.create_mipmaps.create_mipmaps(inputImage, outputDirectory='.', *args, **kwargs)
legacy create_mipmaps function
- asap.dataimport.create_mipmaps.create_mipmaps_legacy(inputImage, outputDirectory='.', *args, **kwargs)[source]
legacy create_mipmaps function
- asap.dataimport.create_mipmaps.create_mipmaps_uri(inputImage, outputDirectory=None, method='block_reduce', mipmaplevels=[1, 2, 3], outputformat='tif', convertTo8bit=True, force_redo=True, **kwargs)[source]
function to create downsampled images from an input image
- Parameters
inputImage (str) – path to input image
outputDirectory (str) – path to save output images (default to current directory)
mipmaplevels (list or tuple) – list or tuple of integers (default to (1,2,3))
outputformat (str) – string representation of extension of image format (default tif)
convertTo8bit (boolean) – whether to convert the image to 8 bit, dividing each value by 255
force_redo (boolean) – whether to recreate mip map images if they already exist
method (str) – string corresponding to downsampling method
block_func (str) – string corresponding to function used by block_reduce
ds_filter (str) – string corresponding to PIL downsample mode
- Returns
list of output images created in order of levels
- Return type
list
- Raises
MipMapException – if an image cannot be created for some reason
- asap.dataimport.create_mipmaps.mipmap_PIL(im, levels_file_map, ds_filter='NEAREST', force_redo=True, **kwargs)[source]
asap.dataimport.generate_EM_tilespecs_from_metafile module
create tilespecs from TEMCA metadata file
- class asap.dataimport.generate_EM_tilespecs_from_metafile.GenerateEMTileSpecsModule(schema_type=None, *args, **kwargs)[source]
Bases:
StackOutputModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
GenerateEMTileSpecsParameters
- default_output_schema
alias of
GenerateEMTileSpecsOutput
- default_schema
alias of
GenerateEMTileSpecsParameters
asap.dataimport.generate_mipmaps module
- class asap.dataimport.generate_mipmaps.GenerateMipMaps(schema_type=None, *args, **kwargs)[source]
Bases:
StackInputModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
GenerateMipMapsParameters
- default_output_schema
alias of
GenerateMipMapsOutput
- default_schema
alias of
GenerateMipMapsParameters
- asap.dataimport.generate_mipmaps.create_mipmap_from_tuple(mipmap_tuple, levels=[1, 2, 3], imgformat='tif', convertTo8bit=True, force_redo=True, **kwargs)[source]
asap.dataimport.make_montage_scapes_stack module
- class asap.dataimport.make_montage_scapes_stack.MakeMontageScapeSectionStack(schema_type=None, *args, **kwargs)[source]
Bases:
StackOutputModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
MakeMontageScapeSectionStackParameters
- default_output_schema
alias of
MakeMontageScapeSectionStackOutput
- default_schema
asap.dataimport.schemas module
- class asap.dataimport.schemas.AddMipMapsToStackOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
output_stack
no description
(REQUIRED)
str
missing_ts_zs
Z values for which apply mipmaps failed
[]
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.dataimport.schemas.AddMipMapsToStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
StackTransitionParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
pool_size
no description
1
int
minZ
no description
NA
int
maxZ
no description
NA
int
z
no description
NA
int
zValues
no description
NA
int
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
render
parameters to connect to render server
(REQUIRED)
dict
input_stack
no description
(REQUIRED)
str
output_stack
no description
(REQUIRED)
str
close_stack
no description
False
bool
overwrite_zlayer
no description
False
bool
output_stackVersion
no description
NA
dict
mipmap_dir
directory to which the mipmaps will be stored
NA
str
mipmap_prefix
uri prefix from which mipmap locations are built.
(REQUIRED)
str
levels
number of levels of mipmaps, default is 6
6
int
imgformat
mipmap image format, default is tiff
tiff
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.dataimport.schemas.GenerateEMTileSpecsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
stack
stack to which generated tiles were added
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.dataimport.schemas.GenerateEMTileSpecsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
OutputStackParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
pool_size
no description
1
int
minZ
no description
NA
int
maxZ
no description
NA
int
z
no description
NA
int
zValues
no description
NA
int
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
render
parameters to connect to render server
(REQUIRED)
dict
output_stack
no description
(REQUIRED)
str
close_stack
no description
False
bool
overwrite_zlayer
no description
False
bool
output_stackVersion
no description
NA
dict
metafile
metadata file containing TEMCA acquisition data
NA
str
metafile_uri
uri of metadata containing TEMCA acquisition data
(REQUIRED)
str
maskUrl
absolute path to image mask to apply
None
str
maskUrl_uri
uri of image mask to apply
None
str
image_directory
directory used in determining absolute paths to images. Defaults to parent directory containing metafile if omitted.
NA
str
image_prefix
prefix used in determining full uris of images in metadata. Defaults to using the / delimited prefix to the metadata_uri if omitted
NA
str
maximum_intensity
intensity value to interpret as white
255
int
minimum_intensity
intensity value to interpret as black
0
int
sectionId
sectionId to apply to tiles during ingest. If unspecified will default to a string representation of the float value of z_index.
NA
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.dataimport.schemas.GenerateMipMapsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
levels
no description
(REQUIRED)
int
output_prefix
no description
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.dataimport.schemas.GenerateMipMapsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
InputStackParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
minZ
no description
NA
int
maxZ
no description
NA
int
z
no description
NA
int
zValues
no description
NA
int
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
render
parameters to connect to render server
(REQUIRED)
dict
input_stack
no description
(REQUIRED)
str
output_dir
directory to which the mipmaps will be stored
NA
str
output_prefix
uri prefix for generated mipmaps
(REQUIRED)
str
method
method to downsample mipmapLevels, ‘PIL’ for PIL Image (currently NEAREST) filtered resize, can be ‘block_reduce’ for skimage based area downsampling
block_reduce
str
convert_to_8bit
convert the data from 16 to 8 bit (default True)
True
bool
pool_size
number of cores to be used
20
int
imgformat
image format for mipmaps (default tiff)
tiff
str
levels
number of levels of mipmaps, default is 6
6
int
force_redo
force re-generation of existing mipmaps
True
bool
PIL_filter
filter to be used in PIL resize
NEAREST
str
block_func
function to represent blocks in area downsampling with block_reduce
mean
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.dataimport.schemas.MakeMontageScapeSectionStackOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
DefaultSchema
key
description
default
field_type
json_type
output_stack
Name of the downsampled sections stack
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.dataimport.schemas.MakeMontageScapeSectionStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
OutputStackParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
key
description
default
field_type
json_type
pool_size
no description
1
int
minZ
no description
NA
int
maxZ
no description
NA
int
z
no description
NA
int
zValues
no description
NA
int
input_json
file path of input json file
NA
str
output_json
file path to output json file
NA
str
log_level
set the logging level of the module
ERROR
str
render
parameters to connect to render server
(REQUIRED)
dict
output_stack
no description
(REQUIRED)
str
close_stack
no description
False
bool
overwrite_zlayer
no description
False
bool
output_stackVersion
no description
NA
dict
montage_stack
stack to make a downsample version of
(REQUIRED)
str
image_directory
directory that stores the montage scapes
(REQUIRED)
str
set_new_z
set to assign new z values starting from 0 (default - False)
False
bool
new_z_start
new starting z index
0
int
remap_section_ids
change section ids to new z values. default = False
False
bool
imgformat
image format of the montage scapes (default - tif)
tif
str
scale
scale of montage scapes
(REQUIRED)
float
apply_scale
Do you want to scale the downsample to the size of section? Default = False
False
bool
doFilter
whether to apply default filtering when generating missing downsamples
True
bool
level
integer mipMapLevel used to generate missing downsamples
1
int
fillWithNoise
Whether to fill the background pixels with noise when generating missing downsamples
False
bool
memGB_materialize
Java heap size in GB for materialization
12G
str
pool_size_materialize
number of processes to generate missing downsamples
1
int
filterListName
Apply specified filter list to all renderings
NA
str
uuid_prefix
Prepend uuid to generated tileIds to prevent collisions
True
bool
uuid_length
length of uuid4 string used in uuid prefix
10
int
- opts = <marshmallow.schema.SchemaOpts object>