def Sequence_Mask(\
self,
pipelineitem
):
if self.pipeline_started == True:
title = "Sequence " + pipelineitem.treeitem['name']
self.ancestor.GetPage(0).queue_info.put("Preparing mask array...")
filename_in = pipelineitem.input_filename.objectpath.GetValue()
filename_out = pipelineitem.output_filename.objectpath.GetValue()
frac_max = float(pipelineitem.max.value.GetValue())
frac_min = float(pipelineitem.min.value.GetValue())
try:
array = LoadArray(self, filename_in)
except:
msg = "Could not load array."
wx.CallAfter(self.UserMessage, title, msg)
self.pipeline_started = False
return
else:
mask = numpy.asarray(array, dtype=numpy.cdouble, order='C')
from ..lib.prfftw import rangereplace
rangereplace(mask, frac_min, frac_max, 0.0, 1.0)
try:
SaveArray(self, filename_out,mask)
except:
msg = "Could not save array."
wx.CallAfter(self.UserMessage, title, msg)
self.pipeline_started = False
return
评论列表
文章目录