STIR
6.2.0
|
This program computes the centre of gravity in each plane and writes its coordinates to file, together with a weight for each plane. More...
#include "stir/DiscretisedDensity.h"
#include "stir/VoxelsOnCartesianGrid.h"
#include "stir/shared_ptr.h"
#include "stir/CartesianCoordinate3D.h"
#include "stir/CartesianCoordinate2D.h"
#include "stir/warning.h"
#include "stir/centre_of_gravity.h"
#include <iostream>
#include <iomanip>
#include <numeric>
#include <fstream>
#include <algorithm>
#include <string>
Functions | |
int | main (int argc, char *argv[]) |
This program computes the centre of gravity in each plane and writes its coordinates to file, together with a weight for each plane.
output_filename_prefix.x
and output_filename_prefix.y
. Each will contain a list of all z coordinates (in mm), then all x/y coordinates (in mm), then all weights.The weight is currently simply the sum of the voxel values in that plane, thresholded to be at least 0. If the weight is 0, the x,y coordinates are simply set to 0.
All coordinates are in mm and in the standard STIR coordinate system, except that the origin in z is shifted to the centre of the planes.