public ClassifiedSerializedPNGMask(Vector classifiedVector, Size originalImageSize)
        {
            this.classification = classifiedVector.classification;

            Image maskImage = classifiedVector.PNGMask(originalImageSize);

            this.base64EncodedMask = ImageClassification.SerializedPNGMask(maskImage);

            maskImage.Dispose();
        }
        public static List <ClassifiedSerializedPNGMask> MasksFromImageClassification(ImageClassification classification)
        {
            List <ClassifiedSerializedPNGMask> masks = new List <ClassifiedSerializedPNGMask>();

            foreach (Vector v in classification.vectors)
            {
                masks.Add(FromVectorAndClassifier(v, classification));
            }

            return(masks);
        }
 public static ClassifiedSerializedPNGMask FromVectorAndClassifier(Vector classifiedVector, ImageClassification classifier)
 {
     return(new ClassifiedSerializedPNGMask(classifiedVector, classifier.imageSize));
 }