wsireg.parameter_maps package
Submodules
wsireg.parameter_maps.preprocessing module
- class wsireg.parameter_maps.preprocessing.BoundingBox(X: int, Y: int, WIDTH: int, HEIGHT: int)[source]
Bases:
NamedTuple
Bounding box named tuple.
- HEIGHT: int
Alias for field number 3
- WIDTH: int
Alias for field number 2
- X: int
Alias for field number 0
- Y: int
Alias for field number 1
- class wsireg.parameter_maps.preprocessing.CoordinateFlip(value)[source]
Bases:
str
,Enum
Coordinate flip options * “h” : horizontal flip * “v” : vertical flip
- HORIZONTAL = 'h'
- VERTIAL = 'v'
- class wsireg.parameter_maps.preprocessing.ImagePreproParams(*, image_type: ImageType = ImageType.DARK, max_int_proj: bool = True, ch_indices: List[int] | None = None, as_uint8: bool = True, contrast_enhance: bool = False, invert_intensity: bool = False, custom_processing: Dict[str, Callable] | None = None, rot_cc: int | float = 0, flip: CoordinateFlip | None = None, crop_to_mask_bbox: bool = False, mask_bbox: BoundingBox | None = None, downsampling: int = 1, use_mask: bool = True)[source]
Bases:
BaseModel
Preprocessing parameter model
- image_type
Whether image is dark or light background. Light background images are intensity inverted by default
- Type:
- max_int_proj
Perform max intensity projection number of channels > 1.
- Type:
bool
- contrast_enhance
Enhance contrast of image
- Type:
bool
- ch_indices
Channel indicies to use for registartion, 0-index, so ch_indices = 0, pulls the first channel
- Type:
list of int or int
- as_uint8
Whether to byte scale registration image data for memory saving
- Type:
bool
- invert_intensity
invert the intensity of an image
- Type:
bool
- rot_cc
Rotate image counter-clockwise by degrees, can be positive or negative (cw rot)
- Type:
int, float
- flip
flip coordinates, “v” = vertical flip, “h” = horizontal flip
- Type:
CoordinateFlip, default: None
- crop_to_mask_bbox
Convert a binary mask to a bounding box and crop to this area
- Type:
bool
- mask_bbox
supply a pre-computed list of bbox info of form x,y,width,height
- Type:
tuple or list of 4 ints
- downsampling
Downsampling by integer factor, i.e., downsampling = 3, downsamples image 3x
- Type:
int
- use_mask
Whether to use mask in elastix registration. At times it is better to use the mask to find a cropping area then use the mask during the registration process as errors are frequent
- Type:
bool
- custom_processing
Custom intensity preprocessing functions in a dict like {“my_custom_process: custom_func} that will be applied to the image. Must take in an sitk.Image and return an sitk.Image
- Type:
callable
- as_uint8: bool
- ch_indices: List[int] | None
- contrast_enhance: bool
- crop_to_mask_bbox: bool
- custom_processing: Dict[str, Callable] | None
- downsampling: int
- flip: CoordinateFlip | None
- invert_intensity: bool
- mask_bbox: BoundingBox | None
- max_int_proj: bool
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'use_enum_names': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'as_uint8': FieldInfo(annotation=bool, required=False, default=True), 'ch_indices': FieldInfo(annotation=Union[List[int], NoneType], required=False), 'contrast_enhance': FieldInfo(annotation=bool, required=False, default=False), 'crop_to_mask_bbox': FieldInfo(annotation=bool, required=False, default=False), 'custom_processing': FieldInfo(annotation=Union[Dict[str, Callable], NoneType], required=False), 'downsampling': FieldInfo(annotation=int, required=False, default=1), 'flip': FieldInfo(annotation=Union[CoordinateFlip, NoneType], required=False), 'image_type': FieldInfo(annotation=ImageType, required=False, default=<ImageType.DARK: 'FL'>), 'invert_intensity': FieldInfo(annotation=bool, required=False, default=False), 'mask_bbox': FieldInfo(annotation=Union[BoundingBox, NoneType], required=False), 'max_int_proj': FieldInfo(annotation=bool, required=False, default=True), 'rot_cc': FieldInfo(annotation=Union[int, float], required=False, default=0), 'use_mask': FieldInfo(annotation=bool, required=False, default=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- rot_cc: int | float
- use_mask: bool
wsireg.parameter_maps.reg_model module
wsireg.parameter_maps.reg_params module
wsireg.parameter_maps.transformations module
Module contents
Parameter maps.