Skip to content

Commit

Permalink
#16 added file extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
sapetnioc committed Feb 25, 2022
1 parent 167b43b commit e410933
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions bv_use_cases/tiny_morphologist/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@


class BiasCorrection(Process):
input: field(type_=File)
input: field(type_=File, extensions=('.nii',))
strength: float = 0.8
output: field(type_=File, write=True)
output: field(type_=File, write=True, extensions=('.nii',))

def execute(self, context):
with open(self.input) as f:
Expand All @@ -24,9 +24,9 @@ def execute(self, context):
)

class FakeSPMNormalization(Process):
input: field(type_=File)
template: field(type_=File)
output: field(type_=File, write=True)
input: field(type_=File, extensions=('.nii',))
template: field(type_=File, extensions=('.nii',))
output: field(type_=File, write=True, extensions=('.nii',))

requirements = {
'fakespm': {
Expand All @@ -49,9 +49,9 @@ def execute(self, context):
f.write(content)

class AimsNormalization(Process):
input: field(type_=File)
input: field(type_=File, extensions=('.nii',))
origin: field(type_=list[float], default_factory=lambda: [1.2, 3.4, 5.6])
output: field(type_=File, write=True)
output: field(type_=File, write=True, extensions=('.nii',))

path_layout = dict(
bids={'output': {'part': 'normalized'}},
Expand All @@ -66,9 +66,9 @@ def execute(self, context):
f.write(content)

class SplitBrain(Process):
input: field(type_=File)
right_output: field(type_=File, write=True)
left_output: field(type_=File, write=True)
input: field(type_=File, extensions=('.nii',))
right_output: field(type_=File, write=True, extensions=('.nii',))
left_output: field(type_=File, write=True, extensions=('.nii',))

path_layout = dict(
bids={'output': {'part': 'split'}},
Expand All @@ -84,8 +84,8 @@ def execute(self, context):


class ProcessHemisphere(Process):
input: field(type_=File)
output: field(type_=File, write=True)
input: field(type_=File, extensions=('.nii',))
output: field(type_=File, write=True, extensions=('.nii',))

def execute(self, context):
with open(self.input) as f:
Expand Down

0 comments on commit e410933

Please sign in to comment.