RawImage create(iPoint2D dim, RawImageType type, UInt32 componentsPerPixel) { switch (type) { case TYPE_USHORT16: return new RawImageDataU16(dim, componentsPerPixel); default: Debug.Write("RawImage::create: Unknown Image type!\n"); break; } return null; }
RawImage create(RawImageType type) { switch (type) { case RawImageDataType.TYPE_USHORT16: return new RawImageDataU16(); case TYPE_FLOAT32: return new RawImageDataFloat(); default: Debug.Write("RawImage::create: Unknown Image type!\n"); break; } return null; }
private void SetRawImageType(RawImageType type, bool autoSave) { if (type == RawImageType.Color) { SetChecked(barButtonItemRawColorColor, true); barButtonItemRawColor.LargeGlyph = barButtonItemRawColorColor.Glyph; barButtonItemRawColor.Caption = barButtonItemRawColorColor.Caption; } else if (type == RawImageType.Grayscale) { SetChecked(barCheckItemRawColorGrayscale, true); barButtonItemRawColor.LargeGlyph = barCheckItemRawColorGrayscale.Glyph; barButtonItemRawColor.Caption = barCheckItemRawColorGrayscale.Caption; } else if (type == RawImageType.Off) { SetChecked(barCheckItemRawColorOff, true); barButtonItemRawColor.LargeGlyph = barCheckItemRawColorOff.Glyph; barButtonItemRawColor.Caption = barCheckItemRawColorOff.Caption; } if (autoSave) appSetting.RawImageType = type; }