EleFits
4.0.1
A modern C++ API on top of CFitsIO
|
◆ writeRegion()
template<typename T , long m, long n>
Write a
In-file and in-memory (raster) regions are specified as the first parameter. Max bounds (-1) can be used in one, several, or all axes. Shortcuts offered by // Write the whole raster at position (10, 20, 30)
du.writeRegion<3>({ 10, 20, 30 }, raster);
// Write the whole HDU with a region of the raster starting at (10, 20, 30)
du.writeRegion<3>({ Region<3>::whole(), { 10, 20, 30 } }, raster);
Note that the raster dimension can be lower than the HDU dimension. For example, it is possible to write a 2D raster in a 3D HDU. // Write the 3rd plane of raster into the 5th plane of the HDU
du.writeRegion<3>({ { 0, 0, 4 } }, raster.section(2));
|