Open juancarlosfarah opened 3 years ago
Looks like pathToWorkspace
is also being converted, so it's not exclusive to the params
and config
name-value pairs.
So I figured out why the conversion was happening. We were defining string
in the arguments
instead of char
.
In DenoiseImage
, this block:
arguments
pathToWorkspace string = '.'
params.inputFile string
params.outputFile string
config.beta double = 1
config.patchRadius int8 = 1
config.searchRadius int8 = 1
config.rician logical = false
config.verbose logical = false
end
Should be edited to:
arguments
pathToWorkspace char = '.'
params.inputFile char
params.outputFile char
config.beta double = 1
config.patchRadius int8 = 1
config.searchRadius int8 = 1
config.rician logical = false
config.verbose logical = false
end
In MATLAB, there's a difference between the use of single quotes
'
and double quotes"
to represent strings.https://ch.mathworks.com/matlabcentral/answers/485385-difference-between-single-quote-vs-double-quote
It seems that MRIread, which uses MRIfspec under the hood, only works with the older
'
character vectors.Although we are using
'
by default, what happens is that in aStep
, when we transform ourParameters
andConfiguration
properties to pass them as name-value arguments to theOperation
, we usenamedargs2cell
.At this point,
params
still have the'
format:But for some reason, when they are accessed from within the
Operation
, they get transformed to the"
string representation:This means that we need to do a conversion back to
'
in some of our operations (e.g.DenoiseImage
).