cselenyi / solenabugs

Solena Bug Tracking
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Errors in MR2PET #4

Closed EmmaRV closed 4 years ago

EmmaRV commented 5 years ago

For a few subjects errors occur when using MR2PET

This is the error I get when creating the average frame (running average_frames):

Integrating frame 1 ...Error using file2mat Memory Map (CreateFileMapping): The handle is invalid.

Error in file_array/subsref>multifile2mat (line 177)

Error in file_array/subsref>subfun (line 98)

Error in file_array/subsref (line 65)

Error in average_frames>safeReadNiiVol (line 127)

Error in average_frames (line 54)

And this is the error I get when inspecting the realignment file (from realignEcat7):

Reading frame 1 ...Could not run inspect string for command: PET:realignEcat7, parameters: $pet1 REALIGNMETHOD realign REFCHOICE BEST SMOOTHFWHM 10
Error report: Error using file2mat Memory Map (CreateFileMapping): The handle is invalid.

Error in file_array/subsref>multifile2mat (line 177) val(cc(i)+1:cc(i+1)) = file2mat(obj,int32(1),int32(x(y==i)));

Error in file_array/subsref>subfun (line 98) t = multifile2mat(sobj,varargin{:});

Error in file_array/subsref (line 65) t = subfun(sobj,args{:});

Error in inspectImage>convV2NII (line 143) vol.dat=cast((vol.dat(:,:,:)-vol.dat.scl_inter)./vol.dat.scl_slope,typeName);

Error in inspectImage (line 68) vol{i}=convV2NII(v,i); %#ok

Error in solena.executor/inspectCommandOutput (line 1499) evalin('base',command.inspectString);

Error in solena>inspectData (line 3589) [succ,message]=handles.depot.data.study.Subjects(subjIdx).inspectCommandOutput(block, commandIdx, false);

The realignment plots don't look odd. I tried using the realign method 'BEST', but the same problem occurred then.

Does anyone has any idea of what the problem could be?

@cselenyi ?

cselenyi commented 5 years ago

@EmmaRV It would be good to look at the actual file(s) that you try to process/inspect. On the face of it this could be some file access error but let's see the actual file. Which worker version is this?

EmmaRV commented 5 years ago

@cselenyi I'm using worker 201903281122 I encountered the issue now with some more subjects.

cselenyi commented 5 years ago

@EmmaRV this seems to be windows file I/O related issue, not strictly speaking a solena bug. But I will introduce workarounds into the code so it can tolerate this error message from Windows ("Memory Map (CreateFileMapping): The handle is invalid.") and anyhow read the PET image. Will keep you posted.

cselenyi commented 5 years ago

@EmmaRV: issue should now be resolved in new worker version (solena_worker_201911061323). I still leave the case open so that you can report back your experience with the new worker.