arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

nrroUtil.h File Reference

#include "nrro.h"
#include "nrroKernel.h"

Go to the source code of this file.

Functions

NrroSP reshapeNrroImageA (const NrroSP n, const gutz::vec2i size, const gutz::vec2f minPos=gutz::vec2f_zero, const gutz::vec2f maxPos=gutz::vec2f_one, const NrroKernel &k=CatmulRomKernel)
 this one respects the aspect ratio (as described above)

template<class T> void nrroSet (NrroSP n, const T *vvec)
 Set a multi-channel nrro to some vector of values, the types should match but they dont have to! The vectors lenght should be at least the size of the nrroSp's dim(0).

template<class NT, class VT> void nrroSet (Nrro::NrroIter< NT > ni, const VT *v)
 use this if you have the iterator already


Function Documentation

template<class NT, class VT>
void nrroSet Nrro::NrroIter< NT >  ni,
const VT *  v
 

use this if you have the iterator already

Referenced by TFImage::clear().

template<class T>
void nrroSet NrroSP  n,
const T *  vvec
 

Set a multi-channel nrro to some vector of values, the types should match but they dont have to! The vectors lenght should be at least the size of the nrroSp's dim(0).

NrroSP reshapeNrroImageA const NrroSP  nin,
const vec2i  size,
const vec2f  minPos,
const vec2f  maxPos,
const NrroKernel k
 

this one respects the aspect ratio (as described above)

gota be reasonable here....

x > y

y > x

crop and padd the image to the right size, relatively speaking

resample to the actual right size

inverse Aspect ratio of image, remember that 1 is the relative size of the largest spatial axis.

Parameters:
size  size of image you want back
minPos  size of image you want back
maxPos  [0-1] min pos, relative to greatest axis
k  [0-1] max pos, relative to greatest axis

Definition at line 28 of file nrroUtil.cpp.

References Nrro::IMAGE, gutz::SmartPtr< Nrro >::isNull(), n, NrroSP, size, gutz::vec2f, and gutz::vec2f_one.

Referenced by SlicerWidget::setSlice().


Send questions, comments, and bug reports to:
jmk