Skip to content

Commit 8518186

Browse files
committed
Fix function
1 parent 26f64c9 commit 8518186

File tree

1 file changed

+59
-25
lines changed

1 file changed

+59
-25
lines changed

src/imcflibs/imagej/bdv.py

Lines changed: 59 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,58 +1593,92 @@ def fuse_dataset(
15931593
def fuse_dataset_bdvp(
15941594
project_path,
15951595
command,
1596-
processing_opts=None,
15971596
result_path=None,
1598-
compression="LZW",
1597+
range_channels="",
1598+
range_slices="",
1599+
range_frames="",
1600+
n_resolution_levels=5,
1601+
split_slices=False,
1602+
split_channels=False,
1603+
split_frames=False,
1604+
override_z_ratio=False,
1605+
z_ratio=1.0,
15991606
):
16001607
"""Export a BigDataViewer project using the BIOP Kheops exporter.
16011608
1602-
Use the BIOP Kheops exporter to convert a BigDataViewer project into
1603-
OME-TIFF files, with optional compression.
1609+
Use BIOP Kheops exporter to fuse a BigDataViewer project and save
1610+
it as pyramidal OME-TIFF.
16041611
16051612
Parameters
16061613
----------
16071614
project_path : str
16081615
Full path to the BigDataViewer XML project file.
16091616
command : CommandService
16101617
The Scijava CommandService instance to execute the export command.
1611-
processing_opts : ProcessingOptions, optional
1612-
Options defining which parts of the dataset to process. If None, default
1613-
processing options will be used (process all angles, channels, etc.).
16141618
result_path : str, optional
16151619
Path where to store the exported files. If None, files will be saved in
16161620
the same directory as the input project.
1617-
compression : str, optional
1618-
Compression method to use for the TIFF files. Default is "LZW".
1621+
range_channels : str, optional
1622+
Channels to include in the export. Default is all channels.
1623+
range_slices : str, optional
1624+
Slices to include in the export. Default is all slices.
1625+
range_frames : str, optional
1626+
Frames to include in the export. Default is all frames.
1627+
n_resolution_levels : int, optional
1628+
Number of pyramid resolution levels to use for the export. Default is 5.
1629+
split_slices : bool, optional
1630+
If True, splits the output into separate files for each slice. Default is False.
1631+
split_channels : bool, optional
1632+
If True, splits the output into separate files for each channel. Default is False.
1633+
split_frames : bool, optional
1634+
If True, splits the output into separate files for each frame. Default is False.
1635+
override_z_ratio : bool, optional
1636+
If True, overrides the default z_ratio value. Default is False.
1637+
z_ratio : float, optional
1638+
The z ratio to use for the export. Default is 1.0.
16191639
16201640
Notes
16211641
-----
16221642
This function requires the PTBIOP update site to be enabled in Fiji/ImageJ.
1643+
1644+
Examples
1645+
--------
1646+
fuse_dataset_bdvp(xml_input, cs)
16231647
"""
1624-
if processing_opts is None:
1625-
processing_opts = ProcessingOptions()
16261648

16271649
file_info = pathtools.parse_path(project_path)
16281650
if not result_path:
16291651
result_path = file_info["path"]
1630-
# if not os.path.exists(result_path):
1631-
# os.makedirs(result_path)
16321652

16331653
command.run(
16341654
FuseBigStitcherDatasetIntoOMETiffCommand,
16351655
True,
1636-
"image",
1656+
"xml_bigstitcher_file",
16371657
project_path,
1638-
"output_dir",
1658+
"output_path_directory",
16391659
result_path,
1640-
"compression",
1641-
compression,
1642-
"subset_channels",
1643-
"",
1644-
"subset_slices",
1645-
"",
1646-
"subset_frames",
1647-
"",
1648-
"compress_temp_files",
1649-
False,
1660+
"range_channels",
1661+
range_channels,
1662+
"range_slices",
1663+
range_slices,
1664+
"range_frames",
1665+
range_frames,
1666+
"n_resolution_levels",
1667+
n_resolution_levels,
1668+
"fusion_method",
1669+
"SMOOTH AVERAGE",
1670+
"use_lzw_compression",
1671+
True,
1672+
"split_slices",
1673+
split_slices,
1674+
"split_channels",
1675+
split_channels,
1676+
"split_frames",
1677+
split_frames,
1678+
"override_z_ratio",
1679+
override_z_ratio,
1680+
"z_ratio",
1681+
z_ratio,
1682+
"use_interpolation",
1683+
True,
16501684
)

0 commit comments

Comments
 (0)