Lynkeos
|
Common protocol for all file readers. More...
#import <LynkeosFileReader.h>
Instance Methods | |
(id) | - initWithURL: |
Initializes an instance for reading an URL. More... | |
(void) | - imageWidth:height: |
Get the pixel size of the image or movie. More... | |
(u_short) | - numberOfPlanes |
Get the number of color planes in this file. More... | |
(void) | - getMinLevel:maxLevel: |
Retrieves the minimum and maximum levels for this file. More... | |
(NSDictionary *) | - getMetaData |
Get the metadata of this file. More... | |
(BOOL) | - canBeCalibratedBy: |
Can image/movie data be calibrated by another reader instance data. More... | |
Class Methods | |
(void) | + lynkeosFileTypes: |
Returns the file types handled by that class. More... | |
(BOOL) | + hasCustomImageBuffer |
Does this reader provides some custom image buffer class(es) ? More... | |
Common protocol for all file readers.
This protocol is not meant to be directly implemented. It is the common part of more specialized protocols.
- (BOOL) canBeCalibratedBy: | (id< LynkeosFileReader >) | reader |
Can image/movie data be calibrated by another reader instance data.
This method will be called if and only if the reader has a custom image buffer. It shall return YES if the other reader custom image data can be used to calibrate this instance data.
In other words : "does the data from the two readers comes from the same
representation of the same sensor ?".
In a typical implementation, it tests if the readers are instances of the same class.
Actual implementations will for sure do something different.
reader | The reader instance from which data should be used to calibrate ours. |
- (NSDictionary*) getMetaData |
Get the metadata of this file.
This method is reserved for future use. Current implementations shall return nil.
- (void) getMinLevel: | (double *) | vmin | |
maxLevel: | (double *) | vmax | |
Retrieves the minimum and maximum levels for this file.
The usual implementation is to return 0..255 and to return images with pixels in this range. But, file format permitting, it is possible to return other values if they are relevant.
[out] | vmin | The minimum level |
[out] | vmax | The maximum level |
+ (BOOL) hasCustomImageBuffer |
Does this reader provides some custom image buffer class(es) ?
This method return YES if the image data is better represented by a custom kind of LynkeosImageBuffer class. In which case, the main app will use this class for calibration purpose.
- (void) imageWidth: | (u_short *) | w | |
height: | (u_short *) | h | |
Get the pixel size of the image or movie.
[out] | w | the image width |
[out] | h | the image height |
- (id) initWithURL: | (NSURL *) | url |
Initializes an instance for reading an URL.
If this URL cannot be read by this class, the instance deallocates itself and returns nil.
url | The URL of the file to read. |
+ (void) lynkeosFileTypes: | (NSArray **) | fileTypes |
Returns the file types handled by that class.
The priority option shall be implemented only if you provide a specialized reader which overrides a generic one for some particular implementation of a file type (ex: the 16 bits TIFF reader overrides the Cocoa TIFF reader for 16 bits files)
fileTypes | The file types (as NSString coded for use by NSOpenPanel) that this class knows how to read. If a file type is preceded in the array by a NSNumber, the higher the number, the higher this class has priority for opening that kind of file (otherwise, the priority is set to zero). |
- (u_short) numberOfPlanes |
Get the number of color planes in this file.