             dtsImage.setPixel(x: y + offset, y: y - offset, pixel: blue)
         }
 
-        self.rgbafImage = dtsImage.toUIImage()
-
-//        print("dtsImage: \(dtsImage)")
+        return dtsImage
+    }
+
+    func createFloatMask(offset: Int, width: Int, height: Int) -> DTSImagePlanarF {
+        var dtsImage = DTSImagePlanarF(width: width, height: height)
+        
+        let white = DTSPixelF(1)
+        
+        for x in width/10 ..< width * 9 / 10 {
+            for y in 0..<10 {
+                dtsImage.setPixel(x: x, y: y+offset, pixel: white)
+            }
+        }
+        
+        return dtsImage
+    }
+    func createRGBAFImageWithMask(floatImage: DTSImageRGBAF, offset: Int) -> DTSImageRGBAF {
+        let mask = createFloatMask(offset: offset, width: floatImage.width, height: floatImage.height)
+        
+        let newImage = floatImage.apply(mask: mask)
+        
+        return newImage
     }
 }

            cell.titleLabel.text = "RGBAF"
            cell.imageView.image = self.rgbafImage
            cell.backgroundColor = backgroundColor
        default:
            cell.titleLabel.text = "(unknown)"
            cell.backgroundColor = UIColor.orange

    // MARK: UICollectionViewDataSource

    override func numberOfSections(in collectionView: UICollectionView) -> Int {
        return 1
    }

    override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return 4
    }

    override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
