Register_virtual_stack_slices: Large Tif output stack failes to get the Z

I use the Fiji plugin register_virtual_stack_slices-3.0.3.jar to do registration of a series of Tif file.
If I do on a small sample size, the generated Tif stack in the end is several hundred MB stored in hard disc. I can use matlab to get the inage info of the tif stack, including how the XYZ dimension:

afn = 'D:\QMDownload\5\rrrrr.tif';
info = imfinfo(afn);
num_imagesZ = numel(info);
aWidth = info(1).Width;
aHeight = info(1).Height;
for k = 1 : num_imagesZ
    % read  a slice
    A = double(imread(afn, k, 'Info', info);

However, if I use a large dataset of 171 tifs each 1GB to do registration, the final output is a 120GB tif stack. The code above no longer works. The num_imagesZ is 1, not 171.

I also can hard-code the read the slice:

for k = 1 : 171
    % read  a slice
    A = double(imread(afn, k, 'Info', info);

However, the outcome of all the slices are pure zero, although the image looks normal.

Is there a way to deal with this problem?Thanks.

I have not used register_virtual_stack_slices-3.0.3.jar myself, but I remember that some years back I faced a problem with large TIF stacks in Matlab: I was able to write a large TIF file from Matlab, but it was not able to read it back.
I may be wrong, but I think the problem was due to 32bit nature of the TIF firmat and the reader is not able to access the deep ares within the file. Which makes the size limit of TIF files to about 4 Gb.
Could the plugin make individual files instead of a single 3D stack?

Yes. The plugins make 2D files and falso a 3D stack. The 120GB huge stack can be opened in Imaris, but cannot be load in Fiji. It’d weird that the stack was generated in Fiji and saved by Fiji,but when loading it stucks at about 70% and no response.

The stack also imread weird in Matlab. But Imaris can handle it.