コード例 #1
0
        private void ApplyMask_Click(object sender, RoutedEventArgs e)
        {
            Button selectedMask = sender as Button;

            inputWithMask       = SegmentationOperator.ApplyMask(input, selectedMask.CommandParameter as Bitmap);
            BitmapImageWithMask = BitmapToBitmapImage(inputWithMask);
        }
コード例 #2
0
 public void InitializeMasks(List <Bitmap> bitmapMasks, Bitmap input, Bitmap output)
 {
     this.input        = input;
     this.output       = output;
     BitmapImageOutput = BitmapToBitmapImage(output);
     Masks             = new ObservableCollection <MaskModel>();
     foreach (Bitmap bmp in bitmapMasks)
     {
         Masks.Add(new MaskModel {
             Bitmap = bmp, Image = BitmapToBitmapImage(bmp)
         });
     }
     inputWithMask       = SegmentationOperator.ApplyMask(input, Masks.First().Bitmap);
     BitmapImageWithMask = BitmapToBitmapImage(inputWithMask);
 }