|
Imagine++
|
Classes | |
| class | Imagine::Image< T, dim > |
| Image. More... | |
Functions | |
| template<typename T , int dim> | |
| Image< T, dim > | Imagine::blur (const Image< T, dim > &I, typename PixelTraits< T >::scalar_type sigma, bool neumann=true) |
| Blur. More... | |
| template<typename T , int dim> | |
| Image< T, dim > | Imagine::blur (const Image< T, dim > &I, const FVector< typename PixelTraits< T >::scalar_type, dim > &sigmas, bool neumann=true) |
| Blur (anisotropic). More... | |
| template<typename T , int dim> | |
| Image< Color, dim > | Imagine::color (const Image< RGB< T >, dim > &I, const RGB< T > &m, const RGB< T > &M) |
| Color representation. More... | |
| template<typename T , int dim> | |
| Image< Color, dim > | Imagine::color (const Image< RGB< T >, dim > &I) |
| Color representation. More... | |
| void | Imagine::createMaskFromColor (Image< AlphaColor > &I, AlphaColor col) |
| Create a transparency mask from a specified color-key. More... | |
| template<typename T , int dim> | |
| Image< T > | Imagine::cut2D (const Image< T, dim > &I, const Coords< dim > &cut, int d1, int d2) |
| 2D cut. More... | |
| template<typename T , int dim> | |
| Image< T, dim > | Imagine::deriche (const Image< T, dim > &I, typename PixelTraits< T >::scalar_type sigma, int order, int d, bool neumann=true) |
| Deriche filter. More... | |
| template<typename T , int dim> | |
| T | Imagine::derivative (const Image< T, dim > &u, const Coords< dim > &p, int d) |
| Derivative. More... | |
| void | Imagine::display (const Image< octet > &I, int x=0, int y=0, bool xorMode=false, double fact=1.) |
| Display grey image. More... | |
| void | Imagine::display (const Image< octet > &I, IntPoint2 p, bool xorMode=false, double fact=1.) |
| Display grey image (IntPoint2 alias). | |
| void | Imagine::display (const Image< Color > &I, int x=0, int y=0, bool xorMode=false, double fact=1.) |
| Display color image. More... | |
| void | Imagine::display (const Image< AlphaColor > &I, int x=0, int y=0, bool xorMode=false, double fact=1.) |
| Display color image with alpha channel. More... | |
| void | Imagine::display (const Image< Color > &I, IntPoint2 p, bool xorMode=false, double fact=1.) |
| Display color image (IntPoint2 alias). | |
| void | Imagine::display (const Image< octet > &IR, const Image< octet > &IG, const Image< octet > &IB, int x=0, int y=0, bool xorMode=false, double fact=1.) |
| Display color image (3 chanels). More... | |
| void | Imagine::display (const Image< octet > &IR, const Image< octet > &IG, const Image< octet > &IB, IntPoint2 p, bool xorMode=false, double fact=1.) |
| Display color image (3 chanels, IntPoint2 alias). | |
| template<typename T , int dim> | |
| Image< T, dim > | Imagine::enlarge (const Image< T, dim > &I, Coords< dim > nd, bool keepRatio=false) |
| Enlarge image (given dimensions). More... | |
| template<typename T > | |
| Image< T, 2 > | Imagine::enlarge (const Image< T, 2 > &I, int w, int h, bool keepRatio=false) |
| Enlarge image (given dimensions), 2D alias. | |
| template<typename T > | |
| Image< T, 3 > | Imagine::enlarge (const Image< T, 3 > &I, int w, int h, int d, bool keepRatio=false) |
| Enlarge image (given dimensions), 3D alias. | |
| template<typename T , int dim> | |
| Image< T, dim > | Imagine::enlarge (const Image< T, dim > &I, double fact) |
| Enlarge image (given factor). More... | |
| template<typename T > | |
| T | Imagine::gaussianCurvature (const Image< T, 3 > &u, const Coords< 3 > &p) |
| Gaussian curvature of iso level (3D). More... | |
| template<typename T , int dim> | |
| FVector< T, dim > | Imagine::gradient (const Image< T, dim > &u, const Coords< dim > &p) |
| Gradient. More... | |
| template<typename T , int dim> | |
| Image< octet, dim > | Imagine::grey (const Image< T, dim > &I, T m, T M) |
| Grey level representation. More... | |
| template<typename T , int dim> | |
| Image< octet, dim > | Imagine::grey (const Image< T, dim > &I) |
| Grey level representation. More... | |
| template<typename T , int dim> | |
| void | Imagine::inPlaceBlur (Image< T, dim > &I, const FVector< typename PixelTraits< T >::scalar_type, dim > &sigmas, bool neumann=true) |
| In Place Blur (anisotropic). More... | |
| template<typename T , int dim> | |
| void | Imagine::inPlaceBlur (Image< T, dim > &I, typename PixelTraits< T >::scalar_type sigma, bool neumann=true) |
| In Place Blur. More... | |
| template<typename T , int dim> | |
| void | Imagine::inPlaceDeriche (Image< T, dim > &I, typename PixelTraits< T >::scalar_type sigma, int order, int d, bool neumann=true) |
| In place Deriche filter. More... | |
| template<typename T , int dim> | |
| T | Imagine::laplacian (const Image< T, dim > &u, const Coords< dim > &p) |
| Laplacian. More... | |
| bool | Imagine::load (Image< octet > &I, std::string name) |
| Load grey image. More... | |
| bool | Imagine::load (Image< Color > &I, std::string name) |
| Load color image. More... | |
| bool | Imagine::load (Image< AlphaColor > &I, std::string name) |
| Load color image with alpha channel. More... | |
| bool | Imagine::load (Image< octet > &IR, Image< octet > &IG, Image< octet > &IB, std::string name) |
| Load color image. More... | |
| template<typename T , int dim> | |
| bool | Imagine::loadAnalyze (Image< T, dim > &I, const std::string name) |
| Load Analyze file. More... | |
| template<typename T > | |
| T | Imagine::meanCurvature (const Image< T, 3 > &u, const Coords< 3 > &p) |
| Mean curvature (3D). More... | |
| template<typename T > | |
| T | Imagine::meanCurvature (const Image< T, 2 > &u, const Coords< 2 > &p) |
| Mean curvature (2D). | |
| template<typename T > | |
| T | Imagine::meanCurvatureMotion (const Image< T, 3 > &u, const Coords< 3 > &p) |
| Level set Mean curvature motion (3D). More... | |
| template<typename T > | |
| T | Imagine::meanCurvatureMotion (const Image< T, 2 > &u, const Coords< 2 > &p) |
| Level set Mean curvature motion (2D). | |
| template<typename T , int dim> | |
| void | Imagine::neighbourCoords (const Image< T, dim > &u, const Coords< dim > &p, Coords< dim > &pp, Coords< dim > &pm) |
| Coordinates of neighbours. More... | |
| template<typename T , int dim> | |
| void | Imagine::neighbourOffsets (const Image< T, dim > &u, const Coords< dim > &p, FVector< size_t, dim > &dp, FVector< size_t, dim > &dm) |
| Offsets to neighbours. More... | |
| template<typename T , int dim> | |
| FVector< T, dim > | Imagine::normal (const Image< T, dim > &u, const Coords< dim > &p) |
| Unit normal of iso level. More... | |
| template<typename T , int dim> | |
| Image< Color, dim > | Imagine::rainbow (const Image< T, dim > &I, T m, T M) |
| Rainbow representation. More... | |
| template<typename T , int dim> | |
| Image< Color, dim > | Imagine::rainbow (const Image< T, dim > &I) |
| Rainbow representation. More... | |
| template<typename T , int dim> | |
| Image< T, dim > | Imagine::reduce (const Image< T, dim > &I, int fact) |
| Reduce image (integer factor). More... | |
| template<typename T , int dim> | |
| Image< T, dim > | Imagine::reduce (const Image< T, dim > &I, Coords< dim > nd, bool keepRatio=false) |
| Reduce image (given dimensions). More... | |
| template<typename T > | |
| Image< T, 2 > | Imagine::reduce (const Image< T, 2 > &I, int w, int h, bool keepRatio=false) |
| Reduce image (given dimensions), 2D alias. | |
| template<typename T > | |
| Image< T, 3 > | Imagine::reduce (const Image< T, 3 > &I, int w, int h, int d, bool keepRatio=false) |
| Reduce image (given dimensions), 3D alias. | |
| template<typename T , int dim> | |
| Image< T, dim > | Imagine::reduce (const Image< T, dim > &I, double fact) |
| Reduce image (double factor). More... | |
| bool | Imagine::save (const Image< octet > &I, std::string name) |
| Save grey image. More... | |
| bool | Imagine::save (const Image< Color > &I, std::string name, int quality=85) |
| Save color image. More... | |
| bool | Imagine::save (Image< AlphaColor > &I, std::string name, int quality=85) |
| Save color imagewith alpha channel. More... | |
| bool | Imagine::save (const Image< octet > &IR, const Image< octet > &IG, const Image< octet > &IB, std::string name, int quality=85) |
| Save color image. More... | |
| template<typename TO , typename TI , int dim> | |
| bool | Imagine::saveAnalyze (const Image< TI, dim > &I, const std::string name) |
| Save Analyze file. More... | |
| template<typename T , int dim> | |
| Image< T, dim > | Imagine::scaleDown (const Image< T, dim > &I, int fact) |
| Down scaling: fast naive version. More... | |
| template<typename T , int dim> | |
| Image< T, dim > | Imagine::scaleUp (const Image< T, dim > &I, int fact) |
| Up scaling: fast naive version. More... | |
| Image<T,dim> Imagine::blur | ( | const Image< T, dim > & | I, |
| typename PixelTraits< T >::scalar_type | sigma, | ||
| bool | neumann = true |
||
| ) |
Blur using Deriche
| I | input image. |
| sigma | smoothing parameter |
| neumann | Neumann border condition (default=true) |
| Image<T,dim> Imagine::blur | ( | const Image< T, dim > & | I, |
| const FVector< typename PixelTraits< T >::scalar_type, dim > & | sigmas, | ||
| bool | neumann = true |
||
| ) |
Anisotropic blur using Deriche
| I | input image. |
| sigmas | smoothing parameters (sigmas[i] in dimension i) |
| neumann | Neumann border condition (default=true) |
| Image<Color,dim> Imagine::color | ( | const Image< RGB< T >, dim > & | I, |
| const RGB< T > & | m, | ||
| const RGB< T > & | M | ||
| ) |
Represents a RGB<T> image by a Color one (each coordinate being rescaled from 0 to 255 and stored to respective R,G or B channel)
| I | image to represent |
| m,M | extremal values (For each channel, m[i] (or less) will be 0, M[i] (or more) 255) |
| Image<Color,dim> Imagine::color | ( | const Image< RGB< T >, dim > & | I | ) |
|
inline |
Create a transparency mask from a specified color-key. Hides a color in current image by making it invisible.
| I | image to modify |
| col | color to hide |
| Image<T> Imagine::cut2D | ( | const Image< T, dim > & | I, |
| const Coords< dim > & | cut, | ||
| int | d1, | ||
| int | d2 | ||
| ) |
Extract a 2D cut from a N-dimensional image
| I | image to cut |
| cut | a point of the cut (used to set every fixed coordinates). |
| d1 | the first moving coordinate. |
| d2 | the second moving coordinate. |
| Image<T,dim> Imagine::deriche | ( | const Image< T, dim > & | I, |
| typename PixelTraits< T >::scalar_type | sigma, | ||
| int | order, | ||
| int | d, | ||
| bool | neumann = true |
||
| ) |
Deriche filter
| I | input image. |
| sigma | smoothing parameter |
| order | order of derivation (between 0 and 2) |
| d | dimension of derivation |
| neumann | Neumann border condition (default=true) |
| T Imagine::derivative | ( | const Image< T, dim > & | u, |
| const Coords< dim > & | p, | ||
| int | d | ||
| ) |
PDE schemes. Derivative.
| u | image |
| p | position |
| d | direction |
|
inline |
Displays a grey image in current Window. NB: zooming factor is a fast hardware rendering and does not necesseraly use interpolation or anti aliasing.
| I | image to display |
| x,y | position in window (default=(0,0)) |
| xorMode | XOR drawing (default=off). Used twice, recovers the original content |
| fact | scaling factor (default=1.) |
|
inline |
Displays a color image in current Window. NB: zooming factor is a fast hardware rendering and does not necesseraly use interpolation or anti aliasing.
| I | image to display |
| x,y | position in window (default=(0,0)) |
| xorMode | XOR drawing (default=off). Used twice, recovers the original content |
| fact | scaling factor (default=1.) |
|
inline |
Displays a alpha color image in current Window. NB: zooming factor is a fast hardware rendering and does not necesseraly use interpolation or anti aliasing.
| I | image to display |
| x,y | position in window (default=(0,0)) |
| xorMode | XOR drawing (default=off). Used twice, recovers the original content |
| fact | scaling factor (default=1.) |
|
inline |
Displays a color image given by 3 chanels in current Window. NB: zooming factor is a fast hardware rendering and does not necesseraly use interpolation or anti aliasing.
| IR,IG,IB | image to display |
| x,y | position in window (default=(0,0)) |
| xorMode | XOR drawing (default=off). Used twice, recovers the original content |
| fact | scaling factor (default=1.) |
| Image<T,dim> Imagine::enlarge | ( | const Image< T, dim > & | I, |
| Coords< dim > | nd, | ||
| bool | keepRatio = false |
||
| ) |
Enlarges image to given dimensions. Interpolation is performed. If ratio is kept, extra parts of the reduced image are filled with the max value of the original one.
| I | image to scale |
| nd | enlarged dimensions. |
| keepRatio | keeps aspect ratio or not? |
|
inline |
| T Imagine::gaussianCurvature | ( | const Image< T, 3 > & | u, |
| const Coords< 3 > & | p | ||
| ) |
PDE schemes. Gaussian curvature of iso level at p
| u | image |
| p | position |
| FVector<T,dim> Imagine::gradient | ( | const Image< T, dim > & | u, |
| const Coords< dim > & | p | ||
| ) |
PDE schemes. Gradient at p
| u | image |
| p | position |
| Image<octet,dim> Imagine::grey | ( | const Image< T, dim > & | I, |
| T | m, | ||
| T | M | ||
| ) |
Represents a scalar image by a grey scale (from BLACK to WHITE) for display purposes
| I | image to represent |
| m,M | extremal values (m (or less) will be BLACK, M (or more) WHITE) |
| Image<octet,dim> Imagine::grey | ( | const Image< T, dim > & | I | ) |
| void Imagine::inPlaceBlur | ( | Image< T, dim > & | I, |
| const FVector< typename PixelTraits< T >::scalar_type, dim > & | sigmas, | ||
| bool | neumann = true |
||
| ) |
In place anisotropic blur using Deriche
| I | input/output image. |
| sigmas | smoothing parameters (sigmas[i] for dimension i) |
| neumann | Neumann border condition (default=true) |
| void Imagine::inPlaceBlur | ( | Image< T, dim > & | I, |
| typename PixelTraits< T >::scalar_type | sigma, | ||
| bool | neumann = true |
||
| ) |
In place blur using Deriche
| I | input/output image. |
| sigma | smoothing parameter |
| neumann | Neumann border condition (default=true) |
| void Imagine::inPlaceDeriche | ( | Image< T, dim > & | I, |
| typename PixelTraits< T >::scalar_type | sigma, | ||
| int | order, | ||
| int | d, | ||
| bool | neumann = true |
||
| ) |
In place Deriche filter
| I | input/output image. |
| sigma | smoothing parameter |
| order | order of derivation (between 0 and 2) |
| d | dimension of derivation |
| neumann | Neumann border condition (default=true) |
| T Imagine::laplacian | ( | const Image< T, dim > & | u, |
| const Coords< dim > & | p | ||
| ) |
PDE schemes. Laplacian.
| u | image |
| p | position |
|
inline |
Loads a grey (octet) image from a file. Known formats: JPG, PNG, TIFF
| I | image to load |
| name | file name |
|
inline |
|
inline |
Loads a alpha color (i.e AlphaColor) image from a file. Known formats are JPG, PNG, TIFF, GIF. Prefer PNG for image with transparency displaying.
| I | image to load |
| name | file name |
|
inline |
|
inline |
Loads an image from an Analyze file (medical imaging) (extensions IMG and HDR)
| I | image to load |
| name | file name |
| T Imagine::meanCurvature | ( | const Image< T, 3 > & | u, |
| const Coords< 3 > & | p | ||
| ) |
PDE schemes. Mean curvature of iso level at p.
| u | image |
| p | position |
| T Imagine::meanCurvatureMotion | ( | const Image< T, 3 > & | u, |
| const Coords< 3 > & | p | ||
| ) |
PDE schemes. Level set Mean curvature motion at p
| u | image |
| p | position |
| void Imagine::neighbourCoords | ( | const Image< T, dim > & | u, |
| const Coords< dim > & | p, | ||
| Coords< dim > & | pp, | ||
| Coords< dim > & | pm | ||
| ) |
PDE schemes. Coordinates of neighbours of p in each direction. Set to p[i] when it would lead outside of the image.
| u | image |
| p | position |
| pp | coordinates of forward neighbours (change p[i] into pp[i] to get ith forward neighbour) |
| pm | coordinates of backward neighbours (change p[i] into pm[i] to get ith backward neighbour) |
| void Imagine::neighbourOffsets | ( | const Image< T, dim > & | u, |
| const Coords< dim > & | p, | ||
| FVector< size_t, dim > & | dp, | ||
| FVector< size_t, dim > & | dm | ||
| ) |
PDE schemes. Offsets to neighbours of p in each direction. Set to 0 when it would lead outside of the image. Warning: dm is positive, thus -dm should be applied to get backward neighbour.
| u | image |
| p | position |
| dp | offsets to forward neighbors (dp[i] for ith dim) |
| dm | offsets to backward neighbors (dm[i] for ith dim) |
| FVector<T,dim> Imagine::normal | ( | const Image< T, dim > & | u, |
| const Coords< dim > & | p | ||
| ) |
PDE schemes. Unit normal of iso level at p
| u | image |
| p | position |
| Image<Color,dim> Imagine::rainbow | ( | const Image< T, dim > & | I, |
| T | m, | ||
| T | M | ||
| ) |
Represents a scalar image by a rainbow scale (from RED to BLUE) for display purposes
| I | image to represent |
| m,M | extremal values (m (or less) will be RED, M (or more) will be BLUE) |
| Image<Color,dim> Imagine::rainbow | ( | const Image< T, dim > & | I | ) |
| Image<T,dim> Imagine::reduce | ( | const Image< T, dim > & | I, |
| int | fact | ||
| ) |
Reduces image by an integer factor. Each pixel is assigned with the mean of the corresponding original pixels.
| I | image to scale |
| fact | divider coefficient. |
| Image<T,dim> Imagine::reduce | ( | const Image< T, dim > & | I, |
| Coords< dim > | nd, | ||
| bool | keepRatio = false |
||
| ) |
Reduces image to given dimensions. Anti aliasing is performed. If ratio is kept, extra parts of the reduced image are filled with the max value of the original one.
| I | image to scale |
| nd | reduced dimensions. |
| keepRatio | keeps aspect ratio or not? |
|
inline |
|
inline |
Saves a grey (i.e octet) image to a file. Known formats are JPG, PNG, TIFF
| I | image to save |
| name | file name |
|
inline |
|
inline |
Saves a alpha color (i.e AlphaColor) image to a file. Known formats are JPG, PNG, TIFF, GIF
| I | image to save |
| name | file name |
| quality | Jpeg quality (between 0 and 100) |
|
inline |
Saves a color (i.e 3 chanels) image to a file. Known formats are JPG, PNG, TIFF
| IR,IG,IB | R,G,B chanels to save |
| name | file name |
| quality | Jpeg quality (between 0 and 100) |
|
inline |
Saves an image into an Analyze file (medical imaging) (extensions IMG and HDR)
| T0 | output type |
| TI | image type |
| I | image to save |
| name | file name |
Build header and data filenames and open files
| Image<T,dim> Imagine::scaleDown | ( | const Image< T, dim > & | I, |
| int | fact | ||
| ) |
Scales image down. Fast naive version with no anti-aliasing: each pixel is assigneg with the value of one corresponding pixel in the original image.
| I | image to scale |
| fact | down scaling factor. |
| Image<T,dim> Imagine::scaleUp | ( | const Image< T, dim > & | I, |
| int | fact | ||
| ) |
Scales image up. Fast naive version with no interpolation: each original pixel becomes a big constant one.
| I | image to scale |
| fact | up scaling factor. |
1.8.8