text: Title: `skimage.measure.find_contours` returns results outside masked areas
  Body: ### Description:
  
  The `skimage.measure.find_contours` function sometimes returns contours which are entirely outside the input array masked areas, and thus that should be filtered out. This was reported in the context of DataLab (see the [associated issue](https://github.com/Codra-Ingenierie-Informatique/DataLab/issues/34)).
  
  In DataLab, the "detection contour" feature is based on this function and, following a bug report, a workaround was added to simply filter out all contours which coordinates correspond to masked pixels:
  
  ```python
      contours = measure.find_contours(data, level=get_absolute_level(data, level))
      coords = []
      for contour in contours:
          # `contour` is a (N, 2) array (rows, cols): we need to check if all those
          # coordinates are masked: if so, we skip this contour
          if isinstance(data, ma.MaskedArray) and np.all(
              data.mask[contour[:, 0].astype(int), contour[:, 1].astype(int)]
          ):
              continue
  ```
  
  ### Way to reproduce:
  
  The test image may be found [here](https://github.com/Codra-Ingenierie-Informatique/DataLab/blob/main/cdl/data/tests/fabry-perot1.jpg).
  
  The test script which reproduced the issue (before it was fixed by adding the functions mentioned above) is [here](https://github.com/Codra-Ingenierie-Informatique/DataLab/blob/main/cdl/tests/features/images/contour_fabryperot_app.py).
  
  Please also take a look at the [associated issue](https://github.com/Codra-Ingenierie-Informatique/DataLab/issues/34) which describes the original problem.
  
  ### Version information:
  
  ```Shell
  3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)]
  Windows-10-10.0.22631-SP0
  scikit-image version: 0.22.0
  numpy version: 1.26.1
  ```
  