-
Notifications
You must be signed in to change notification settings - Fork 0
feat: split xml ipd #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: split_dataset_r2r
Are you sure you want to change the base?
feat: split xml ipd #167
Changes from 1 commit
a83db7f
97948db
0802933
f867da6
6dc5000
a82474c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,6 +91,21 @@ def fetch_image_data(self, record, dsxy, dsz): | |
| dask_array = dask_array.astype(np.float32) | ||
| dask_array = dask_array.transpose() | ||
|
|
||
| # Apply split tile crop if present | ||
| crop_min = record.get('crop_min') | ||
| crop_max = record.get('crop_max') | ||
| if crop_min is not None and crop_max is not None: | ||
| if len(crop_min) != 3 or len(crop_max) != 3: | ||
| raise ValueError( | ||
| f"crop_min and crop_max must both be length 3 for 3D cropping; " | ||
| f"got crop_min={crop_min}, crop_max={crop_max}" | ||
| ) | ||
| dask_array = dask_array[ | ||
| crop_min[0]:crop_max[0] + 1, | ||
| crop_min[1]:crop_max[1] + 1, | ||
| crop_min[2]:crop_max[2] + 1 | ||
| ] | ||
|
Comment on lines
+97
to
+127
|
||
|
|
||
| # Downsample Dask array | ||
| downsampled_stack = self.interface_downsampling(dask_array, dsxy, dsz) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.