Skip to content

JuliaArrays/IndirectArrays.jl

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

IndirectArrays

Build Status

codecov.io

An IndirectArray is one that encodes data using a combination of an index and a value table. Each element is assigned its own index, which is used to retrieve the value from the value table. Concretely, if A is an IndirectArray, then A[i,j...] = value[index[i,j,...]].

Among other uses, IndirectArrays can represent indexed images, sometimes called "colormap images" or "paletted images."

Installation

Pkg.add("IndirectArrays")

Usage

For example:

using IndirectArrays, Colors

colors = distinguishable_colors(6)
index = rand(1:6, 32, 32)
A = IndirectArray(index, colors)

random image

which has only 6 colors in it.

The value array can be of any type; it does not have to be color information.

Related packages

About

Julia implementation of indexed or "lookup" arrays

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages