As stated in help "Mask is an optional LogicalNeuroVol object". It means one may omit hist argument. However, when a user calls example code below:
brain_mask <- read_vol(system.file("extdata", "global_mask_v4.nii", package="neuroim2"))
# Apply bilateral filtering to the brain volume
filtered_vol <- bilateral_filter(brain_mask, spatial_sigma = 2, intensity_sigma = 25, window = 1)
The error message produced:
Error in (function (cond) :
error in evaluating the argument 'x' in selecting a method for function 'space': argument "mask" is missing, with no default
The cause is due to that in the code actually the missing argument is not checked here:
out <- NeuroVol(farr, space(mask))
That issue should be addressed to handle missing argument correctly