From b4c436e654d927c1c7c9e8512cdd848e7702f9d9 Mon Sep 17 00:00:00 2001 From: Nicola Vigano <nicola.vigano@esrf.fr> Date: Fri, 30 Jan 2015 18:07:30 +0100 Subject: [PATCH] Small fixes in assembling Signed-off-by: Nicola Vigano <nicola.vigano@esrf.fr> --- 5_reconstruction/GtAssembleVol3D.m | 4 ++-- zUtil_Imaging/gtPlaceSubVolume.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/5_reconstruction/GtAssembleVol3D.m b/5_reconstruction/GtAssembleVol3D.m index c39c09d5..d0517d52 100644 --- a/5_reconstruction/GtAssembleVol3D.m +++ b/5_reconstruction/GtAssembleVol3D.m @@ -169,7 +169,7 @@ classdef GtAssembleVol3D < handle obj.volumes.phases{phaseID}.grains = grain_ids; if (strcmpi(obj.parameters.rec.grains.algorithm(1:2), '6D')) - dmvol = zeros([obj.parameters.acq.bb([3, 3, 4]), 3]); + dmvol = zeros([obj.parameters.acq.bb([3, 3, 4]), 3], 'single'); dmvol = obj.doAssemblePhaseDmVolume(dmvol, sampleInfo, phaseID, list); if (ismember(obj.localPar.overlaps, {'zero', 'conflict'})) @@ -503,7 +503,7 @@ classdef GtAssembleVol3D < handle try vol = obj.localPar.cache.get('grain', {phaseID, ii}, 'seg'); volBBox = sampleInfo.phases{phaseID}.getBoundingBoxExtremes(ii); - volume = gtPlaceSubVolume(volume, vol, volBBox(1:3), ii, obj.localPar.overlaps); + volume = gtPlaceSubVolume(volume, int16(vol), volBBox(1:3), ii, obj.localPar.overlaps); catch mexc gtPrintException(mexc, sprintf('\nGrain %d failed!!\n', ii)); gauge.rePrint(); diff --git a/zUtil_Imaging/gtPlaceSubVolume.m b/zUtil_Imaging/gtPlaceSubVolume.m index 9008728f..5438c750 100644 --- a/zUtil_Imaging/gtPlaceSubVolume.m +++ b/zUtil_Imaging/gtPlaceSubVolume.m @@ -81,7 +81,7 @@ function output = gtPlaceSubVolume(output, input, shift, index, assign_op, use_c type_input = class(input); type_output = class(output); - if (type_output ~= type_input) + if (~strcmpi(type_output, type_input)) warning('gtPlaceSubVolume:heterogeneous_types', ... 'Converting input (%s) to output type (%s), it may reduce performance', ... type_input, type_output) -- GitLab