@@ -1593,98 +1593,58 @@ def fuse_dataset(
15931593def fuse_dataset_bdvp (
15941594 project_path ,
15951595 command ,
1596+ processing_opts = None ,
15961597 result_path = None ,
1597- range_channels = "" ,
1598- range_slices = "" ,
1599- range_frames = "" ,
1600- n_resolution_levels = 5 ,
1601- use_lzw_compression = True ,
1602- split_slices = False ,
1603- split_channels = False ,
1604- split_frames = False ,
1605- override_z_ratio = False ,
1606- z_ratio = 1.0 ,
1607- use_interpolation = True ,
1598+ compression = "LZW" ,
16081599):
16091600 """Export a BigDataViewer project using the BIOP Kheops exporter.
16101601
1611- Use BIOP Kheops exporter to fuse a BigDataViewer project and save
1612- it as pyramidal OME-TIFF.
1602+ Use the BIOP Kheops exporter to convert a BigDataViewer project into
1603+ OME-TIFF files, with optional compression .
16131604
16141605 Parameters
16151606 ----------
16161607 project_path : str
16171608 Full path to the BigDataViewer XML project file.
16181609 command : CommandService
16191610 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.).
16201614 result_path : str, optional
16211615 Path where to store the exported files. If None, files will be saved in
16221616 the same directory as the input project.
1623- range_channels : str, optional
1624- Channels to include in the export. Default is all channels.
1625- range_slices : str, optional
1626- Slices to include in the export. Default is all slices.
1627- range_frames : str, optional
1628- Frames to include in the export. Default is all frames.
1629- n_resolution_levels : int, optional
1630- Number of pyramid resolution levels to use for the export. Default is 5.
1631- use_lzw_compression : bool, optional
1632- If True, compressed the output file using LZW. Default is True.
1633- split_slices : bool, optional
1634- If True, splits the output into separate files for each slice. Default is False.
1635- split_channels : bool, optional
1636- If True, splits the output into separate files for each channel. Default is False.
1637- split_frames : bool, optional
1638- If True, splits the output into separate files for each frame. Default is False.
1639- override_z_ratio : bool, optional
1640- If True, overrides the default z_ratio value. Default is False.
1641- z_ratio : float, optional
1642- The z ratio to use for the export. Default is 1.0.
1643- use_interpolation : bool, optional
1644- If True, interpolates during fusion (takes ~4x longer). Default is True.
1617+ compression : str, optional
1618+ Compression method to use for the TIFF files. Default is "LZW".
16451619
16461620 Notes
16471621 -----
16481622 This function requires the PTBIOP update site to be enabled in Fiji/ImageJ.
1649-
1650- Examples
1651- --------
1652- fuse_dataset_bdvp(xml_input, cs)
16531623 """
1624+ if processing_opts is None :
1625+ processing_opts = ProcessingOptions ()
16541626
16551627 file_info = pathtools .parse_path (project_path )
16561628 if not result_path :
16571629 result_path = file_info ["path" ]
1630+ # if not os.path.exists(result_path):
1631+ # os.makedirs(result_path)
16581632
16591633 command .run (
16601634 FuseBigStitcherDatasetIntoOMETiffCommand ,
16611635 True ,
1662- "xml_bigstitcher_file " ,
1636+ "image " ,
16631637 project_path ,
1664- "output_path_directory " ,
1638+ "output_dir " ,
16651639 result_path ,
1666- "range_channels" ,
1667- range_channels ,
1668- "range_slices" ,
1669- range_slices ,
1670- "range_frames" ,
1671- range_frames ,
1672- "n_resolution_levels" ,
1673- n_resolution_levels ,
1674- "fusion_method" ,
1675- "SMOOTH AVERAGE" ,
1676- "use_lzw_compression" ,
1677- use_lzw_compression ,
1678- "split_slices" ,
1679- split_slices ,
1680- "split_channels" ,
1681- split_channels ,
1682- "split_frames" ,
1683- split_frames ,
1684- "override_z_ratio" ,
1685- override_z_ratio ,
1686- "z_ratio" ,
1687- z_ratio ,
1688- "use_interpolation" ,
1689- use_interpolation ,
1640+ "compression" ,
1641+ compression ,
1642+ "subset_channels" ,
1643+ "" ,
1644+ "subset_slices" ,
1645+ "" ,
1646+ "subset_frames" ,
1647+ "" ,
1648+ "compress_temp_files" ,
1649+ False ,
16901650 )
0 commit comments