Sep round reg
get_shift(config, spot_yxz_base, spot_yxz_transform, z_scale_base, z_scale_transform, is_3d)
Find shift from base to transform.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config |
dict
|
register_initial section of config file corresponding to spot_yxz_base. |
required |
spot_yxz_base |
np.ndarray
|
Point cloud want to find the shift from. spot_yxz_base[:, 2] is the z coordinate in units of z-pixels. |
required |
spot_yxz_transform |
np.ndarray
|
Point cloud want to find the shift to. spot_yxz_transform[:, 2] is the z coordinate in units of z-pixels. |
required |
z_scale_base |
float
|
Scaling to put z coordinates in same units as yx coordinates for spot_yxz_base. |
required |
z_scale_transform |
float
|
Scaling to put z coordinates in same units as yx coordinates for spot_yxz_base. |
required |
is_3d |
bool
|
Whether pipeline is 3D or not. |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
|
np.ndarray
|
|
np.ndarray
|
|
Source code in docs/scripts/sep_round_reg.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
|
run_sep_round_reg(config_file, config_file_full, channels_to_save, transform=None)
This runs the pipeline for a separate round up till the end of the stitching stage and then finds the
affine transform that takes it to the anchor image of the full pipeline run.
It then saves the corresponding transformed images for the channels of the separate round indicated by
channels_to_save
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config_file |
str
|
Path to config file for separate round. This should have only 1 round, that round being an anchor round and only one channel being used so filtering is only done on the anchor channel. |
required |
config_file_full |
str
|
Path to config file for full pipeline run, for which full notebook exists. |
required |
channels_to_save |
List
|
Channels of the separate round, that will be saved to the output directory in the same coordinate system as the anchor round of the full run. |
required |
transform |
Optional[np.ndarray]
|
|
None
|
Source code in docs/scripts/sep_round_reg.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
|
transform_image(image, transform, image_centre, z_scale)
This transforms image
to a new coordinate system by applying transform
to every pixel in image
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
image |
np.ndarray
|
|
required |
transform |
np.ndarray
|
|
required |
image_centre |
np.ndarray
|
|
required |
z_scale |
int
|
Scaling to put z coordinates in same units as yx coordinates. |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
|
Source code in docs/scripts/sep_round_reg.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
|