// // NSImageToRimage.h // AUCoderDemo // // Created by Andrew Salamon on 5/31/06. // Copyright (c) 2006 Machine Perception Laboratory // University of California San Diego.// #import #ifdef XCODE #import #else #import "rimage.h" #endif typedef u_int32_t RGBPIXEL_; /** CERTMethods category on the NSImage class. * This category contains methods for creating an RImage from an NSImage. */ @interface NSImage(CERTMethods) /// norm will be multiplied by each pixel value. Usually used to convert pixels values with ranges (0.0 - 1.0) to (0 - 255). + (NSImage *)imageFromRImage:(RImage *)rimage withNorm:(float)_norm; + (NSImage *)imageFromRImage:(RImage *)rimage; + (NSImage *)imageFromColorRImage:(RImage *)rimage; - (NSBitmapImageRep *)bitmapImageRep; - (RImage *)rimageRep; - (NSImage *)imageFromRect:(NSRect)rect; #ifdef USE_IMAGEMAGICK - (RImage *)rimageFromImageMagick; #endif @end RImage *rimageFromImage( NSImage *image ); RImage *colorRimageFromImage( NSImage *image );