code: def image2array(self, image):
          
          idex_mask = self._idex_mask
          array = util.image2array(image)
          if self._idex_mask_bool is True:
              return array[idex_mask == 1]
          else:
              return array
docs: returns 1d array of values in image in idex_mask
          :param image:
          :param idex_mask:
          :return: