![]() |
Bsoft 2.1.4
Bernard's software package
|
Header file for combining two images in various ways. More...
#include "rwimg.h"
Functions | |
Bimage * | img_add (Bstring *file_list, int flags) |
Adds multiple images together with optional variance or standard deviation. More... | |
Bimage * | img_setup_combined (Bstring *file_list, long &nimg, int cat=0) |
Sets up a list of images for concatenation or summation. More... | |
Bimage * | img_catenate (Bstring *file_list, Bstring &rawstring, DataType newdatatype, Vector3< long > nusize, int setZslices=0, int fill_type=0, double fill=0, double newavg=0, double newstd=0) |
Catenates a list of images into a multi-image structure. More... | |
Bimage * | img_add_weighed (Bstring *file_list, vector< double > weight, double newavg=0, double newstd=0, int flags=0) |
Adds multiple images together with given weights. More... | |
Header file for combining two images in various ways.
Adds multiple images together with optional variance or standard deviation.
*file_list | list of file names. |
flags | flags to modify summation. |
Images are read from a number files and added. All the images must be the same size, but could have different numbers of sub-images. The flags that can set are: 1 calculate the average in stead of the sum. 2 calculate the variance as FOM 4 calculate the standard deviation as FOM (supercedes the variance) All images are converted to floating point.
Bimage * img_add_weighed | ( | Bstring * | file_list, |
vector< double > | weight, | ||
double | newavg, | ||
double | newstd, | ||
int | flags | ||
) |
Adds multiple images together with given weights.
*file_list | list of file names. |
weight | list of weights (can be NULL). |
newavg | new average for rescaling. |
newstd | new standard deviation for rescaling. |
flags | flags to modify summation. |
Images are read from a number files and added to each other, using the given weights to determine each contribution. The images are rescaled to a new average and standard deviation before weighted addition. If the given standard deviation is zero or less, this step is omitted. The weighed average is calculated and returned as a new image. The flags that can set are: 1 calculate the average in stead of the sum. 2 calculate the variance as FOM 4 calculate the standard deviation as FOM (supercedes the variance) 8 center each image before summation All images are converted to floating point.
Bimage * img_catenate | ( | Bstring * | file_list, |
Bstring & | rawstring, | ||
DataType | nudatatype, | ||
Vector3< long > | nusize, | ||
int | setZslices, | ||
int | fill_type, | ||
double | fill, | ||
double | newavg, | ||
double | newstd | ||
) |
Catenates a list of images into a multi-image structure.
*file_list | list of file names. |
&rawstring | format for re-interpretation of file. |
nudatatype | new data type (default from first image). |
nusize | new size (default from images). |
setZslices | flag to create 2D images from slices. |
fill_type | fill type for expanding images. |
fill | fill value for expanding images. |
newavg | new average to set each individual image. |
newstd | new standard deviation to set each individual image. |
The images can have different numbers of sub-images, sizes and data types.
Sets up a list of images for concatenation or summation.
*file_list | list of file names. |
&nimg | number of concatenated images. |
cat | flag to indicate concatenation. |
The images can have different numbers of sub-images, sizes and data types.