EleFits  5.3.0
A modern C++ API on top of CFITSIO
Loading...
Searching...
No Matches
Public Member Functions | Related Functions | List of all members
FileMemRegions< n > Class Template Reference

#include <FileMemRegions.h>

Detailed Description

template<long n = 2>
class Euclid::Fits::FileMemRegions< n >

Mapping between an in-file (FITS image data unit) region and an in-memory (raster) region for reading and writing image regions.

In-file and in-memory regions have the same shape. Both back positions cannot be -1 at the same index at the same time.

Public Member Functions

 FileMemRegions (const Position< n > &filePosition, const Region< n > &memoryRegion=Region< n >::whole())
 Create a mapping from an in-file position and an in-memory region. More...
 
 FileMemRegions (const Region< n > &fileRegion, const Position< n > &memoryPosition=Position< n >::zero())
 Create a mapping from an in-file region and an in-memory position. More...
 
const Region< n > & file () const
 Get the in-file region.
 
Position< n > fileToMemory () const
 Compute the translation vector from in-file region to in-memory region.
 
const Region< n > & memory () const
 Get the in-memory region.
 
Position< n > memoryToFile () const
 Compute the translation vector from in-memory region to in-file region.
 
void resolve (const Position< n > &fileBack, const Position< n > &memoryBack)
 Resolve the unknown (-1) indices, given known in-file and in-memory back positions.
 

Related Functions

(Note that these are not member functions.)

template<long n>
FileMemRegions< n > makeMemRegion (const Position< n > &memoryPosition)
 Create a FileMemRegions with whole in-file region.
 
template<long n>
FileMemRegions< n > makeMemRegion (const Region< n > &memoryRegion)
 Create a FileMemRegions with in-file position at origin.
 

The documentation for this class was generated from the following file: