In Photoshop you can use a mask layer to filter an image using another image. A mask layer in Photoshop is a greyscale image attached to a layer that determines that layers transparency per pixel. White is fully opaque, black is fully transparent. This method can be used for example to filter a curvature layer by a slope layer.
Would it be possible to have the same result in QGIS using the raster calculator or other raster processing tools?
Update
Applying the following GDAL commands:
gdal_translate -of VRT -b 1 input.tif band1.vrt
gdalbuildvrt -separate out_with_mask.vrt band1.vrt your_mask.tif
gdal_translate -of GTiff -co alpha=YES out_with_alpha.vrt out_with_alpha.tif
and testing the obtained file I have:
Band 1 Block=1808x1 Type=Float32, ColorInterp=Gray
and
Band 2 Block=1808x1 Type=Float32, ColorInterp=Alpha
but I don't get the target file masking using transparency values based on the mask file, I just get a full transparency effect on the mask file:
