32#include <DGtal/base/Common.h>
33#include "DGtal/io/readers/GenericReader.h"
34#include "DGtal/io/writers/GenericWriter.h"
36#include <DGtal/helpers/StdDefs.h>
37#include <DGtal/images/ImageContainerBySTLVector.h>
38#include <DGtal/images/ConstImageAdapter.h>
41#include "DGtal/kernel/BasicPointFunctors.h"
49int main(
int argc,
char ** argv)
57 trace.
error() <<
"You need to indicate the volumetric image name and slice number as parameters." << std::endl;
61 std::string filename(argv[1]);
62 std::string outputFileName =
"sliceImage.pgm";
64 unsigned int numSlice = atoi(argv[2]);
74 Z2i::Domain domain2D(proj(image3d.domain().lowerBound()),
75 proj(image3d.domain().upperBound()));
78 aSliceFunctor.initAddOneDim(2);
79 SliceImageAdapter sliceImageZ(image3d, domain2D, aSliceFunctor,
id);
84 sliceImageZ >> outputFileName;
Aim: implements a const image adapter with a given domain (i.e. a subdomain) and 2 functors : g for d...
void beginBlock(const std::string &keyword="")
DGtal is the top-level namespace which contains all DGtal functions and types.
static TContainer import(const std::string &filename, std::vector< unsigned int > dimSpace=std::vector< unsigned int >())
Aim: Define a simple default functor that just returns its argument.
Aim: Functor that maps a point P of dimension i to a point Q of dimension j. The member myDims is an ...