Skip to content

An issue with bilateral_filter() call when mask argument is really missing #14

@R-kicker

Description

@R-kicker

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions