-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework Z-range handling to use deskewed max, and to update automatically
- Loading branch information
1 parent
5addbcc
commit e36bcfd
Showing
10 changed files
with
95 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
from pathlib import Path | ||
from lls_core.models.crop import CropParams | ||
from lls_core.models.lattice_data import LatticeData | ||
from lls_core.sample import resources | ||
from importlib_resources import as_file | ||
|
||
|
||
def test_default_save_dir(): | ||
def test_default_save_dir(rbc_tiny: Path): | ||
# Test that the save dir is inferred to be the input dir | ||
with as_file(resources / "RBC_tiny.czi") as path: | ||
params = LatticeData(input_image=path) | ||
assert params.save_dir == path.parent | ||
params = LatticeData(input_image=rbc_tiny) | ||
assert params.save_dir == rbc_tiny.parent | ||
|
||
def test_auto_z_range(rbc_tiny: Path): | ||
# Tests that the Z range is automatically set, and it is set | ||
# based on the size of the deskewed volume | ||
params = LatticeData(input_image=rbc_tiny, crop=CropParams( | ||
roi_list=[] | ||
)) | ||
assert params.crop.z_range == (0, 59) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters