Welcome to ASAP’s documentation!
README
ASAP-modules
ASAP is a set of modules to perform stitching and alignment of EM and Array tomography data. It is suitable for processing large-scale datasets and supports multiple computational environments.
Installation
Please refer the documentation Installation:Installation. on how to install and use ASAP modules
How to run
The order of processing is as follows;
Other Modules
A few other modules are included in ASAP to do the following.
Materialization - render intermediate/final aligned volume to disk for further processing
Fusion - Fuse global 3D non-linear aligned chunks together to make a complete volume
Point match filter - A module that performs point match filtering of an existing point match collection
Point match optimization - Performs a parameter sweep from a given set of ranges on a random sample of tilepairs to identify the optimal set of parameters
Registration - Register individual sections in an already aligned volume (useful in cases of aligning missing/reimaged sections)
Support
We are planning on occasional updating this tool with no fixed schedule. Community involvement is encouraged through both issues and pull requests. Please make pull requests against the dev branch, as we will test changes there before merging into master.
Acknowledgments
This project is supported by the Intelligence Advanced Research Projects Activity (IARPA) via Department of Interior / Interior Business Center (DoI/IBC) contract number D16PC00004. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation theron.
Disclaimer: The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of IARPA, DoI/IBC, or the U.S. Government.
Installation
Prerequisites
ASAP requires Render web service (https://github.com/saalfeldlab/render) to be installed for storing and processing the data. Please refer to Render for details on its installation.
Installing ASAP-modules
ASAP can be installed using the following commands.
Clone this repository
# git clone this repository
git clone https://github.com/AllenInstitute/asap-modules .
Install from source
CD to the cloned directory and run setup.py
python setup.py install
Docker setup
You can also install asap-modules using the provided docker file
docker build -t asap-modules:latest --target asap-modules .
Running docker
The built docker image can then be run using the following command
docker run --rm asap-modules:latest
Running modules of ASAP
Once ASAP is installed using the above command, you can use all of its functionalities as follows;
python -m asap.<submodule>.<function_to_run> --input_json <input_json_file.json> --output_json <output_json_file.json>
For example, the montage qc module can be run using the following command.
python -m asap.em_montage_qc.detect_montage_defects --input_json <your_input_json_file_with_required_parameters> --output_json <output_json_file_with_full_path>
and here is an example input json file for the detect_montage_defects module
{
"render":{
"host": <render_host>,
"port": <render_port>,
"owner": <render_project_owner>,
"project": <render_project_name>,
"client_scripts": <path_to_render_client_scripts>
},
"prestitched_stack": <pre_montage_stack>,
"poststitched_stack": <montaged_stack>,
"match_collection_owner": <owner_of_point_match_collection>,
"match_collection": <name_of_point_match_collection>,
"out_html_dir": <path_to_directory_to_store_the_qc_plot_html_file>,
"plot_sections": <True/False>,
"minZ": <z_index_of_the_first_section_to_run_qc_for>,
"maxZ": <z_index_of_the_last_section_to_run_qc_for>,
"neighbors_distance": <qc_parameter>,
"min_cluster_size": <qc_parameter>,
"residual_threshold": <qc_parameter>,
"pool_size": <pool_size_for_parallel_processing>
}
The list of parameters required for each module can be found out using the –help option.
# find the list of parameters for the solver module using its help option
python -m asap.solver.solve --help
Lens distortion correction
The lens distortion correction transforms can be computed using the following modules
Step 1 - Compute lens distortion correction
Compute lens distortion correction transformation
(Assumes that the images for computation are loaded into a render stack. )
python -m asap.mesh_lens_correction.do_mesh_lens_correction --input_json <input_parameter_json_file> --output_json <output_json_file>
An example input json file is provided in the do_mesh_lens_correcton.py file
Step 2 - Apply lens correction
Apply lens correction transformations to the input render stack (update the raw tilespecs)
python -m asap.lens_correction.apply_lens_correction --input_json <input_parameter_json_file> --output_json <output_json_file>
An example input json file is provided in the apply_lens_correction.py file
Generate MIPmaps
MIPmaps are essential for stitching and alignment and is used to generate point matches, used for visualization, etc.
MIPmaps can be generated for a dataset loaded into a render stack.
Step 1 - Generate MIPmaps
python -m asap.dataimport.create_mipmaps --input_json <input_parameter_json_file> --output_json <output_json_file>
Step 2 - Apply MIPmaps to Render stack
python -m asap.dataimport.apply_mipmaps_to_render --input_json <input_parameter_json_file> --output_json <output_json_file>
Example input parameter json files are included in the module’s script files.
2D Stitching
2D stitching of serial sections involves the following process
Step 1 - Create tilepairs
python -m asap.pointmatch.create_tilepairs --input_json <input_parameter_json_file> --output_json <output_json_file>
Step 2 - Generate point matches for the serial section
ASAP utilizes the SIFT point matching module in Render to compute the point matches. There also exists an opencv version of SIFT computation in ASAP.
Point matching implementation from Render to be run on Spark cluster
This requires Spark to be installed in the setup.
python -m asap.pointmatch.generate_point_matches_spark --input_json <input_parameter_json_file> --output_json <output_json_file>
Point matching implementation from Render to be run on PBS cluster
python -m asap.pointmatch.generate_point_matches_qsub --input_json <input_parameter_json_file> --output_json <output_json_file>
Point matching implementation using opencv
python -m asap.pointmatch.generate_point_matches_opencv --input_json <input_parameter_json_file> --output_json <output_json_file>
The point matches will be saved in a point match collection in the Render web service.
Step 3 - Solve for transformations
The bigfeta solver can be invoked from asap to solve for transformations using the following commmand
python -m asap.solver.solve --input_json <input_parameter_json_file> --output_json <output_json_file>
Step 4 - Montage QC
The solver writes the transformations in the tilespecs associated with the serial section in the render stack. Once this is done, the QC module can be run to gather statistics about the quality of the stitching and also visualization plots of the stitched section.
python -m asap.em_montage_qc.detect_montage_defects --input_json <input_parameter_json_file> --output_json <output_json_file>
The QC plots will be saved in the output directory specified in the input_parameter_json_file and the sections with issues will be found in the output_json_file.
Global 3D non-linear alignment
Global 3D non-linear alignment can be performed on a stack in chunks as well as the entire dataset (if all the serial sections are montaged and available). The following steps illustrate the global 3D non-linear alignment process.
Step 1 - Montage scapes generation
Montage scapes are downsampled versions of the serial sections and are used in the global 3D alignment process. Montage scapes can be generated as follows.
# Generate downsampled versions of montaged serial sections
python -m asap.materialize.render_downsample_sections --input_json <input_parameter_json_file> --output_json <output_json_file>
# Create a downsampled montage stack
python -m asap.dataimport.make_montage_scapes_stack --input_json <input_parameter_json_file> --output_json <output_json_file>
Step 2 - Generate tilepairs
3D tilepairs for the downsampled stack can be generated using the following command.
python -m asap.pointmatch.create_tilepairs --input_json <input_parameter_json_file> --output_json <output_json_file>
Step 3 - Generate point matches
3D point matches can be generated using the generated tile pairs. The following command can be used to generate point matches using a Spark cluster
python -m asap.pointmatch.generate_point_matches_using_spark --input_json <input_parameter_json_file> --output_json <output_json_file>
Step 4 - Solve for 3D non-linear transformations
This step in practice is done as a multi-step 3D alignment process, where a series of transformations (rigid, affine, non-linear) are computed and used as initialization for the computation of next higher order transformation.
A mesh based alignment can also be applied as a last step and is available in Bigfeta.
The command to run the solver is shown below.
python -m asap.solver.solve --input_json <input_parameter_json_file> --output_json <output_json_file>
NOTE: Each of the modules’ script include an example input json file for reference and the list of input and output parameters can also be listed using the –help option in each of the above commands.
asap-modules
asap package
Subpackages
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:
asap.module.render_module.StackTransitionModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
AddMipMapsToStackParameters
- default_output_schema
- default_schema
alias of
asap.dataimport.schemas.AddMipMapsToStackParameters
asap.dataimport.create_mipmaps module
- exception asap.dataimport.create_mipmaps.CreateMipMapException[source]
Bases:
asap.module.render_module.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:
asap.module.render_module.StackOutputModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
GenerateEMTileSpecsParameters
- default_output_schema
- default_schema
alias of
asap.dataimport.schemas.GenerateEMTileSpecsParameters
asap.dataimport.generate_mipmaps module
- class asap.dataimport.generate_mipmaps.GenerateMipMaps(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.StackInputModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
GenerateMipMapsParameters
- default_output_schema
- default_schema
- 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:
asap.module.render_module.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
asap.dataimport.schemas.MakeMontageScapeSectionStackOutput
- default_schema
alias of
asap.dataimport.schemas.MakeMontageScapeSectionStackParameters
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:
argschema.schemas.DefaultSchema
AddMipMapsToStackOutput 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:
asap.module.schemas.stack_schemas.StackTransitionParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
AddMipMapsToStackParameters 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:
argschema.schemas.DefaultSchema
GenerateEMTileSpecsOutput 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:
asap.module.schemas.stack_schemas.OutputStackParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
GenerateEMTileSpecsParameters 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:
argschema.schemas.DefaultSchema
GenerateMipMapsOutput 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:
asap.module.schemas.stack_schemas.InputStackParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
GenerateMipMapsParameters 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:
argschema.schemas.DefaultSchema
MakeMontageScapeSectionStackOutput 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:
asap.module.schemas.stack_schemas.OutputStackParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
MakeMontageScapeSectionStackParameters 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>
Module contents
asap.em_montage_qc package
Submodules
asap.em_montage_qc.detect_montage_defects module
asap.em_montage_qc.plots module
asap.em_montage_qc.schemas module
- class asap.em_montage_qc.schemas.DetectMontageDefectsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
,asap.module.schemas.stack_schemas.ZValueParameters
,asap.module.schemas.stack_schemas.ProcessPoolParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
DetectMontageDefectsParameters 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
prestitched_stack
Pre stitched stack (raw stack)
(REQUIRED)
str
poststitched_stack
Stitched montage stack
(REQUIRED)
str
match_collection
Name of the montage point match collection
NA
str
match_collection_owner
Name of the match collection owner
None
str
residual_threshold
threshold value to filter residuals for detecting seams (default = 4)
4
int
neighbors_distance
distance in pixels to look for neighboring points in seam detection (default = 60)
80
int
min_cluster_size
minimum number of point matches required in each cluster for taking it into account for seam detection (default = 7)
12
int
plot_sections
Do you want to plot the sections with defects (holes or gaps)?. Will plot Bokeh plots in a html file
True
bool
out_html_dir
Folder to save the Bokeh plot defaults to /tmp directory
None
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.em_montage_qc.schemas.DetectMontageDefectsParametersOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
DetectMontageDefectsParametersOutput key
description
default
field_type
json_type
output_html
Output html file with Bokeh plots showing holes and stitching gaps
None
str
qc_passed_sections
List of sections that passed QC
(REQUIRED)
int
hole_sections
List of z values which failed QC and has holes
(REQUIRED)
int
gap_sections
List of z values which have stitching gaps
(REQUIRED)
int
seam_sections
List of z values which have seams detected
(REQUIRED)
int
seam_centroids
An array of (x,y) positions of seams for each section with seams
(REQUIRED)
?
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.em_montage_qc.schemas.RoughQCOutputSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
RoughQCOutputSchema key
description
default
field_type
json_type
iou_plot
Pdf/html file showing IOU plots
(REQUIRED)
str
distortion_plot
Pdf/html file with distortion plots
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.em_montage_qc.schemas.RoughQCSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
RoughQCSchema key
description
default
field_type
json_type
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_downsampled_stack
Pre rough aligned downsampled stack
(REQUIRED)
str
output_downsampled_stack
Rough aligned stack name
(REQUIRED)
str
minZ
min z
(REQUIRED)
int
maxZ
max z
(REQUIRED)
int
pool_size
Pool size
10
int
output_dir
temp filename to save fig
None
str
out_file_format
Do you want the output to be bokeh plots in html (option = ‘html’) or pdf files for plots (option = ‘pdf’, default)
pdf
str
- opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.intensity_correction package
Submodules
asap.intensity_correction.apply_multiplicative_correction module
- class asap.intensity_correction.apply_multiplicative_correction.MultIntensityCorr(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.StackTransitionModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
MultIntensityCorrParams
- default_schema
alias of
asap.intensity_correction.schemas.MultIntensityCorrParams
- asap.intensity_correction.apply_multiplicative_correction.getImage(ts, channel=None)[source]
Simple function to get the level 0 image of this tilespec as a numpy array
- Parameters
ts (renderapi.tilespec.TileSpec) – tilespec to get images from (presently assumes this is a tiff image whose URL can be read with tifffile)
channel (str) – channel name to get image of, default=None which will default to the non channel image pyramid
- Returns
2d numpy array of this image
- Return type
numpy.array
- asap.intensity_correction.apply_multiplicative_correction.intensity_corr(img, ff, clip, scale_factor, clip_min, clip_max)[source]
utility function to correct an image with a flatfield correction will take img and return img_out = img * max(ff) / (ff + .0001) converted back to the original type of img
- Parameters
img (numpy.array) – N,M array to correct, could be any type
ff (numpy.array) – N,M array of flatfield correction, could be of any type
- Returns
N,M numpy array of the same type as img but now corrected
- Return type
numpy.array
- asap.intensity_correction.apply_multiplicative_correction.process_tile(C, dirout, stackname, clip, scale_factor, clip_min, clip_max, input_ts, corr_dict=None)[source]
function to correct each tile in the input_ts with the matrix C, and potentially move the original tiles to a new location.abs
- Parameters
C (numpy.array) – a 2d numpy array of uint16 or uint8 that represents the correction to apply
corr_dict (dict or None) – a dictionary with keys of strings of channel names and values of corrections (as with C). If None, C will be applied to each channel, if they exist.
dirout (str) – the path to the directory to save all corrected images
input_ts (renderapi.tilespec.TileSpec) – the tilespec with the tiles to be corrected
asap.intensity_correction.calculate_multiplicative_correction module
- class asap.intensity_correction.calculate_multiplicative_correction.MakeMedian(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
MakeMedianParams
- default_schema
- asap.intensity_correction.calculate_multiplicative_correction.getImageFromTilespecs(alltilespecs, index, channel=None)[source]
asap.intensity_correction.schemas module
- class asap.intensity_correction.schemas.MakeMedianParams(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.stack_schemas.StackTransitionParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
MakeMedianParams 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
file_prefix
File prefix for median image file that is saved
Median
str
output_directory
Output Directory for saving median image
(REQUIRED)
str
num_images
Number of images to randomly subsample to generate median
-1
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.intensity_correction.schemas.MultIntensityCorrParams(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.stack_schemas.StackTransitionParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
MultIntensityCorrParams 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
correction_stack
Correction stack (usually median stack for AT data)
(REQUIRED)
str
output_directory
Directory for storing Images
(REQUIRED)
str
cycle_number
what cycleNumber to upload for output_stack on render
2
int
cycle_step_number
what cycleStepNumber to upload for output_stack on render
1
int
clip
whether to clip values
True
bool
scale_factor
scaling value
1.0
float
clip_min
Min Clip value
0
int
clip_max
Max Clip value
65535
int
- opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.lens_correction package
Submodules
asap.lens_correction.apply_lens_correction module
- class asap.lens_correction.apply_lens_correction.ApplyLensCorrection(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.StackTransitionModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
ApplyLensCorrectionParameters
- default_output_schema
alias of
asap.lens_correction.schemas.ApplyLensCorrectionOutput
- default_schema
alias of
asap.lens_correction.schemas.ApplyLensCorrectionParameters
asap.lens_correction.lens_correction module
asap.lens_correction.schemas module
- class asap.lens_correction.schemas.ApplyLensCorrectionOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
ApplyLensCorrectionOutput key
description
default
field_type
json_type
stack
stack to which transformed tiles were written
(REQUIRED)
str
refId
unique identifier string used as reference ID
(REQUIRED)
str
missing_ts_zs
Z values for which apply mipmaps failed
[]
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.lens_correction.schemas.ApplyLensCorrectionParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.stack_schemas.StackTransitionParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
ApplyLensCorrectionParameters 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
transform
no description
NA
dict
refId
Reference ID to use when uploading transform to render database (Not Implemented)
(REQUIRED)
str
labels
labels for the lens correction transform
[‘lens’]
str
maskUrl
path to level 0 maskUrl to apply to stack
None
str
maskUrl_uri
uri for level 0 mask image to apply
None
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.lens_correction.schemas.TransformParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
TransformParameters key
description
default
field_type
json_type
type
Transform type as defined in Render Transform Spec. This module currently expects a ‘leaf’
(REQUIRED)
str
className
mpicbg-compatible className
(REQUIRED)
str
dataString
mpicbg-compatible dataString
(REQUIRED)
str
metaData
in this schema, otherwise will be stripped
NA
?
- opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.materialize package
Submodules
asap.materialize.materialize_sections module
Materialize Render sections using BetterBox client
- class asap.materialize.materialize_sections.MaterializeSectionsModule(input_data=None, schema_type=None, output_schema_type=None, args=None, logger_name='argschema.argschema_parser')[source]
Bases:
asap.module.render_module.SparkModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
MaterializeSectionsParameters
- default_output_schema
- default_schema
alias of
asap.materialize.schemas.MaterializeSectionsParameters
- classmethod get_materialize_options(baseDataUrl=None, owner=None, project=None, stack=None, rootDirectory=None, width=None, height=None, maxLevel=None, fmt=None, maxOverviewWidthAndHeight=None, skipInterpolation=None, binaryMask=None, label=None, createIGrid=None, forceGeneration=None, renderGroup=None, numberOfRenderGroups=None, cleanUpPriorRun=None, filterListName=None, explainPlan=None, maxImageCacheGb=None, zValues=None, **kwargs)[source]
asap.materialize.render_downsample_sections module
- class asap.materialize.render_downsample_sections.RenderSectionAtScale(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
RenderSectionAtScaleParameters
- default_output_schema
alias of
asap.materialize.schemas.RenderSectionAtScaleOutput
- default_schema
alias of
asap.materialize.schemas.RenderSectionAtScaleParameters
- class asap.materialize.render_downsample_sections.WithThreadPool(*args, **kwargs)[source]
Bases:
multiprocessing.pool.ThreadPool
asap.materialize.schemas module
- class asap.materialize.schemas.Bounds(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
Bounds key
description
default
field_type
json_type
minX
minX of bounds
None
int
maxX
maxX of bounds
None
int
minY
minY of bounds
None
int
maxY
maxY of bounds
None
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.DeleteMaterializedSectionsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.DeleteMaterializedSectionsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.ArgSchema
This schema is designed to be a schema_type for an ArgSchemaParser object
DeleteMaterializedSectionsParameters key
description
default
field_type
json_type
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
minZ
no description
(REQUIRED)
int
maxZ
no description
(REQUIRED)
int
basedir
base directory for materialization
(REQUIRED)
str
pool_size
size of pool to use to delete files
NA
int
tilesource
no description
5
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.MaterializeSectionsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
MaterializeSectionsOutput key
description
default
field_type
json_type
zValues
no description
(REQUIRED)
int
rootDirectory
no description
(REQUIRED)
str
materializedDirectory
no description
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.MaterializeSectionsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.ArgSchema
,asap.module.schemas.renderclient_schemas.MaterializedBoxParameters
,asap.module.schemas.renderclient_schemas.ZRangeParameters
,asap.module.schemas.renderclient_schemas.RenderParametersRenderWebServiceParameters
,asap.module.schemas.spark_schemas.SparkParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
MaterializeSectionsParameters key
description
default
field_type
json_type
jarfile
spark jar to call java spark command
(REQUIRED)
str
className
spark class to call
(REQUIRED)
str
driverMemory
spark driver memory (important for local spark)
6g
str
memory
Memory required for spark job
NA
str
sparkhome
Spark home directory containing bin/spark_submit
(REQUIRED)
str
spark_files
list of spark files to add to the spark submit command
NA
str
spark_conf
dictionary of key value pairs to add to spark_submit as –conf key=value
NA
?
masterUrl
spark master url. For local execution local[num_procs,num_retries]
(REQUIRED)
str
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of target collection
NA
str
project
project fo target collection
NA
str
render
no description
NA
dict
minZ
minimum Z integer
NA
int
maxZ
maximum Z integer
NA
int
stack
stack fromw which boxes will be materialized
(REQUIRED)
str
rootDirectory
directory in which materialization directory structure will be created (structure is <rootDirectory>/<project>/<stack>/<width>x<height>/<mipMapLevel>/<z>/<row>/<col>.<fmt>)
(REQUIRED)
str
width
width of flat rectangular tiles to generate
(REQUIRED)
int
height
height of flat rectangular tiles to generate
(REQUIRED)
int
maxLevel
maximum mipMapLevel to generate.
0
int
fmt
image format to generate mipmaps – PNG if not specified
NA
str
maxOverviewWidthAndHeight
maximum pixel size for width or height of overview image. If excluded or 0, no overview generated.
NA
int
skipInterpolation
whether to skip interpolation (e.g. DMG data)
NA
bool
binaryMask
whether to use binary mask (e.g. DMG data)
NA
bool
label
whether to generate single color tile labels rather than actual images
NA
bool
createIGrid
whther to create an IGrid file
NA
bool
forceGeneration
whether to regenerate existing tiles
NA
bool
renderGroup
index (1-n) identifying coarse portion of layer to render
NA
int
numberOfRenderGroups
used in conjunction with renderGroup, total number of groups being used
NA
int
filterListName
Apply specified filter list to all renderings
NA
str
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
cleanUpPriorRun
whether to regenerate most recently generated boxes of an identical plan. Useful for rerunning failed jobs.
NA
bool
explainPlan
whether to perform a dry run, logging as partition stages are run but skipping materialization
NA
bool
maxImageCacheGb
maximum image cache in GB of tilespec level 0 data to cache per core. Larger values may degrade performance due to JVM garbage collection.
2.0
float
zValues
z indices to materialize
NA
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.RenderSectionAtScaleOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
RenderSectionAtScaleOutput key
description
default
field_type
json_type
image_directory
Directory in which the downsampled section images are saved
(REQUIRED)
str
temp_stack
The temp stack that was used to generate the downsampled sections
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.RenderSectionAtScaleParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
RenderSectionAtScaleParameters key
description
default
field_type
json_type
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
Input stack to make the downsample version of
(REQUIRED)
str
image_directory
Directory to save the downsampled sections
(REQUIRED)
str
imgformat
Image format (default - png)
png
str
doFilter
Apply filtering before rendering
True
bool
fillWithNoise
Fill image with noise (default - False)
False
bool
scale
scale of the downsampled sections
(REQUIRED)
float
minZ
min Z to create the downsample section from
-1
int
maxZ
max Z to create the downsample section from
-1
int
filterListName
Apply specified filter list to all renderings
NA
str
bounds
no description
None
dict
use_stack_bounds
Do you want to use stack bounds while downsampling?. Default=False
False
bool
pool_size
number of parallel threads to use
20
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.ValidateMaterializationOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
ValidateMaterializationOutput key
description
default
field_type
json_type
basedir
no description
(REQUIRED)
str
failures
no description
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.materialize.schemas.ValidateMaterializationParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.ArgSchema
This schema is designed to be a schema_type for an ArgSchemaParser object
ValidateMaterializationParameters key
description
default
field_type
json_type
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
minRow
minimum row to attempt to validate tiles. Will attempt to use stack bounds if None
NA
int
maxRow
no description
NA
int
minCol
no description
NA
int
maxCol
no description
NA
int
minZ
no description
(REQUIRED)
int
maxZ
no description
(REQUIRED)
int
ext
no description
png
str
basedir
base directory for materialization
(REQUIRED)
str
pool_size
size of pool to use to investigate image validity
NA
int
- opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.module package
Subpackages
- class asap.module.schemas.renderclient_schemas.FeatureExtractionParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
FeatureExtractionParameters key
description
default
field_type
json_type
SIFTfdSize
SIFT feature descriptor size – samples per row and column. 8 if excluded or None
NA
int
SIFTminScale
SIFT minimum scale – minSize * minScale < size < maxSize * maxScale. 0.5 if excluded or None
NA
float
SIFTmaxScale
SIFT maximum scale – minSize * minScale < size < maxSize * maxScale. 0.85 if excluded or None
NA
float
SIFTsteps
SIFT steps per scale octave. 3 if excluded or None
NA
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.renderclient_schemas.FeatureRenderClipParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
FeatureRenderClipParameters key
description
default
field_type
json_type
clipWidth
Full scale pixels to include in clipped rendering of LEFT/RIGHT oriented tile pairs. Will not LEFT/RIGHT clip if excluded or None.
NA
int
clipHeight
Full scale pixels to include in clipped rendering of TOP/BOTTOM oriented tile pairs. Will not TOP/BOTTOM clip if excluded or None.
NA
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.renderclient_schemas.FeatureRenderParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
FeatureRenderParameters key
description
default
field_type
json_type
renderScale
Scale at which image tiles will be rendered. 1.0 (full scale) if excluded or None
NA
float
renderWithFilter
Render tiles using default filtering (0 and 255 pixel values replaced with integer in U(64, 191), followed by default NormalizeLocalContrast). True if excluded or None
NA
bool
renderWithoutMask
Render tiles without mipMapLevel masks. True if excluded or None
NA
bool
renderFullScaleWidth
Full scale width for all rendered tiles
NA
int
renderFullScaleHeight
Full scale height for all rendered tiles
NA
int
fillWithNoise
Fill each canvas image with noise prior to rendering. True if excluded or None
NA
bool
renderFilterListName
Apply specified filter list to all renderings
NA
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.renderclient_schemas.FeatureStorageParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
FeatureStorageParameters key
description
default
field_type
json_type
rootFeatureDirectory
Root directory for saved feature lists. Features extracted from dynamically rendered canvases if excluded or None.
NA
str
requireStoredFeatures
Whether to throw an exception in case features stored in rootFeatureDirectory cannot be found. Missing features are extracted from dynamically rendered canvases if excluded or None
NA
bool
maxFeatureCacheGb
Maximum size of feature cache, in GB. 2GB if excluded or None
NA
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.renderclient_schemas.MatchDerivationParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
MatchDerivationParameters key
description
default
field_type
json_type
matchRod
Ratio of first to second nearest neighbors used as a cutoff in matching features. 0.92 if excluded or None
NA
float
matchModelType
Model to match for RANSAC filtering. ‘AFFINE’ if excluded or None
NA
str
matchIterations
RANSAC filter iterations. 1000 if excluded or None
NA
int
matchMaxEpsilon
no description
NA
float
matchMinInlierRatio
Minimal ratio of inliers to candidates for successful RANSAC filtering. 0.0 if excluded or None
NA
float
matchMinNumInliers
Minimum absolute number of inliers for successful RANSAC filtering. 4 if excluded or None
NA
int
matchMaxNumInliers
Maximum absolute number of inliers allowed after RANSAC filtering. unlimited if excluded or None
NA
int
matchMaxTrust
Maximum trust for filtering such that candidates with cost larger than matchMaxTrust * median cost are rejected. 3.0 if excluded or None
NA
float
matchFilter
whether to match one set of matches, or multiple sets. And, whether to keep them separate, or aggregate them. SINGLE_SET if excluded or None.
NA
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.renderclient_schemas.MatchWebServiceParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.renderclient_schemas.WebServiceParameters
MatchWebServiceParameters key
description
default
field_type
json_type
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of match collection
NA
str
collection
match collection name
NA
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.renderclient_schemas.MaterializedBoxParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
MaterializedBoxParameters key
description
default
field_type
json_type
stack
stack fromw which boxes will be materialized
(REQUIRED)
str
rootDirectory
directory in which materialization directory structure will be created (structure is <rootDirectory>/<project>/<stack>/<width>x<height>/<mipMapLevel>/<z>/<row>/<col>.<fmt>)
(REQUIRED)
str
width
width of flat rectangular tiles to generate
(REQUIRED)
int
height
height of flat rectangular tiles to generate
(REQUIRED)
int
maxLevel
maximum mipMapLevel to generate.
0
int
fmt
image format to generate mipmaps – PNG if not specified
NA
str
maxOverviewWidthAndHeight
maximum pixel size for width or height of overview image. If excluded or 0, no overview generated.
NA
int
skipInterpolation
whether to skip interpolation (e.g. DMG data)
NA
bool
binaryMask
whether to use binary mask (e.g. DMG data)
NA
bool
label
whether to generate single color tile labels rather than actual images
NA
bool
createIGrid
whther to create an IGrid file
NA
bool
forceGeneration
whether to regenerate existing tiles
NA
bool
renderGroup
index (1-n) identifying coarse portion of layer to render
NA
int
numberOfRenderGroups
used in conjunction with renderGroup, total number of groups being used
NA
int
filterListName
Apply specified filter list to all renderings
NA
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.renderclient_schemas.RenderParametersMatchWebServiceParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.renderclient_schemas.MatchWebServiceParameters
RenderParametersMatchWebServiceParameters key
description
default
field_type
json_type
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of match collection
NA
str
collection
match collection name
NA
str
render
no description
NA
dict
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.renderclient_schemas.RenderParametersRenderWebServiceParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.renderclient_schemas.RenderWebServiceParameters
RenderParametersRenderWebServiceParameters key
description
default
field_type
json_type
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of target collection
NA
str
project
project fo target collection
NA
str
render
no description
NA
dict
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.renderclient_schemas.RenderWebServiceParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.renderclient_schemas.WebServiceParameters
RenderWebServiceParameters key
description
default
field_type
json_type
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of target collection
NA
str
project
project fo target collection
NA
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.renderclient_schemas.WebServiceParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
WebServiceParameters key
description
default
field_type
json_type
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.renderclient_schemas.ZRangeParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
ZRangeParameters key
description
default
field_type
json_type
minZ
minimum Z integer
NA
int
maxZ
maximum Z integer
NA
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.schemas.RenderClientParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
RenderClientParameters key
description
default
field_type
json_type
host
render host
(REQUIRED)
str
port
render post integer
(REQUIRED)
int
owner
render default owner
(REQUIRED)
str
project
render default project
(REQUIRED)
str
client_scripts
path to render client scripts
(REQUIRED)
str
memGB
string describing java heap memory (default 5G)
5G
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.schemas.RenderParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.ArgSchema
This schema is designed to be a schema_type for an ArgSchemaParser object
RenderParameters key
description
default
field_type
json_type
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
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.schemas.TemplateOutputParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
TemplateOutputParameters key
description
default
field_type
json_type
output_value
an output of the module
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.schemas.TemplateParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
TemplateParameters key
description
default
field_type
json_type
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
example
an example
(REQUIRED)
str
default_val
an example with a default
a default value
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.spark_schemas.SparkOptions(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
SparkOptions key
description
default
field_type
json_type
jarfile
spark jar to call java spark command
(REQUIRED)
str
className
spark class to call
(REQUIRED)
str
driverMemory
spark driver memory (important for local spark)
6g
str
memory
Memory required for spark job
NA
str
sparkhome
Spark home directory containing bin/spark_submit
(REQUIRED)
str
spark_files
list of spark files to add to the spark submit command
NA
str
spark_conf
dictionary of key value pairs to add to spark_submit as –conf key=value
NA
?
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.spark_schemas.SparkParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.spark_schemas.SparkOptions
SparkParameters key
description
default
field_type
json_type
jarfile
spark jar to call java spark command
(REQUIRED)
str
className
spark class to call
(REQUIRED)
str
driverMemory
spark driver memory (important for local spark)
6g
str
memory
Memory required for spark job
NA
str
sparkhome
Spark home directory containing bin/spark_submit
(REQUIRED)
str
spark_files
list of spark files to add to the spark submit command
NA
str
spark_conf
dictionary of key value pairs to add to spark_submit as –conf key=value
NA
?
masterUrl
spark master url. For local execution local[num_procs,num_retries]
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.stack_schemas.InputStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
,asap.module.schemas.stack_schemas.ZValueParameters
,asap.module.schemas.stack_schemas.OverridableParameterSchema
template schema for schemas which take input from a stack
This schema is designed to be a schema_type for an ArgSchemaParser object
InputStackParameters 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
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.stack_schemas.OutputStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
,asap.module.schemas.stack_schemas.ZValueParameters
,asap.module.schemas.stack_schemas.ProcessPoolParameters
,asap.module.schemas.stack_schemas.OverridableParameterSchema
template schema for writing tilespecs to an output stack
This schema is designed to be a schema_type for an ArgSchemaParser object
OutputStackParameters 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
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.stack_schemas.OverridableParameterSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.stack_schemas.ProcessPoolParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
ProcessPoolParameters key
description
default
field_type
json_type
pool_size
no description
1
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.stack_schemas.RenderCycle(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
RenderCycle key
description
default
field_type
json_type
number
no description
NA
int
stepNumber
no description
NA
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.stack_schemas.RenderMipMapPathBuilder(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
RenderMipMapPathBuilder key
description
default
field_type
json_type
rootPath
no description
NA
str
numberOfLevels
no description
NA
int
extension
no description
NA
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.stack_schemas.RenderStackVersion(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
RenderStackVersion key
description
default
field_type
json_type
createTimestamp
no description
NA
str
versionNotes
no description
NA
str
cycleNumber
no description
NA
int
cycleStepNumber
no description
NA
int
stackResolutionX
no description
NA
float
stackResolutionY
no description
NA
float
stackResolutionZ
no description
NA
float
materializedBoxRootPath
no description
NA
str
mipmapPathBuilder
no description
NA
dict
cycle
no description
NA
dict
stackResolutionValues
no description
NA
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.stack_schemas.StackTransitionParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.stack_schemas.OutputStackParameters
,asap.module.schemas.stack_schemas.InputStackParameters
template schema for schemas which take input from one stack, perform (mostly render-python based) operations on tiles from that stack, and output tiles to another stack.
This schema is designed to be a schema_type for an ArgSchemaParser object
StackTransitionParameters 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
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.module.schemas.stack_schemas.ZValueParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.stack_schemas.OverridableParameterSchema
template schema which interprets z values on which to act assumes a hierarchy such that minZ, maxZ are superceded by z which is superceded by zValues.
ZValueParameters 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
- opts = <marshmallow.schema.SchemaOpts object>
Submodules
asap.module.render_module module
- class asap.module.render_module.RenderModule(schema_type=None, *args, **kwargs)[source]
Bases:
argschema.argschema_parser.ArgSchemaParser
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
RenderParameters
- default_schema
- exception asap.module.render_module.RenderModuleException[source]
Bases:
Exception
Base Exception class for render module
- class asap.module.render_module.SparkModule(input_data=None, schema_type=None, output_schema_type=None, args=None, logger_name='argschema.argschema_parser')[source]
Bases:
argschema.argschema_parser.ArgSchemaParser
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
SparkParameters
- default_schema
- exception asap.module.render_module.SparkModuleError[source]
Bases:
asap.module.render_module.RenderModuleException
error thrown by asap spark modules
- class asap.module.render_module.StackInputModule(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
InputStackParameters
- default_schema
alias of
asap.module.schemas.stack_schemas.InputStackParameters
- class asap.module.render_module.StackOutputModule(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
OutputStackParameters
- default_schema
alias of
asap.module.schemas.stack_schemas.OutputStackParameters
- class asap.module.render_module.StackTransitionModule(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.StackOutputModule
,asap.module.render_module.StackInputModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
OutputStackParameters
asap.module.template_module module
- class asap.module.template_module.TemplateModule(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
TemplateParameters
- default_output_schema
alias of
asap.module.schemas.schemas.TemplateOutputParameters
- default_schema
Module contents
asap.montage package
Submodules
asap.montage.run_montage_job_for_section module
asap.montage.schemas module
Module contents
asap.point_match_optimization package
Submodules
asap.point_match_optimization.point_match_optimization module
asap.point_match_optimization.schemas module
- class asap.point_match_optimization.schemas.PointMatchOptimizationParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
PointMatchOptimizationParameters key
description
default
field_type
json_type
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
stack
Name of the stack containing the tile pair
(REQUIRED)
str
tile_stack
Name of the stack that will hold these two tiles
None
str
tileId1
tileId of the first tile in the tile pair
(REQUIRED)
str
tileId2
tileId of the second tile in the tile pair
(REQUIRED)
str
pool_size
Pool size for parallel processing
10
int
SIFT_options
no description
(REQUIRED)
dict
outputDirectory
Parent directory in which subdirectories will be created to store images and point-match results from SIFT
(REQUIRED)
str
url_options
no description
(REQUIRED)
dict
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.point_match_optimization.schemas.PointMatchOptimizationParametersOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
PointMatchOptimizationParametersOutput key
description
default
field_type
json_type
output_html
Output html file that shows all the tilepair plot and results
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.point_match_optimization.schemas.PtMatchOptimizationParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
PtMatchOptimizationParameters key
description
default
field_type
json_type
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
stack
Name of the stack containing the tile pair (not the base stack)
(REQUIRED)
str
tile_stack
Name of the stack that will hold these two tiles
None
str
tilepair_file
Tile pair file
(REQUIRED)
str
no_tilepairs_to_test
Number of tilepairs to be tested for optimization - default = 10
10
int
filter_tilepairs
Do you want filter the tilpair file for pairs that overlap? - default = False
False
bool
max_tilepairs_with_matches
How many tilepairs with matches required for selection of optimized parameter set
0
int
numberOfThreads
Number of threads to run point matching job
5
int
SIFT_options
no description
(REQUIRED)
dict
outputDirectory
Parent directory in which subdirectories will be created to store images and point-match results from SIFT
(REQUIRED)
str
url_options
no description
(REQUIRED)
dict
pool_size
Pool size for parallel processing
10
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.point_match_optimization.schemas.PtMatchOptimizationParametersOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
PtMatchOptimizationParametersOutput key
description
default
field_type
json_type
output_html
Output html file that shows all the tilepair plot and results
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.point_match_optimization.schemas.SIFT_options(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
SIFT_options key
description
default
field_type
json_type
SIFTfdSize
SIFT feature descriptor size: how many samples per row and column
[8]
int
SIFTmaxScale
SIFT maximum scale: minSize * minScale < size < maxSize * maxScale
[0.85]
float
SIFTminScale
SIFT minimum scale: minSize * minScale < size < maxSize * maxScale
[0.5]
float
SIFTsteps
SIFT steps per scale octave
[3]
int
matchIterations
Match filter iterations
[1000]
int
matchMaxEpsilon
Minimal allowed transfer error for match filtering
[20.0]
float
matchMaxNumInliers
Maximum number of inliers for match filtering
[500]
int
matchMaxTrust
Reject match candidates with a cost larger than maxTrust * median cost
[3.0]
float
matchMinInlierRatio
Minimal ratio of inliers to candidates for match filtering
[0.0]
float
matchMinNumInliers
Minimal absolute number of inliers for match filtering
[10]
int
matchModelType
Type of model for match filtering Possible Values: [TRANSLATION, RIGID, SIMILARITY, AFFINE]
[‘AFFINE’]
str
matchRod
Ratio of distances for matches
[0.92]
float
renderScale
Render canvases at this scale
[0.35]
float
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.point_match_optimization.schemas.url_options(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
url_options key
description
default
field_type
json_type
normalizeForMatching
normalize for matching
True
bool
renderWithFilter
Render with Filter
True
bool
renderWithoutMask
Render without mask
False
bool
excludeAllTransforms
Exclude all transforms
False
bool
excludeFirstTransformAndAllAfter
Exclude first transfrom and all after
False
bool
excludeTransformsAfterLast
Exclude transforms after last
False
bool
- opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.pointmatch package
Submodules
asap.pointmatch.create_tilepairs module
- class asap.pointmatch.create_tilepairs.TilePairClientModule(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
TilePairClientParameters
- client_class = 'org.janelia.render.client.TilePairClient'
- client_script_name = 'run_ws_client.sh'
- default_output_schema
alias of
asap.pointmatch.schemas.TilePairClientOutputParameters
- default_schema
asap.pointmatch.generate_point_matches_qsub module
- class asap.pointmatch.generate_point_matches_qsub.PointMatchClientModuleQsub(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
RenderParameters
asap.pointmatch.generate_point_matches_spark module
- class asap.pointmatch.generate_point_matches_spark.PointMatchClientModuleSpark(input_data=None, schema_type=None, output_schema_type=None, args=None, logger_name='argschema.argschema_parser')[source]
Bases:
asap.module.render_module.SparkModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
PointMatchClientParametersSpark
- default_output_schema
alias of
asap.pointmatch.schemas.PointMatchClientOutputSchema
- default_schema
alias of
asap.pointmatch.schemas.PointMatchClientParametersSpark
- classmethod get_pointmatch_args(baseDataUrl=None, owner=None, collection=None, pairJson=None, SIFTfdSize=None, SIFTminScale=None, SIFTmaxScale=None, SIFTsteps=None, matchRod=None, matchModelType=None, matchIterations=None, matchMaxEpsilon=None, matchMinInlierRatio=None, matchMinNumInliers=None, matchMaxNumInliers=None, matchMaxTrust=None, maxFeatureCacheGb=None, clipWidth=None, clipHeight=None, renderScale=None, renderWithFilter=None, renderWithoutMask=None, renderFullScaleWidth=None, renderFullScaleHeight=None, fillWithNoise=None, rootFeatureDirectory=None, renderFilterListName=None, requireStoredFeatures=None, matchFilter=None, **kwargs)[source]
asap.pointmatch.schemas module
- class asap.pointmatch.schemas.CollectionId(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
marshmallow.schema.Schema
CollectionId key
description
default
field_type
json_type
owner
owner of collection
(REQUIRED)
str
name
name of collection
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.PointMatchClientOutputSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
marshmallow.schema.Schema
PointMatchClientOutputSchema key
description
default
field_type
json_type
collectionId
collection identifying details
(REQUIRED)
dict
pairCount
number of tile pairs in collection
(REQUIRED)
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.PointMatchClientParametersQsub(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
,asap.pointmatch.schemas.SIFTPointMatchParameters
,asap.module.schemas.spark_schemas.SparkOptions
This schema is designed to be a schema_type for an ArgSchemaParser object
PointMatchClientParametersQsub key
description
default
field_type
json_type
jarfile
spark jar to call java spark command
(REQUIRED)
str
className
spark class to call
(REQUIRED)
str
driverMemory
spark driver memory (important for local spark)
6g
str
memory
Memory required for spark job
NA
str
sparkhome
Path to the spark home directory
/allen/aibs/pipeline/image_processing/volume_assembly/utils/spark
str
spark_files
list of spark files to add to the spark submit command
NA
str
spark_conf
dictionary of key value pairs to add to spark_submit as –conf key=value
NA
?
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of match collection
NA
str
collection
match collection name
NA
str
render
parameters to connect to render server
(REQUIRED)
dict
matchRod
Ratio of first to second nearest neighbors used as a cutoff in matching features. 0.92 if excluded or None
NA
float
matchModelType
Model to match for RANSAC filtering. ‘AFFINE’ if excluded or None
NA
str
matchIterations
RANSAC filter iterations. 1000 if excluded or None
NA
int
matchMaxEpsilon
no description
NA
float
matchMinInlierRatio
Minimal ratio of inliers to candidates for successful RANSAC filtering. 0.0 if excluded or None
NA
float
matchMinNumInliers
Minimum absolute number of inliers for successful RANSAC filtering. 4 if excluded or None
NA
int
matchMaxNumInliers
Maximum absolute number of inliers allowed after RANSAC filtering. unlimited if excluded or None
NA
int
matchMaxTrust
Maximum trust for filtering such that candidates with cost larger than matchMaxTrust * median cost are rejected. 3.0 if excluded or None
NA
float
matchFilter
whether to match one set of matches, or multiple sets. And, whether to keep them separate, or aggregate them. SINGLE_SET if excluded or None.
NA
str
rootFeatureDirectory
Root directory for saved feature lists. Features extracted from dynamically rendered canvases if excluded or None.
NA
str
requireStoredFeatures
Whether to throw an exception in case features stored in rootFeatureDirectory cannot be found. Missing features are extracted from dynamically rendered canvases if excluded or None
NA
bool
maxFeatureCacheGb
Maximum size of feature cache, in GB. 2GB if excluded or None
NA
int
clipWidth
Full scale pixels to include in clipped rendering of LEFT/RIGHT oriented tile pairs. Will not LEFT/RIGHT clip if excluded or None.
NA
int
clipHeight
Full scale pixels to include in clipped rendering of TOP/BOTTOM oriented tile pairs. Will not TOP/BOTTOM clip if excluded or None.
NA
int
renderScale
Scale at which image tiles will be rendered. 1.0 (full scale) if excluded or None
NA
float
renderWithFilter
Render tiles using default filtering (0 and 255 pixel values replaced with integer in U(64, 191), followed by default NormalizeLocalContrast). True if excluded or None
NA
bool
renderWithoutMask
Render tiles without mipMapLevel masks. True if excluded or None
NA
bool
renderFullScaleWidth
Full scale width for all rendered tiles
NA
int
renderFullScaleHeight
Full scale height for all rendered tiles
NA
int
fillWithNoise
Fill each canvas image with noise prior to rendering. True if excluded or None
NA
bool
renderFilterListName
Apply specified filter list to all renderings
NA
str
SIFTfdSize
SIFT feature descriptor size – samples per row and column. 8 if excluded or None
NA
int
SIFTminScale
SIFT minimum scale – minSize * minScale < size < maxSize * maxScale. 0.5 if excluded or None
NA
float
SIFTmaxScale
SIFT maximum scale – minSize * minScale < size < maxSize * maxScale. 0.85 if excluded or None
NA
float
SIFTsteps
SIFT steps per scale octave. 3 if excluded or None
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
pairJson
JSON file where tile pairs are stored (.json, .gz, .zip)
(REQUIRED)
str
pbs_template
pbs template to wrap spark job
(REQUIRED)
str
no_nodes
Number of nodes to run the pbs job
30
int
ppn
Number of processors per node (default = 30)
30
int
queue_name
Name of the queue to submit the job
connectome
str
logdir
location to set logging for qsub command
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.PointMatchClientParametersSpark(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.spark_schemas.SparkParameters
,asap.pointmatch.schemas.SIFTPointMatchParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
PointMatchClientParametersSpark key
description
default
field_type
json_type
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of match collection
NA
str
collection
match collection name
NA
str
render
no description
NA
dict
matchRod
Ratio of first to second nearest neighbors used as a cutoff in matching features. 0.92 if excluded or None
NA
float
matchModelType
Model to match for RANSAC filtering. ‘AFFINE’ if excluded or None
NA
str
matchIterations
RANSAC filter iterations. 1000 if excluded or None
NA
int
matchMaxEpsilon
no description
NA
float
matchMinInlierRatio
Minimal ratio of inliers to candidates for successful RANSAC filtering. 0.0 if excluded or None
NA
float
matchMinNumInliers
Minimum absolute number of inliers for successful RANSAC filtering. 4 if excluded or None
NA
int
matchMaxNumInliers
Maximum absolute number of inliers allowed after RANSAC filtering. unlimited if excluded or None
NA
int
matchMaxTrust
Maximum trust for filtering such that candidates with cost larger than matchMaxTrust * median cost are rejected. 3.0 if excluded or None
NA
float
matchFilter
whether to match one set of matches, or multiple sets. And, whether to keep them separate, or aggregate them. SINGLE_SET if excluded or None.
NA
str
rootFeatureDirectory
Root directory for saved feature lists. Features extracted from dynamically rendered canvases if excluded or None.
NA
str
requireStoredFeatures
Whether to throw an exception in case features stored in rootFeatureDirectory cannot be found. Missing features are extracted from dynamically rendered canvases if excluded or None
NA
bool
maxFeatureCacheGb
Maximum size of feature cache, in GB. 2GB if excluded or None
NA
int
clipWidth
Full scale pixels to include in clipped rendering of LEFT/RIGHT oriented tile pairs. Will not LEFT/RIGHT clip if excluded or None.
NA
int
clipHeight
Full scale pixels to include in clipped rendering of TOP/BOTTOM oriented tile pairs. Will not TOP/BOTTOM clip if excluded or None.
NA
int
renderScale
Scale at which image tiles will be rendered. 1.0 (full scale) if excluded or None
NA
float
renderWithFilter
Render tiles using default filtering (0 and 255 pixel values replaced with integer in U(64, 191), followed by default NormalizeLocalContrast). True if excluded or None
NA
bool
renderWithoutMask
Render tiles without mipMapLevel masks. True if excluded or None
NA
bool
renderFullScaleWidth
Full scale width for all rendered tiles
NA
int
renderFullScaleHeight
Full scale height for all rendered tiles
NA
int
fillWithNoise
Fill each canvas image with noise prior to rendering. True if excluded or None
NA
bool
renderFilterListName
Apply specified filter list to all renderings
NA
str
SIFTfdSize
SIFT feature descriptor size – samples per row and column. 8 if excluded or None
NA
int
SIFTminScale
SIFT minimum scale – minSize * minScale < size < maxSize * maxScale. 0.5 if excluded or None
NA
float
SIFTmaxScale
SIFT maximum scale – minSize * minScale < size < maxSize * maxScale. 0.85 if excluded or None
NA
float
SIFTsteps
SIFT steps per scale octave. 3 if excluded or None
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
pairJson
JSON file where tile pairs are stored (.json, .gz, .zip)
(REQUIRED)
str
jarfile
spark jar to call java spark command
(REQUIRED)
str
className
spark class to call
(REQUIRED)
str
driverMemory
spark driver memory (important for local spark)
6g
str
memory
Memory required for spark job
NA
str
sparkhome
Spark home directory containing bin/spark_submit
(REQUIRED)
str
spark_files
list of spark files to add to the spark submit command
NA
str
spark_conf
dictionary of key value pairs to add to spark_submit as –conf key=value
NA
?
masterUrl
spark master url. For local execution local[num_procs,num_retries]
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.PointMatchOpenCVParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
PointMatchOpenCVParameters key
description
default
field_type
json_type
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
ndiv
one tile per tile pair subdivided into ndiv x ndiv for easier homography finding
8
int
matchMax
per tile pair limit, randomly chosen after SIFT and RANSAC
1000
int
downsample_scale
passed to cv2.resize(fx=, fy=)
0.3
float
SIFT_nfeature
passed to cv2.xfeatures2d.SIFT_create(nfeatures=)
20000
int
SIFT_noctave
passed to cv2.xfeatures2d.SIFT_create(nOctaveLayers=)
3
int
SIFT_sigma
passed to cv2.xfeatures2d.SIFT_create(sigma=)
1.5
float
RANSAC_outlier
passed to cv2.findHomography(src, dst, cv2.RANSAC, outlier)
5.0
float
FLANN_ntree
passed to cv2.FlannBasedMatcher()
5
int
FLANN_ncheck
passed to cv2.FlannBasedMatcher()
50
int
ratio_of_dist
ratio in Lowe’s ratio test
0.7
float
CLAHE_grid
tileGridSize for cv2 CLAHE
None
int
CLAHE_clip
clipLimit for cv2 CLAHE
None
float
pairJson
full path of tilepair json
NA
str
input_stack
Name of raw input lens data stack
NA
str
match_collection
name of point match collection
NA
str
ncpus
number of CPUs to use
-1
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.SIFTPointMatchParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.ArgSchema
,asap.module.schemas.renderclient_schemas.FeatureExtractionParameters
,asap.module.schemas.renderclient_schemas.FeatureRenderParameters
,asap.module.schemas.renderclient_schemas.FeatureRenderClipParameters
,asap.module.schemas.renderclient_schemas.FeatureStorageParameters
,asap.module.schemas.renderclient_schemas.MatchDerivationParameters
,asap.module.schemas.renderclient_schemas.RenderParametersMatchWebServiceParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
SIFTPointMatchParameters key
description
default
field_type
json_type
baseDataUrl
api endpoint url e.g. http://<host>[:port]/render-ws/v1
NA
str
owner
owner of match collection
NA
str
collection
match collection name
NA
str
render
no description
NA
dict
matchRod
Ratio of first to second nearest neighbors used as a cutoff in matching features. 0.92 if excluded or None
NA
float
matchModelType
Model to match for RANSAC filtering. ‘AFFINE’ if excluded or None
NA
str
matchIterations
RANSAC filter iterations. 1000 if excluded or None
NA
int
matchMaxEpsilon
no description
NA
float
matchMinInlierRatio
Minimal ratio of inliers to candidates for successful RANSAC filtering. 0.0 if excluded or None
NA
float
matchMinNumInliers
Minimum absolute number of inliers for successful RANSAC filtering. 4 if excluded or None
NA
int
matchMaxNumInliers
Maximum absolute number of inliers allowed after RANSAC filtering. unlimited if excluded or None
NA
int
matchMaxTrust
Maximum trust for filtering such that candidates with cost larger than matchMaxTrust * median cost are rejected. 3.0 if excluded or None
NA
float
matchFilter
whether to match one set of matches, or multiple sets. And, whether to keep them separate, or aggregate them. SINGLE_SET if excluded or None.
NA
str
rootFeatureDirectory
Root directory for saved feature lists. Features extracted from dynamically rendered canvases if excluded or None.
NA
str
requireStoredFeatures
Whether to throw an exception in case features stored in rootFeatureDirectory cannot be found. Missing features are extracted from dynamically rendered canvases if excluded or None
NA
bool
maxFeatureCacheGb
Maximum size of feature cache, in GB. 2GB if excluded or None
NA
int
clipWidth
Full scale pixels to include in clipped rendering of LEFT/RIGHT oriented tile pairs. Will not LEFT/RIGHT clip if excluded or None.
NA
int
clipHeight
Full scale pixels to include in clipped rendering of TOP/BOTTOM oriented tile pairs. Will not TOP/BOTTOM clip if excluded or None.
NA
int
renderScale
Scale at which image tiles will be rendered. 1.0 (full scale) if excluded or None
NA
float
renderWithFilter
Render tiles using default filtering (0 and 255 pixel values replaced with integer in U(64, 191), followed by default NormalizeLocalContrast). True if excluded or None
NA
bool
renderWithoutMask
Render tiles without mipMapLevel masks. True if excluded or None
NA
bool
renderFullScaleWidth
Full scale width for all rendered tiles
NA
int
renderFullScaleHeight
Full scale height for all rendered tiles
NA
int
fillWithNoise
Fill each canvas image with noise prior to rendering. True if excluded or None
NA
bool
renderFilterListName
Apply specified filter list to all renderings
NA
str
SIFTfdSize
SIFT feature descriptor size – samples per row and column. 8 if excluded or None
NA
int
SIFTminScale
SIFT minimum scale – minSize * minScale < size < maxSize * maxScale. 0.5 if excluded or None
NA
float
SIFTmaxScale
SIFT maximum scale – minSize * minScale < size < maxSize * maxScale. 0.85 if excluded or None
NA
float
SIFTsteps
SIFT steps per scale octave. 3 if excluded or None
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
pairJson
JSON file where tile pairs are stored (.json, .gz, .zip)
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.SwapPointMatches(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
SwapPointMatches key
description
default
field_type
json_type
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
match_owner
Match collection owner name
(REQUIRED)
str
source_collection
Source point match collection
(REQUIRED)
str
target_collection
Target point match collection
(REQUIRED)
str
zValues
List of integer group ids
(REQUIRED)
int
pool_size
Pool size
5
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.SwapPointMatchesOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
SwapPointMatchesOutput key
description
default
field_type
json_type
source_collection
Source point match collection
(REQUIRED)
str
target_collection
Target point match collection
(REQUIRED)
str
swapped_zs
List of group ids that got swapped
(REQUIRED)
int
nonswapped_zs
List of group ids that did not get swapped
(REQUIRED)
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.TilePairClientOutputParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
TilePairClientOutputParameters key
description
default
field_type
json_type
tile_pair_file
location of json file with tile pair inputs
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.pointmatch.schemas.TilePairClientParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
TilePairClientParameters key
description
default
field_type
json_type
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
stack
input stack to which tilepairs need to be generated
(REQUIRED)
str
baseStack
Base stack
None
str
minZ
z min for generating tilepairs
None
int
maxZ
z max for generating tilepairs
None
int
xyNeighborFactor
Multiply this by max(width, height) of each tile to determine radius for locating neighbor tiles
0.9
float
zNeighborDistance
Look for neighbor tiles with z values less than or equal to this distance from the current tile’s z value
2
int
excludeCornerNeighbors
Exclude neighbor tiles whose center x and y is outside the source tile’s x and y range respectively
True
bool
excludeSameLayerNeighbors
Exclude neighbor tiles in the same layer (z) as the source tile
False
bool
excludeCompletelyObscuredTiles
Exclude tiles that are completely obscured by reacquired tiles
True
bool
output_dir
Output directory path to save the tilepair json file
(REQUIRED)
str
memGB
Memory for the java client to run
6G
str
- opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.residuals package
Submodules
asap.residuals.compute_residuals module
Module contents
asap.rough_align package
Submodules
asap.rough_align.apply_rough_alignment_to_montages module
- exception asap.rough_align.apply_rough_alignment_to_montages.ApplyRoughAlignmentException[source]
Bases:
asap.module.render_module.RenderModuleException
Something is wrong in ApplyRough….
- class asap.rough_align.apply_rough_alignment_to_montages.ApplyRoughAlignmentTransform(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
ApplyRoughAlignmentTransformParameters
- default_output_schema
alias of
asap.rough_align.schemas.ApplyRoughAlignmentOutputParameters
- default_schema
alias of
asap.rough_align.schemas.ApplyRoughAlignmentTransformParameters
- asap.rough_align.apply_rough_alignment_to_montages.add_masks_to_lowres(render, stack, z, mask_map)[source]
- asap.rough_align.apply_rough_alignment_to_montages.apply_rough_alignment(render, input_stack, prealigned_stack, lowres_stack, output_stack, output_dir, scale, mask_input_dir, update_lowres_with_masks, read_masks_from_lowres_stack, filter_montage_output_with_masks, mask_exts, Z, apply_scale=False, consolidateTransforms=True, remap_section_ids=False)[source]
- asap.rough_align.apply_rough_alignment_to_montages.filter_highres_with_masks(resolved_highres, tspec_lowres, mask_map)[source]
- function to return a filtered list of tilespecs from a
ResolvedTiles object, based on a lowres mask
- Parameters
resolved_highres (renderapi.resolvedtiles.ResolvedTiles object) – tilespecs and transforms from a single section
tspec_lowres (renderapi.tilespec.TileSpec object) – tilespec from a downsampled stack
mask_map (dict) – keys should match lowres tileids, values are mask file URI
- Returns
new_highres – which highres specs are fully contained within the boundary of mask=255
- Return type
List of renderapi.tilespec.TileSpec objects
asap.rough_align.do_rough_alignment module
asap.rough_align.schemas module
- class asap.rough_align.schemas.ApplyRoughAlignmentOutputParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
ApplyRoughAlignmentOutputParameters key
description
default
field_type
json_type
zs
list of z values that were applied to
NA
?
output_stack
stack where applied transforms were set
NA
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.rough_align.schemas.ApplyRoughAlignmentTransformParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
ApplyRoughAlignmentTransformParameters key
description
default
field_type
json_type
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
montage_stack
stack to make a downsample version of
(REQUIRED)
str
prealigned_stack
stack with dropped tiles corrected for stitching errors
None
str
lowres_stack
montage scape stack with rough aligned transform
(REQUIRED)
str
output_stack
output high resolution rough aligned stack
(REQUIRED)
str
tilespec_directory
path to save section images
(REQUIRED)
str
map_z
map the montage Z indices to the rough alignment indices (default - False)
False
bool
remap_section_ids
map section ids as well with the new z mapping. Default = False
False
bool
consolidate_transforms
should the transforms be consolidated? (default - True)
True
bool
scale
scale of montage scapes
(REQUIRED)
float
apply_scale
do you want to apply scale
False
bool
pool_size
pool size for parallel processing
10
int
new_z
List of new z values to be mapped to
None
int
old_z
List of z values to apply rough alignment to
(REQUIRED)
int
mask_input_dir
directory containing mask files. basenames of masks that match tileIds in the rough stack will be handled.
None
str
read_masks_from_lowres_stack
masks will be taken from lowres tilespecs. any mask_input_dir ignored.
False
bool
update_lowres_with_masks
should the masks be added to the rough stack?
False
bool
filter_montage_output_with_masks
should the tiles written be filtered by the masks?
False
bool
mask_exts
what kind of mask files to recognize
[‘png’, ‘tif’]
str
close_stack
whether to set output stack to COMPLETE
True
bool
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.rough_align.schemas.DownsampleMaskHandlerSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
DownsampleMaskHandlerSchema key
description
default
field_type
json_type
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
stack
stack that is read and modified with masks
(REQUIRED)
str
close_stack
set COMPLETE or not
True
bool
mask_dir
directory containing masks, named <z>_*.png where<z> is a z value in input_stack and may be specifiedin z_apply
None
str
collection
name of collection to be filtered by mask, or resetcan be None for no operation
None
str
zMask
z values for which the masks will be set
None
int
zReset
z values for which the masks will be reset
None
int
mask_exts
what kind of mask files to recognize
[‘png’, ‘tif’]
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.rough_align.schemas.LowresStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
LowresStackParameters key
description
default
field_type
json_type
stack
Input downsample images section stack
(REQUIRED)
str
owner
Owner of the input lowres stack
None
str
project
Project of the input lowres stack
None
str
service_host
Service host for the input stack Render service
None
str
baseURL
Base URL of the Render service for the source stack
None
str
renderbinPath
Client scripts location
None
str
verbose
Want the output to be verbose?
0
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.rough_align.schemas.MakeAnchorStackSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.stack_schemas.StackTransitionParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
MakeAnchorStackSchema 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
not used in this module, keeps parents happy
[1000]
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
transform_xml
xml transforms from trakemimages from which these are madeare assumed to be named <z>_*.png
NA
str
transform_json
Human generated list of transforms.or, json scraped from xmlKeys are of form <z>_*.png where z matches a tilespec in input_stack and values are AffineModel transform jsonswill override xml input.
None
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.rough_align.schemas.OutputLowresStackParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
OutputLowresStackParameters key
description
default
field_type
json_type
stack
Input downsample images section stack
(REQUIRED)
str
owner
Owner of the input lowres stack
None
str
project
Project of the input lowres stack
None
str
service_host
Service host for the input stack Render service
None
str
baseURL
Base URL of the Render service for the source stack
None
str
renderbinPath
Client scripts location
None
str
verbose
Want the output to be verbose?
0
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.rough_align.schemas.PairwiseRigidOutputSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
PairwiseRigidOutputSchema key
description
default
field_type
json_type
minZ
minimum z value in output stack
(REQUIRED)
int
maxZ
minimum z value in output stack
(REQUIRED)
int
output_stack
name of output stack
(REQUIRED)
str
missing
list of z values missing in z range of output stack
(REQUIRED)
int
masked
list of z values masked in z range of output stack
(REQUIRED)
int
residuals
pairwise residuals in output stack
(REQUIRED)
?
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.rough_align.schemas.PairwiseRigidSchema(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.stack_schemas.StackTransitionParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
PairwiseRigidSchema 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
match_collection
Point match collection name
(REQUIRED)
str
gap_file
json file {k: v} where int(k) is a z value to skipentries in here that are not already missing willbe omitted from the output stacki.e. this is a place one can skip sections
None
str
translate_to_positive
translate output stack to positive space
True
bool
translation_buffer
minimum (x, y) of output stack if translate_to_positive=True
[0, 0]
float
anchor_stack
fix transforms using tiles in this stack
None
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.rough_align.schemas.PointMatchCollectionParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
PointMatchCollectionParameters key
description
default
field_type
json_type
owner
Point match collection owner (defaults to render owner
None
str
match_collection
Point match collection name
(REQUIRED)
str
server
baseURL of the Render service holding the point match collection
None
str
verbose
Verbose output flag
0
int
- opts = <marshmallow.schema.SchemaOpts object>
Module contents
asap.stack package
Submodules
asap.stack.consolidate_transforms module
- class asap.stack.consolidate_transforms.ConsolidateTransforms(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.RenderModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
ConsolidateTransformsParameters
- default_output_schema
alias of
asap.stack.schemas.ConsolidateTransformsOutputParameters
- default_schema
asap.stack.redirect_mipmaps module
change storage directory of imageUrl in a given mipMapLevel
- class asap.stack.redirect_mipmaps.RedirectMipMapsModule(schema_type=None, *args, **kwargs)[source]
Bases:
asap.module.render_module.StackTransitionModule
Note
This class takes a ArgSchema as an input to parse inputs , with a default schema of type
RedirectMipMapsParameters
- default_output_schema
- default_schema
asap.stack.schemas module
- class asap.stack.schemas.ConsolidateTransformsOutputParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
ConsolidateTransformsOutputParameters key
description
default
field_type
json_type
output_stack
name of output stack
(REQUIRED)
str
numZ
Number of z values processed
(REQUIRED)
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.stack.schemas.ConsolidateTransformsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
ConsolidateTransformsParameters key
description
default
field_type
json_type
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
stack
stack to consolidate
(REQUIRED)
str
postfix
postfix to add to stack name on saving if no output defined (default _CONS)
_CONS
str
transforms_slice
a string representing a slice describing the set of transforms to be consolidated (i.e. 1:)
slice(None, None, None)
str
output_stack
name of output stack (default to adding postfix to input)
NA
str
pool_size
name of output stack (default to adding postfix to input)
10
int
minZ
minimum z to consolidate in read in from stack and write to output_stack. Default to minimum z in stack
NA
float
maxZ
maximum z to consolidate in read in from stack and write to output_stack. Default to maximum z in stack
NA
float
overwrite_zlayer
whether to remove the existing layer from the target stack before uploading.
False
bool
close_stack
no description
False
bool
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.stack.schemas.MipMapDirectories(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
MipMapDirectories key
description
default
field_type
json_type
level
mipMapLevel for which parent directory will be changed
(REQUIRED)
int
directory
directory where relocated mipmaps are found.
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.stack.schemas.RedirectMipMapsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
RedirectMipMapsOutput key
description
default
field_type
json_type
zValues
no description
(REQUIRED)
int
output_stack
no description
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.stack.schemas.RedirectMipMapsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.stack_schemas.StackTransitionParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
RedirectMipMapsParameters 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
new_mipmap_directories
no description
(REQUIRED)
list
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.stack.schemas.RemapZsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
RemapZsOutput key
description
default
field_type
json_type
zValues
no description
(REQUIRED)
int
output_stack
no description
(REQUIRED)
str
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.stack.schemas.RemapZsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.stack_schemas.StackTransitionParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
RemapZsParameters 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
remap_sectionId
no description
NA
bool
new_zValues
no description
(REQUIRED)
int
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.stack.schemas.SwapZsOutput(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
argschema.schemas.DefaultSchema
SwapZsOutput key
description
default
field_type
json_type
source_stacks
List of source stacks that have been successfully swapped
(REQUIRED)
str
target_stacks
List of target stacks that have been successfully swapped
(REQUIRED)
str
swapped_zvalues
no description
NA
?
- opts = <marshmallow.schema.SchemaOpts object>
- class asap.stack.schemas.SwapZsParameters(extra=None, only=None, exclude=(), prefix='', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]
Bases:
asap.module.schemas.schemas.RenderParameters
This schema is designed to be a schema_type for an ArgSchemaParser object
SwapZsParameters key
description
default
field_type
json_type
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
source_stack
List of source stacks
(REQUIRED)
str
target_stack
List of target stacks
(REQUIRED)
str
complete_source_stack
set source stack state to complete after copying Default=False
False
bool
complete_target_stack
set target stack state to complete after copying Default=False
False
bool
zValues
no description
NA
?
delete_source_stack
Do you want to delete source stack after copying its contents?. Default=False
False
bool
pool_size
Pool size
5
int
- opts = <marshmallow.schema.SchemaOpts object>