Lynkeos
Instance Methods | Class Methods | List of all members
<LynkeosFileReader> Protocol Reference

Common protocol for all file readers. More...

#import <LynkeosFileReader.h>

Inheritance diagram for <LynkeosFileReader>:
Inheritance graph
[legend]
Collaboration diagram for <LynkeosFileReader>:
Collaboration graph
[legend]

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...
 

Detailed Description

Common protocol for all file readers.

This protocol is not meant to be directly implemented. It is the common part of more specialized protocols.

Method Documentation

- (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.

Parameters
readerThe reader instance from which data should be used to calibrate ours.
Returns
Wether the image from this file can be calibrated by the reader
- (NSDictionary*) getMetaData

Get the metadata of this file.

This method is reserved for future use. Current implementations shall return nil.

Returns
A Property list containing the metadata.
- (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.

Parameters
[out]vminThe minimum level
[out]vmaxThe 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.

Returns
Wether the reader has a custom image buffer class
- (void) imageWidth: (u_short *)  w
height: (u_short *)  h 

Get the pixel size of the image or movie.

Parameters
[out]wthe image width
[out]hthe 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.

Parameters
urlThe URL of the file to read.
Returns
The initialized instance.
+ (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)

Parameters
fileTypesThe 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.

Returns
The number of color planes

The documentation for this protocol was generated from the following file: