validate method
void
validate()
Implementation
void validate() {
if (width == 0) {
throw SDKException.validationFailed(
'width is required',
fieldPath: 'SegmentationImage.width',
);
}
if (width < 1 || width > 4096) {
throw SDKException.validationFailed(
'width must be in 1...4096 (got $width)',
fieldPath: 'SegmentationImage.width',
);
}
if (height == 0) {
throw SDKException.validationFailed(
'height is required',
fieldPath: 'SegmentationImage.height',
);
}
if (height < 1 || height > 4096) {
throw SDKException.validationFailed(
'height must be in 1...4096 (got $height)',
fieldPath: 'SegmentationImage.height',
);
}
if (pixelFormat.value == 0) {
throw SDKException.validationFailed(
'pixel_format is required',
fieldPath: 'SegmentationImage.pixel_format',
);
}
}