function VOL=imshowVOL(VOL,stackDirectoryOrImageOrImage)
    %VOL=imshowVOL(VOL,stackDirectoryOrImageOrImage)
    %
    %VOL, VolViewer object
    %stackDirectoryOrImage, either the full path to stacks
    %                OR a volume image [rows, cols, slice]
    % 
    %J.Andrew Bangham, 2012
    if exist(stackDirectoryOrImageOrImage)==7
        VOL=showImageOrMSRusingVOL(VOL, 'PathTo', stackDirectoryOrImage);
    else
        %msrfilewriter(filename,MSR);
        VolumeImage=stackDirectoryOrImage;
        if ndims(VolumeImage)>=3
            WriteSlices(pathDirectory,VolumeImage);
            VOL=showImageOrMSRusingVOL(VOL, 'PathTo', PathName,'msrFilename','Temp.msr');
            PathName=fullfile(VOL.PathToWatchFile,'TempVolViewerData');
        else
            error('Second argument does not appear to be a volume image')
        end
    end
end
