Merge pull request #7414 from mvdbeek/fix_analyze_75

[19.01] Fix analyze 75 datatype upload
This commit is contained in:
Martin Cech
2019-02-26 10:40:01 -05:00
committed by GitHub
2 changed files with 4 additions and 6 deletions
+3 -2
View File
@@ -488,7 +488,7 @@ class Analyze75(Binary):
self.add_composite_file(
'hdr',
description='The Analyze75 header file.',
is_binary=False)
is_binary=True)
"""The image file. Image data, whose data type and ordering are described by the header file."""
self.add_composite_file(
@@ -500,7 +500,8 @@ class Analyze75(Binary):
self.add_composite_file(
't2m',
description='The Analyze75 t2m file.',
optional='True', is_binary=True)
optional=True,
is_binary=True)
def generate_primary_file(self, dataset=None):
rval = ['<html><head><title>Analyze75 Composite Dataset.</title></head><p/>']
+1 -4
View File
@@ -178,10 +178,7 @@ def add_composite_file(dataset, registry, output_path, files_path):
# Find data type
if dataset.file_type is not None:
try:
datatype = registry.get_datatype_by_extension(dataset.file_type)
except Exception:
print("Unable to instantiate the datatype object for the file type '%s'" % dataset.file_type)
datatype = registry.get_datatype_by_extension(dataset.file_type)
def to_path(path_or_url):
is_url = path_or_url.find('://') != -1 # todo fixme