You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, first problem is the correct ordering of FitResults fields, so that display units can pick up the correct output. I noticed that this totally depends on the order of field assignments. Given that there are different fit cases, a one-size-fits-all ordering is not possible. I worked this around by:
if exist('magnWeight') == 1
FitResults.maskOut = double(magnWeight);
else
FitResults.maskOut = double(maskGlobal);
end
if isfield(FitResults, 'chiSBM')
FitResults = orderfields(FitResults, {'chiSBM','chiL2M','chiL2','unwrappedPhase','maskOut'});
end
if isfield(FitResults, 'chiSB')
FitResults = orderfields(FitResults, {'chiSB','chiL2','unwrappedPhase','maskOut'});
end
Now the role of the xnames attribute has become ambiguous to me, at least for this model. Is this field primarily intended for simulations? Here for some reason I've forgotten, I noted that the main output should always be the first one. On the other hand, this is not the case, for example, vfa_t1 and nothing unusual happens. Any insights? How should xnames be assigned for this model?
The text was updated successfully, but these errors were encountered:
@agahkarakuzu xnames is mandatory for voxelwise models since it defines the fitting (input) parameters. The outputs (and their order) are defined by the fields of the Fitresults of the fit method.
Usually, the fitting parameters (inputs) are part of the outputs. But sometimes these parameters are not really meaningful and need to be recomputed... (for instance in NODDI; kappa is recomputed to obtain the orientation dispersion index).
If we want to obtain the outputs, we could whether:
add a new property...
Or (cleaner I think) Create a function that runs the fit method with null MRIinputs... Something like (not tested on all methods):
Model =qsm_sb;
Inputs =struct;
for fields =Model.MRIinputs
Inputs.(fields{1}) =1;
end
FitResults =Model.fit(Inputs);
Outputs = fieldnames(FitResults)
Using xnames in #294 to get the outputs for non-voxelwise Models was not clean and I will revert this
In the new
qsm_sb
model, presence of the outputs depends on the selected options. For example:In this case, first problem is the correct ordering of
FitResults
fields, so that display units can pick up the correct output. I noticed that this totally depends on the order of field assignments. Given that there are different fit cases, a one-size-fits-all ordering is not possible. I worked this around by:Now the role of the
xnames
attribute has become ambiguous to me, at least for this model. Is this field primarily intended for simulations? Here for some reason I've forgotten, I noted that the main output should always be the first one. On the other hand, this is not the case, for example,vfa_t1
and nothing unusual happens. Any insights? How shouldxnames
be assigned for this model?The text was updated successfully, but these errors were encountered: