TIFFRasters
Objective-C
@interface TIFFRasters : NSObject
Swift
class TIFFRasters : NSObject
Raster image values
-
Initialize
Declaration
Objective-C
- (instancetype)initWithWidth:(int)width andHeight:(int)height andSamplesPerPixel:(int)samplesPerPixel andBitsPerSample:(NSArray<NSNumber *> *)bitsPerSample andSampleValues:(NSMutableArray<NSMutableArray *> *)sampleValues;Swift
init!(width: Int32, andHeight height: Int32, andSamplesPerPixel samplesPerPixel: Int32, andBitsPerSample bitsPerSample: [NSNumber]!, andSampleValues sampleValues: NSMutableArray!)Parameters
widthwidth of pixels
heightheight of pixels
samplesPerPixelsamples per pixel
bitsPerSamplebits per sample
sampleValuesempty sample values double array
-
Initialize
Declaration
Objective-C
- (instancetype)initWithWidth:(int)width andHeight:(int)height andSamplesPerPixel:(int)samplesPerPixel andBitsPerSample:(NSArray<NSNumber *> *)bitsPerSample andInterleaveValues:(NSMutableArray *)interleaveValues;Swift
init!(width: Int32, andHeight height: Int32, andSamplesPerPixel samplesPerPixel: Int32, andBitsPerSample bitsPerSample: [NSNumber]!, andInterleaveValues interleaveValues: NSMutableArray!)Parameters
widthwidth of pixels
heightheight of pixels
samplesPerPixelsamples per pixel
bitsPerSamplebits per sample
interleaveValuesempty interleaved values array
-
Initialize
Declaration
Objective-C
- (instancetype)initWithWidth:(int)width andHeight:(int)height andSamplesPerPixel:(int)samplesPerPixel andBitsPerSample:(NSArray<NSNumber *> *)bitsPerSample andSampleValues:(NSMutableArray<NSMutableArray *> *)sampleValues andInterleaveValues:(NSMutableArray *)interleaveValues;Swift
init!(width: Int32, andHeight height: Int32, andSamplesPerPixel samplesPerPixel: Int32, andBitsPerSample bitsPerSample: [NSNumber]!, andSampleValues sampleValues: NSMutableArray!, andInterleaveValues interleaveValues: NSMutableArray!)Parameters
widthwidth of pixels
heightheight of pixels
samplesPerPixelsamples per pixel
bitsPerSamplebits per sample
sampleValuesempty sample values double array
interleaveValuesempty interleaved values array
-
Initialize
Declaration
Objective-C
- (instancetype)initWithWidth:(int)width andHeight:(int)height andSamplesPerPixel:(int)samplesPerPixel andBitsPerSample:(NSArray<NSNumber *> *)bitsPerSample;Swift
init!(width: Int32, andHeight height: Int32, andSamplesPerPixel samplesPerPixel: Int32, andBitsPerSample bitsPerSample: [NSNumber]!)Parameters
widthwidth of pixels
heightheight of pixels
samplesPerPixelsamples per pixel
bitsPerSamplebits per sample
-
Initialize
Declaration
Objective-C
- (instancetype)initWithWidth:(int)width andHeight:(int)height andSamplesPerPixel:(int)samplesPerPixel andSingleBitsPerSample:(int)bitsPerSample;Swift
init!(width: Int32, andHeight height: Int32, andSamplesPerPixel samplesPerPixel: Int32, andSingleBitsPerSample bitsPerSample: Int32)Parameters
widthwidth of pixels
heightheight of pixels
samplesPerPixelsamples per pixel
bitsPerSamplebits per sample for all samples of a pixel
-
True if the results are stored by samples
Declaration
Objective-C
- (BOOL)hasSampleValues;Swift
func hasSampleValues() -> BoolReturn Value
true if results exist
-
True if the results are stored interleaved
Declaration
Objective-C
- (BOOL)hasInterleaveValues;Swift
func hasInterleaveValues() -> BoolReturn Value
true if results exist
-
Add a value to the sample results
Declaration
Objective-C
- (void)addSampleValue:(NSObject *)value toIndex:(int)sampleIndex andCoordinate:(int)coordinate;Swift
func addSampleValue(_ value: NSObject!, to sampleIndex: Int32, andCoordinate coordinate: Int32)Parameters
sampleIndexsample index
coordinatecoordinate location
valuevalue
-
Add a value to the interleaved results
Declaration
Objective-C
- (void)addInterleaveValue:(NSObject *)value toCoordinate:(int)coordinate;Swift
func addInterleaveValue(_ value: NSObject!, toCoordinate coordinate: Int32)Parameters
coordinatecoordinate location
valuevalue
-
Get the width of pixels
Declaration
Objective-C
- (int)width;Swift
func width() -> Int32Return Value
width
-
Get the height of pixels
Declaration
Objective-C
- (int)height;Swift
func height() -> Int32Return Value
height
-
Return the number of pixels
Declaration
Objective-C
- (int)numPixels;Swift
func numPixels() -> Int32Return Value
number of pixels
-
Get the number of samples per pixel
Declaration
Objective-C
- (int)samplesPerPixel;Swift
func samplesPerPixel() -> Int32Return Value
samples per pixel
-
Get the bits per sample
Declaration
Objective-C
- (NSArray<NSNumber *> *)bitsPerSample;Swift
func bitsPerSample() -> [NSNumber]!Return Value
bits per sample
-
Get the results stored by samples
Declaration
Objective-C
- (NSArray<NSArray *> *)sampleValues;Swift
func sampleValues() -> [[Any]]!Return Value
sample values
-
Set the results stored by samples
Declaration
Objective-C
- (void)setSampleValuesAndValidate: (NSMutableArray<NSMutableArray *> *)sampleValues;Swift
func setSampleValuesAndValidate(_ sampleValues: NSMutableArray!)Parameters
sampleValuessample values
-
Get the results stored as interleaved pixel samples
Declaration
Objective-C
- (NSArray *)interleaveValues;Swift
func interleaveValues() -> [Any]!Return Value
interleaved values
-
Set the results stored as interleaved pixel samples
Declaration
Objective-C
- (void)setInterleaveValuesAndValidate:(NSMutableArray *)interleaveValues;Swift
func setInterleaveValuesAndValidate(_ interleaveValues: NSMutableArray!)Parameters
interleaveValuesinterleaved values
-
Get the pixel sample values
Declaration
Objective-C
- (NSArray<NSNumber *> *)pixelAtX:(int)x andY:(int)y;Swift
func pixelAt(x: Int32, andY y: Int32) -> [NSNumber]!Parameters
xx coordinate (>= 0 && < width)
yy coordinate (>= 0 && < height)
Return Value
pixel sample values
-
Set the pixel sample values
Declaration
Objective-C
- (void)setPixelAtX:(int)x andY:(int)y withValues:(NSArray<NSNumber *> *)values;Swift
func setPixelAtX(_ x: Int32, andY y: Int32, withValues values: [NSNumber]!)Parameters
xx coordinate (>= 0 && < width)
yy coordinate (>= 0 && < height)
valuespixel values
-
Get a pixel sample value
Declaration
Objective-C
- (NSNumber *)pixelSampleAtSample:(int)sample andX:(int)x andY:(int)y;Swift
func pixelSample(atSample sample: Int32, andX x: Int32, andY y: Int32) -> NSNumber!Parameters
samplesample index (>= 0 && < samplesPerPixel)
xx coordinate (>= 0 && < width)
yy coordinate (>= 0 && < height)
Return Value
pixel sample
-
Set a pixel vample value
Declaration
Objective-C
- (void)setPixelSampleAtSample:(int)sample andX:(int)x andY:(int)y withValue:(NSNumber *)value;Swift
func setPixelSampleAtSample(_ sample: Int32, andX x: Int32, andY y: Int32, withValue value: NSNumber!)Parameters
samplesample index (>= 0 && < samplesPerPixel)
xx coordinate (>= 0 && < width)
yy coordinate (>= 0 && < height)
valuepixel value
-
Get the first pixel sample value, useful for single sample pixels (grayscale)
Declaration
Objective-C
- (NSNumber *)firstPixelSampleAtX:(int)x andY:(int)y;Swift
func firstPixelSampleAt(x: Int32, andY y: Int32) -> NSNumber!Parameters
xx coordinate (>= 0 && < width)
yy coordinate (>= 0 && < height)
Return Value
first pixel sample
-
Set the first pixel sample value, useful for single sample pixels (grayscale)
Declaration
Objective-C
- (void)setFirstPixelSampleAtX:(int)x andY:(int)y withValue:(NSNumber *)value;Swift
func setFirstPixelSampleAtX(_ x: Int32, andY y: Int32, withValue value: NSNumber!)Parameters
xx coordinate (>= 0 && < width)
yy coordinate (>= 0 && < height)
valuepixel value
-
Get the sample index location
Declaration
Objective-C
- (int)sampleIndexAtX:(int)x andY:(int)y;Swift
func sampleIndexAt(x: Int32, andY y: Int32) -> Int32Parameters
xx coordinate
yy coordinate
Return Value
sample index
-
Get the interleave index location
Declaration
Objective-C
- (int)interleaveIndexAtX:(int)x andY:(int)y;Swift
func interleaveIndexAt(x: Int32, andY y: Int32) -> Int32Parameters
xx coordinate
yy coordinate
Return Value
interleave index
-
Size in bytes of the image
Declaration
Objective-C
- (int)size;Swift
func size() -> Int32Return Value
bytes
-
Size in bytes of a pixel
Declaration
Objective-C
- (int)sizePixel;Swift
func sizePixel() -> Int32Return Value
bytes
-
Size in bytes of a sample
Declaration
Objective-C
- (int)sizeSample:(int)sample;Swift
func sizeSample(_ sample: Int32) -> Int32Parameters
samplesample index
Return Value
bytes
-
Calculate the rows per strip to write
Declaration
Objective-C
- (int)calculateRowsPerStripWithPlanarConfiguration:(int)planarConfiguration;Swift
func calculateRowsPerStrip(withPlanarConfiguration planarConfiguration: Int32) -> Int32Parameters
planarConfigurationchunky or planar
Return Value
rows per strip
-
Calculate the rows per strip to write
Declaration
Objective-C
- (int)calculateRowsPerStripWithPlanarConfiguration:(int)planarConfiguration andMaxBytesPerStrip:(int)maxBytesPerStrip;Swift
func calculateRowsPerStrip(withPlanarConfiguration planarConfiguration: Int32, andMaxBytesPerStrip maxBytesPerStrip: Int32) -> Int32Parameters
planarConfigurationchunky or planar
maxBytesPerStripattempted max bytes per strip
Return Value
rows per strip
-
Create an empty sample values array
Declaration
Objective-C
+ (NSMutableArray<NSMutableArray *> *) createEmptySampleValuesWithSamplesPerPixel:(int)samplesPerPixel andWidth:(int)width andHeight:(int)height;Swift
class func createEmptySampleValues(withSamplesPerPixel samplesPerPixel: Int32, andWidth width: Int32, andHeight height: Int32) -> NSMutableArray!Parameters
samplesPerPixelsamples per pixel
widthwidth of pixels
heightheight of pixels
-
Create an empty sample values array
Declaration
Objective-C
+ (NSMutableArray<NSMutableArray *> *) createEmptySampleValuesWithSamplesPerPixel:(int)samplesPerPixel andPixels:(int)pixels;Swift
class func createEmptySampleValues(withSamplesPerPixel samplesPerPixel: Int32, andPixels pixels: Int32) -> NSMutableArray!Parameters
samplesPerPixelsamples per pixel
pixelsnumber of pixels
-
Create an empty interleave values array
Declaration
Objective-C
+ (NSMutableArray *)createEmptyInterleaveValuesWithSamplesPerPixel: (int)samplesPerPixel andWidth:(int)width andHeight:(int)height;Swift
class func createEmptyInterleaveValues(withSamplesPerPixel samplesPerPixel: Int32, andWidth width: Int32, andHeight height: Int32) -> NSMutableArray!Parameters
samplesPerPixelsamples per pixel
widthwidth of pixels
heightheight of pixels
-
Create an empty interleave values array
Declaration
Objective-C
+ (NSMutableArray *)createEmptyInterleaveValuesWithSamplesPerPixel: (int)samplesPerPixel andPixels:(int)pixels;Swift
class func createEmptyInterleaveValues(withSamplesPerPixel samplesPerPixel: Int32, andPixels pixels: Int32) -> NSMutableArray!Parameters
samplesPerPixelsamples per pixel
pixelsnumber of pixels
-
Make a bits per sample array where each samples of a pixel has the same value
Declaration
Objective-C
+ (NSArray<NSNumber *> *) makeBitsPerSampleArrayWithSamplesPerPixel:(int)samplesPerPixel andBitsPerSample:(int)bitsPerSample;Swift
class func makeBitsPerSampleArray(withSamplesPerPixel samplesPerPixel: Int32, andBitsPerSample bitsPerSample: Int32) -> [NSNumber]!Parameters
samplesPerPixelsamples per pixel
bitsPerSamplebits per sample for all samples of a pixel
Return Value
bits per sample array
View on GitHub
TIFFRasters Class Reference