Skip to content
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

Updated HaloMIFTiff to work with newer version of HALO #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion omeify/converters/raw2ometiff_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ def _run_raw2ometiff(self,output_path,rgb,compression):

if self.logger.isEnabledFor(logging.INFO):
self.logger.info("Executing raw2ometiff conversion...")
process = subprocess.run(cmd, check=True, stdout=stdout_setting, stderr=stderr_setting)

#process = subprocess.run(cmd, check=True, stdout=stdout_setting, stderr=stderr_setting)
try:
process = subprocess.run(cmd, check=True, stdout=stdout_setting, stderr=stderr_setting)
except subprocess.CalledProcessError as e:
print(f"Command failed with exit code {e.returncode}: {e.stderr}")

if self.logger.isEnabledFor(logging.WARNING) and process.stderr:
self.logger.error(process.stderr.decode("utf-8"))
Expand Down
10 changes: 7 additions & 3 deletions omeify/inputs/halo_mif_tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,15 @@ def size_y(self):
@property
def size_c(self):
# Implement the platform-specific logic for retrieving the size_c here
return len(self.report['series'][self.series]['levels'][0]['pages'])
#return len(self.report['series'][self.series]['levels'][0]['pages'])
return self.image_description['OME']\
['Image']['Pixels']['@SizeC']

@property
def plane_count(self):
return len(self.report['series'][self.series]['levels'][0]['pages'])
#return len(self.report['series'][self.series]['levels'][0]['pages'])
return self.image_description['OME']\
['Image']['Pixels']['@SizeZ']

# Override the channels property
@property
Expand All @@ -84,4 +88,4 @@ def channels(self):
for k, v in list(d.items()):
d[replacement.get(k, k)] = d.pop(k)

return channel_features
return channel_features