Xmipp
v3.23.11-Nereus
|
#include <xmipp_image_base.h>
Classes | |
struct | EMHead |
struct | PIFDataHeader |
struct | PIFMainHeader |
struct | SPIDERhead |
struct | TIFFDirHead |
Public Member Functions | |
void | init () |
void | copy (const ImageBase &other) |
virtual void | clear ()=0 |
void | clearHeader () |
virtual bool | isComplexT () const =0 |
bool | isComplex () const |
virtual | ~ImageBase () |
bool | isImage (const FileName &name) |
bool | isMapped () |
bool | isRealImage (const FileName &name) |
bool | isComplexImage (const FileName &name) |
void | rename (const FileName &name) |
void | mapFile2Write (size_t Xdim, size_t Ydim, size_t Zdim, const FileName &_filename, bool createTempFile=false, size_t select_img=APPEND_IMAGE, bool isStack=false, int mode=WRITE_OVERWRITE) |
int | read (const FileName &name, DataMode datamode=DATA, size_t select_img=ALL_IMAGES, bool mapData=false, int mode=WRITE_READONLY) |
int | readBatch (const FileName &name, size_t start_img, size_t batch_size, DataMode datamode=DATA, bool mapData=false, int mode=WRITE_READONLY) |
int | readRange (const FileName &name, size_t start_img, size_t end_img, DataMode datamode=DATA, bool mapData=false, int mode=WRITE_READONLY) |
int | readApplyGeo (const FileName &name, const MDRow &row, const ApplyGeoParams ¶ms=DefaultApplyGeoParams) |
int | readApplyGeo (const FileName &name, const MetaData &md, size_t objId, const ApplyGeoParams ¶ms=DefaultApplyGeoParams) |
int | readApplyGeo (const MetaData &md, size_t objId, const ApplyGeoParams ¶ms=DefaultApplyGeoParams) |
void | applyGeo (const MetaData &md, size_t objId, const ApplyGeoParams ¶ms=DefaultApplyGeoParams) |
void | setGeo (const MDRow &row, size_t n=0) |
int | readMapped (const FileName &name, size_t select_img=ALL_IMAGES, int mode=WRITE_READONLY) |
int | readOrReadMapped (const FileName &name, size_t select_img=ALL_IMAGES, int mode=WRITE_READONLY) |
virtual int | readPreview (const FileName &name, size_t Xdim, size_t Ydim=0, int select_slice=CENTRAL_SLICE, size_t select_img=FIRST_IMAGE)=0 |
virtual void | getPreview (ImageBase *imgOut, size_t Xdim, size_t Ydim=0, int select_slice=CENTRAL_SLICE, size_t select_img=FIRST_IMAGE)=0 |
int | readOrReadPreview (const FileName &name, size_t Xdim, size_t Ydim, int select_slice=CENTRAL_SLICE, size_t select_img=FIRST_IMAGE, bool mapData=false) |
void | write (const FileName &name="", size_t select_img=ALL_IMAGES, bool isStack=false, int mode=WRITE_OVERWRITE, CastWriteMode castMode=CW_CAST, int _swapWrite=0) |
virtual void | movePointerTo (int select_slice=ALL_SLICES, size_t select_img=ALL_IMAGES)=0 |
virtual DataType | myT () const =0 |
virtual bool | checkMmapT (DataType datatype)=0 |
virtual void | writePageAsDatatype (FILE *fimg, DataType datatype, size_t datasize_n)=0 |
void | swapPage (char *page, size_t pageNrElements, DataType datatype, int swap=1) |
void | swapOnWrite () |
const FileName & | name () const |
void | getDimensions (size_t &Xdim, size_t &Ydim, size_t &Zdim, size_t &Ndim) const |
void | getDimensions (ArrayDim &aDim) |
ArrayDim | getDimensions () |
void | getInfo (ImageInfo &imgInfo) const |
void | getInfo (const FileName &name, ImageInfo &imgInfo) |
virtual size_t | getSize () const =0 |
void | getOffsetAndSwap (size_t &_offset, int &_swap) const |
int | getSwap () const |
MDRow & | getGeometry (const size_t n=0) |
void | initGeometry (const size_t n=0) |
bool | individualContainsLabel (MDLabel label) const |
bool | mainContainsLabel (MDLabel label) const |
double | rot (const size_t n=0) const |
double | tilt (const size_t n=0) const |
double | psi (const size_t n=0) const |
double | Xoff (const size_t n=0) const |
double | Yoff (const size_t n=0) const |
double | Zoff (const size_t n=0) const |
double | weight (const size_t n=0) const |
double | scale (const size_t n=0) const |
bool | flip (const size_t n=0) const |
DataType | datatype () const |
double | samplingRateX () const |
virtual void | setDimensions (int Xdim, int Ydim, int Zdim, size_t Ndim)=0 |
virtual void | setDimensions (ArrayDim &aDim) |
void | setADimFile (ArrayDim aDim) |
void | setName (const FileName &_filename) |
void | setDataMode (DataMode mode) |
void | setEulerAngles (double rot, double tilt, double psi, const size_t n=0) |
void | getEulerAngles (double &rot, double &tilt, double &psi, const size_t n=0) const |
void | setRot (double rot, const size_t n=0) |
void | setTilt (double tilt, const size_t n=0) |
void | setPsi (double psi, const size_t n=0) |
void | setShifts (double xoff, double yoff, double zoff=0., const size_t n=0) |
void | getShifts (double &xoff, double &yoff, double &zoff, const size_t n=0) const |
void | setXoff (double xoff, const size_t n=0) |
void | setYoff (double yoff, const size_t n=0) |
void | setZoff (double zoff, const size_t n=0) |
void | setScale (double scale, const size_t n=0) |
void | getScale (double &scale, const size_t n=0) |
void | setFlip (bool flip, const size_t n=0) |
void | setWeight (double weight, const size_t n=0) |
virtual void | getTransformationMatrix (Matrix2D< double > &A, bool only_apply_shifts=false, const size_t n=0)=0 |
virtual void | sumWithFile (const FileName &fn)=0 |
virtual void | mirrorY ()=0 |
virtual void | selfApplyGeometry (int SplineDegree, bool wrap, bool only_apply_shifts)=0 |
Public Attributes | |
MultidimArrayBase * | mdaBase |
std::vector< std::unique_ptr< MDRow > > | MD |
MDRowVec | MDMainHeader |
Protected Member Functions | |
int | readDM3 (size_t img_select, bool isStack=false) |
int | writeDM3 (size_t img_select, bool isStack=false, int mode=WRITE_OVERWRITE) |
int | readDM4 (size_t img_select, bool isStack=false) |
int | writeDM4 (size_t img_select, bool isStack=false, int mode=WRITE_OVERWRITE) |
int | readIMAGIC (size_t img_select) |
int | writeIMAGIC (size_t img_select=ALL_IMAGES, int mode=WRITE_OVERWRITE, const String &bitDepth="", CastWriteMode castMode=CW_CAST) |
int | readMRC (size_t select_img, bool isStack=false) |
int | readMRC (size_t start_img, size_t batch_size, bool isStack=false) |
int | writeMRC (size_t select_img, bool isStack=false, int mode=WRITE_OVERWRITE, const String &bitDepth="", CastWriteMode castMode=CW_CAST) |
int | readINF (size_t img_select, bool isStack=false) |
int | writeINF (size_t img_select, bool isStack=false, int mode=WRITE_OVERWRITE, String bitDepth="", CastWriteMode castMode=CW_CAST) |
DataType | datatypeRAW (String strDT) |
int | readRAW (size_t select_img, bool isStack=false) |
int | readSPIDER (size_t select_img) |
int | readSPIDER (size_t start_img, size_t batch_size) |
int | writeSPIDER (size_t select_img=ALL_IMAGES, bool isStack=false, int mode=WRITE_OVERWRITE) |
int | readSPE (size_t select_img, bool isStack=false) |
int | writeSPE (size_t select_img, bool isStack=false, int mode=WRITE_OVERWRITE) |
int | readTIA (int img_select, bool isStack=false) |
int | writeTIA (int img_select, bool isStack=false, int mode=WRITE_OVERWRITE) |
int | readJPEG (size_t select_img) |
int | writeJPEG (size_t select_img, bool isStack=false, int mode=WRITE_OVERWRITE, String bitDepth="", CastWriteMode castMode=CW_CONVERT) |
void | castTiffTile2T (size_t offset, char *tif_buf, unsigned int x, unsigned int y, unsigned int imageWidth, unsigned int imageLength, unsigned int tileWidth, unsigned int tileLength, unsigned short samplesPerPixel, DataType datatype) |
void | castTiffLine2T (size_t offset, char *tif_buf, unsigned int y, unsigned int imageWidth, unsigned int imageLength, unsigned short samplesPerPixel, DataType datatype) |
DataType | datatypeTIFF (TIFFDirHead dHead) |
int | readTIFF (size_t select_img, bool isStack=false) |
int | writeTIFF (size_t select_img, bool isStack=false, int mode=WRITE_OVERWRITE, String bitDepth="", CastWriteMode castMode=CW_CAST) |
int | readEM (size_t select_img, bool isStack=false) |
int | writeEM (size_t select_img=ALL_IMAGES, bool isStack=false, int mode=WRITE_OVERWRITE) |
int | readPIF (size_t select_img) |
int | writePIF (size_t select_img=ALL_IMAGES, bool isStack=false, int mode=WRITE_OVERWRITE) |
DataType | datatypeH5 (hid_t dataset) |
hid_t | H5Datatype (DataType datatype) |
int | readHDF5 (size_t select_img) |
int | writeHDF5 (size_t select_img, bool isStack=false, int mode=WRITE_OVERWRITE, String bitDepth="", CastWriteMode castMode=CW_CAST) |
int | readEER (size_t select_img) |
ImageFHandler * | openFile (const FileName &name, int mode=WRITE_READONLY) const |
More... | |
void | closeFile (ImageFHandler *hFile=NULL) const |
virtual void | applyGeo (const MDRow &row, bool only_apply_shifts=false, bool wrap=xmipp_transformation::WRAP)=0 |
int | _read (const FileName &name, ImageFHandler *hFile, DataMode datamode=DATA, size_t select_img=ALL_IMAGES, bool mapData=false) |
int | _readBatch (const FileName &name, ImageFHandler *hFile, size_t start_img, size_t batch_size, DataMode datamode=DATA, bool mapData=false) |
void | _write (const FileName &name, ImageFHandler *hFile, size_t select_img=ALL_IMAGES, bool isStack=false, int mode=WRITE_OVERWRITE, CastWriteMode castMode=CW_CAST) |
virtual void | readData (FILE *fimg, size_t select_img, DataType datatype, size_t pad)=0 |
virtual void | readData4bit (FILE *fimg, size_t select_img, DataType datatype, size_t pad)=0 |
virtual void | writeData (FILE *fimg, size_t offset, DataType wDType, size_t datasize_n, CastWriteMode castMode=CW_CAST)=0 |
virtual void | setPage2T (size_t offset, char *page, DataType datatype, size_t pageSize)=0 |
virtual void | getPageFromT (size_t offset, char *page, DataType datatype, size_t pageSize)=0 |
virtual void | getCastConvertPageFromT (size_t offset, char *page, DataType datatype, size_t pageSize, double min0, double max0, CastWriteMode castMode=CW_CONVERT) const =0 |
virtual void | mmapFile ()=0 |
virtual void | munmapFile ()=0 |
void | setDatatype (DataType datatype) |
Protected Attributes | |
FileName | filename |
FileName | tempFilename |
FileName | dataFName |
FILE * | fimg |
FILE * | fhed |
TIFF * | tif |
hid_t | fhdf5 |
ImageFHandler * | hFile |
ArrayDim | aDimFile |
DataMode | dataMode |
size_t | offset |
int | swap |
int | swapWrite |
std::array< int, 4 > | axisOrder |
TransformType | transform |
size_t | replaceNsize |
bool | _exists |
bool | mmapOnRead |
bool | mmapOnWrite |
int | mFd |
size_t | mappedSize |
size_t | mappedOffset |
size_t | virtualOffset |
Static Protected Attributes | |
static constexpr std::array< int, 4 > | defaultAxisOrder = {0,1,2,3} |
Friends | |
std::ostream & | operator<< (std::ostream &o, const ImageBase &I) |
Image base class.
Definition at line 238 of file xmipp_image_base.h.
|
virtual |
|
protected |
Internal read image file method.
Definition at line 792 of file xmipp_image_base.cpp.
|
protected |
Definition at line 894 of file xmipp_image_base.cpp.
|
protected |
Internal write image file method.
Datatype info must be from filename after "%" symbol
If we are going to changes all images, then swap of the file may be changed, otherwise, original swap remains.
Definition at line 950 of file xmipp_image_base.cpp.
void ImageBase::applyGeo | ( | const MetaData & | md, |
size_t | objId, | ||
const ApplyGeoParams & | params = DefaultApplyGeoParams |
||
) |
Apply geometry in referring metadata to the image
Definition at line 246 of file xmipp_image_base.cpp.
|
protectedpure virtual |
Internal apply geometrical transformations
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
|
pure virtual |
Check file Datatype is same as T type to use mmap.
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
|
pure virtual |
Clear. Initialize everything to 0
Implemented in ImageOver, Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
void ImageBase::clearHeader | ( | ) |
Clear the header of the image
Definition at line 109 of file xmipp_image_base.cpp.
|
protected |
Close file function. Close the image file according to its name and file handler.
Definition at line 707 of file xmipp_image_base.cpp.
void ImageBase::copy | ( | const ImageBase & | other | ) |
Copy. Copy ImageBase from other image
Definition at line 70 of file xmipp_image_base.cpp.
DataType ImageBase::datatype | ( | ) | const |
Get datatype info from MDMainHeader.
In theory, it must be the image file data type.
Data type
Definition at line 483 of file xmipp_image_base.cpp.
bool ImageBase::flip | ( | const size_t | n = 0 | ) | const |
Get Flip
Definition at line 470 of file xmipp_image_base.cpp.
|
protectedpure virtual |
void ImageBase::getDimensions | ( | size_t & | Xdim, |
size_t & | Ydim, | ||
size_t & | Zdim, | ||
size_t & | Ndim | ||
) | const |
Get dimensions of the multidimArray inside image. TODO: This method must be changed to return the size of the image read from file, i.e. aDimFile, and where this is used should be used the imageBase::mda->getDimensions instead.
Definition at line 544 of file xmipp_image_base.cpp.
|
inline |
|
inline |
Definition at line 517 of file xmipp_image_base.h.
void ImageBase::getEulerAngles | ( | double & | rot, |
double & | tilt, | ||
double & | psi, | ||
const size_t | n = 0 |
||
) | const |
Get Euler angles from image header
Definition at line 519 of file xmipp_image_base.cpp.
|
inline |
void ImageBase::getInfo | ( | ImageInfo & | imgInfo | ) | const |
Get basic information from already read image file
Get Image dimensions
Definition at line 554 of file xmipp_image_base.cpp.
Get basic information from image file
Definition at line 563 of file xmipp_image_base.cpp.
|
inline |
|
protectedpure virtual |
|
pure virtual |
Returns an image with a lower resolution as a preview image. If Zdim parameter is not passed, then all slices are rescaled. If Ydim is not passed, then Ydim is rescaled same factor as Xdim.
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
|
inline |
void ImageBase::getShifts | ( | double & | xoff, |
double & | yoff, | ||
double & | zoff, | ||
const size_t | n = 0 |
||
) | const |
|
pure virtual |
Get whole number of pixels
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
|
inline |
Get Image swap
Definition at line 544 of file xmipp_image_base.h.
|
pure virtual |
Get geometric transformation matrix from 2D-image header
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
|
inline |
Definition at line 562 of file xmipp_image_base.h.
void ImageBase::init | ( | void | ) |
Init. Initialize everything to 0
Definition at line 50 of file xmipp_image_base.cpp.
void ImageBase::initGeometry | ( | const size_t | n = 0 | ) |
Init geometry transformation with defaults values
Definition at line 39 of file xmipp_image_base.cpp.
|
inline |
Check whether image is complex based on transform
Definition at line 294 of file xmipp_image_base.h.
|
inline |
Is this file a complex image
Check whether a fourier-space (complex) image can be read
Definition at line 327 of file xmipp_image_base.h.
|
pure virtual |
Check whether image is complex based on T
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
bool ImageBase::isImage | ( | const FileName & | name | ) |
Is this file an image
Check whether a real-space image can be read
Definition at line 1107 of file xmipp_image_base.cpp.
|
inline |
|
inline |
Is this file a real-valued image
Check whether a real-space image can be read
Definition at line 318 of file xmipp_image_base.h.
|
inline |
Definition at line 568 of file xmipp_image_base.h.
void ImageBase::mapFile2Write | ( | size_t | Xdim, |
size_t | Ydim, | ||
size_t | Zdim, | ||
const FileName & | _filename, | ||
bool | createTempFile = false , |
||
size_t | select_img = APPEND_IMAGE , |
||
bool | isStack = false , |
||
int | mode = WRITE_OVERWRITE |
||
) |
Create a mapped image file
An image file, which name and format are given by filename, is created with the given size. Then the image is mapped to this file. The image object must be cleared prior to use this method.
New mapped file
If XMIPP_MMAP is not defined this function is supposed to create the empty file only
Definition at line 202 of file xmipp_image_base.cpp.
|
pure virtual |
flip multidim array around X axis
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
|
protectedpure virtual |
Mmap the Image class to an image file.
|
pure virtual |
It changes the behavior of the internal multidimarray so it points to a specific slice/image from a stack, volume or stack of volumes. No information is deallocated from memory, so it is also possible to repoint to the whole stack,volume... (passing select_slice = ALL_SLICES and selec_img = ALL_IMAGES).
The options for select_slice are:
The options for selec_img are:
If a specific slice number is selected, then a specific image from the stack must be also selected. Otherwise, FIRST_IMAGE is proposed.
If Image Object is read using readPreview method, movePointerTo only works when rescaling the image in X-Y plane only, but all slices must be read.
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
|
protectedpure virtual |
Munmap the image file.
|
pure virtual |
|
inline |
Get file name
Definition at line 500 of file xmipp_image_base.h.
|
protected |
Open file function Open the image file and returns its file hander.
Definition at line 572 of file xmipp_image_base.cpp.
double ImageBase::psi | ( | const size_t | n = 0 | ) | const |
Get Psi angle
Definition at line 391 of file xmipp_image_base.cpp.
int ImageBase::read | ( | const FileName & | name, |
DataMode | datamode = DATA , |
||
size_t | select_img = ALL_IMAGES , |
||
bool | mapData = false , |
||
int | mode = WRITE_READONLY |
||
) |
General read function you can read a single image from a single image file or a single image file from an stack, in the second case the select slide may come in the image name or in the select_img parameter file name takes precedence over select_img If ALL_IMAGES is given the whole object is read.
Parameter mapData allows to access to image mapped to disk instead of loaded into memory. In case the mapped image is intended to be modified the parameter mode must be WRITE_REPLACE.
This function cannot apply geometrical transformations.
General read function
Definition at line 119 of file xmipp_image_base.cpp.
int ImageBase::readApplyGeo | ( | const FileName & | name, |
const MDRow & | row, | ||
const ApplyGeoParams & | params = DefaultApplyGeoParams |
||
) |
General read function you can read a single image from a single image file or a single image file from an stack, in the second case the select slide may come in the image name or in the select_img parameter file name takes precedence over select_img If -1 is given the whole object is read
This function can apply geometrical transformations, but cannot map the image in disk
Definition at line 264 of file xmipp_image_base.cpp.
int ImageBase::readApplyGeo | ( | const FileName & | name, |
const MetaData & | md, | ||
size_t | objId, | ||
const ApplyGeoParams & | params = DefaultApplyGeoParams |
||
) |
Read an image from metadata, filename is provided
Definition at line 275 of file xmipp_image_base.cpp.
int ImageBase::readApplyGeo | ( | const MetaData & | md, |
size_t | objId, | ||
const ApplyGeoParams & | params = DefaultApplyGeoParams |
||
) |
Read an image from metadata, filename is taken from MDL_IMAGE
Definition at line 283 of file xmipp_image_base.cpp.
int ImageBase::readBatch | ( | const FileName & | name, |
size_t | start_img, | ||
size_t | batch_size, | ||
DataMode | datamode = DATA , |
||
bool | mapData = false , |
||
int | mode = WRITE_READONLY |
||
) |
Reads batch_size
images from a single image file starting from image with index start_img
. If batch_size == ALL_IMAGES, then all images starting from start_img
to last image are read.
Definition at line 131 of file xmipp_image_base.cpp.
|
protectedpure virtual |
Read the raw data
|
protectedpure virtual |
Read the raw data in MRC 4bit mode
|
protected |
Definition at line 569 of file rwEER.cpp.
|
protected |
Read image from EM file format
select_img | Index number of selected image |
Definition at line 33 of file rwEM.cpp.
|
protected |
Definition at line 34 of file rwJPEG.cpp.
int ImageBase::readMapped | ( | const FileName & | name, |
size_t | select_img = ALL_IMAGES , |
||
int | mode = WRITE_READONLY |
||
) |
Definition at line 156 of file xmipp_image_base.cpp.
|
protected |
Definition at line 132 of file rwMRC.cpp.
int ImageBase::readOrReadMapped | ( | const FileName & | name, |
size_t | select_img = ALL_IMAGES , |
||
int | mode = WRITE_READONLY |
||
) |
Definition at line 163 of file xmipp_image_base.cpp.
int ImageBase::readOrReadPreview | ( | const FileName & | name, |
size_t | Xdim, | ||
size_t | Ydim, | ||
int | select_slice = CENTRAL_SLICE , |
||
size_t | select_img = FIRST_IMAGE , |
||
bool | mapData = false |
||
) |
This function allows to read the original image or a preview of it also allowing to select either a specific image from the stack or a slice from a volume.
In the case of reading images in its real dimensions it is also possible to image map from file.
Definition at line 182 of file xmipp_image_base.cpp.
|
protected |
Read image from PIF file format
select_img | Index number of selected image |
Definition at line 33 of file rwPIF.cpp.
|
pure virtual |
int ImageBase::readRange | ( | const FileName & | name, |
size_t | start_img, | ||
size_t | end_img, | ||
DataMode | datamode = DATA , |
||
bool | mapData = false , |
||
int | mode = WRITE_READONLY |
||
) |
Reads range of images form a single image file starting from image with index start_img
and ending with image with index end_img
inclusive.
Definition at line 144 of file xmipp_image_base.cpp.
|
inline |
double ImageBase::rot | ( | const size_t | n = 0 | ) | const |
Get Rot angle
Definition at line 365 of file xmipp_image_base.cpp.
double ImageBase::samplingRateX | ( | ) | const |
Sampling RateX
Definition at line 500 of file xmipp_image_base.cpp.
double ImageBase::scale | ( | const size_t | n = 0 | ) | const |
Get Scale factor
Definition at line 456 of file xmipp_image_base.cpp.
|
pure virtual |
Internal apply geometrical transformations
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
|
inline |
Set the information of the original image dimensions
Definition at line 670 of file xmipp_image_base.h.
|
inline |
|
protected |
Set datatype info in MDMainHeader
Definition at line 490 of file xmipp_image_base.cpp.
|
pure virtual |
Set image dimensions
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
|
virtual |
Definition at line 44 of file xmipp_image_base.cpp.
void ImageBase::setEulerAngles | ( | double | rot, |
double | tilt, | ||
double | psi, | ||
const size_t | n = 0 |
||
) |
Set Euler angles in image header
Definition at line 509 of file xmipp_image_base.cpp.
|
inline |
void ImageBase::setGeo | ( | const MDRow & | row, |
size_t | n = 0 |
||
) |
Set geo. Copy the input geometry row into the image metadata row n.
Definition at line 252 of file xmipp_image_base.cpp.
|
inline |
|
protectedpure virtual |
|
inline |
Set Rotation angle to image
Definition at line 711 of file xmipp_image_base.h.
|
inline |
|
inline |
void ImageBase::setShifts | ( | double | xoff, |
double | yoff, | ||
double | zoff = 0. , |
||
const size_t | n = 0 |
||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Sum this object with other file and keep in this object
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
|
inline |
Definition at line 489 of file xmipp_image_base.h.
void ImageBase::swapPage | ( | char * | page, |
size_t | pageNrElements, | ||
DataType | datatype, | ||
int | swap = 1 |
||
) |
Swap an entire page input pointer char *
Definition at line 331 of file xmipp_image_base.cpp.
double ImageBase::tilt | ( | const size_t | n = 0 | ) | const |
Get Tilt angle
Definition at line 378 of file xmipp_image_base.cpp.
double ImageBase::weight | ( | const size_t | n = 0 | ) | const |
Get Weight
Definition at line 443 of file xmipp_image_base.cpp.
void ImageBase::write | ( | const FileName & | name = "" , |
size_t | select_img = ALL_IMAGES , |
||
bool | isStack = false , |
||
int | mode = WRITE_OVERWRITE , |
||
CastWriteMode | castMode = CW_CAST , |
||
int | _swapWrite = 0 |
||
) |
General write function select_img= which slice should I replace overwrite = 0, append slice overwrite = 1 overwrite slice
Definition at line 292 of file xmipp_image_base.cpp.
|
protectedpure virtual |
Write the raw date after a data type casting.
|
protected |
|
protected |
Definition at line 130 of file rwJPEG.cpp.
|
pure virtual |
Write an entire page as datatype
A page of datasize_n elements T is cast to datatype and written to fimg The memory for the casted page is allocated and freed internally.
Implemented in Image< T >, Image< double >, Image< float >, Image< int >, Image< unsigned int >, Image< short int >, Image< unsigned char >, Image< char >, and Image< unsigned short int >.
|
protected |
double ImageBase::Xoff | ( | const size_t | n = 0 | ) | const |
Get Xoff
Definition at line 404 of file xmipp_image_base.cpp.
double ImageBase::Yoff | ( | const size_t | n = 0 | ) | const |
Get Yoff
Definition at line 417 of file xmipp_image_base.cpp.
double ImageBase::Zoff | ( | const size_t | n = 0 | ) | const |
Get Zoff
Definition at line 430 of file xmipp_image_base.cpp.
|
friend |
Show ImageBase
Show image properties
Definition at line 1121 of file xmipp_image_base.cpp.
|
protected |
Definition at line 263 of file xmipp_image_base.h.
|
protected |
Definition at line 255 of file xmipp_image_base.h.
|
protected |
Definition at line 260 of file xmipp_image_base.h.
|
protected |
Definition at line 249 of file xmipp_image_base.h.
|
protected |
Definition at line 256 of file xmipp_image_base.h.
|
staticprotected |
Definition at line 271 of file xmipp_image_base.h.
|
protected |
Definition at line 253 of file xmipp_image_base.h.
|
protected |
Definition at line 251 of file xmipp_image_base.h.
|
protected |
Definition at line 247 of file xmipp_image_base.h.
|
protected |
Definition at line 250 of file xmipp_image_base.h.
|
protected |
Definition at line 254 of file xmipp_image_base.h.
|
protected |
Definition at line 268 of file xmipp_image_base.h.
|
protected |
Definition at line 267 of file xmipp_image_base.h.
std::vector<std::unique_ptr<MDRow> > ImageBase::MD |
Definition at line 242 of file xmipp_image_base.h.
MultidimArrayBase* ImageBase::mdaBase |
Definition at line 241 of file xmipp_image_base.h.
MDRowVec ImageBase::MDMainHeader |
Definition at line 244 of file xmipp_image_base.h.
|
protected |
Definition at line 266 of file xmipp_image_base.h.
|
protected |
Definition at line 264 of file xmipp_image_base.h.
|
protected |
Definition at line 265 of file xmipp_image_base.h.
|
protected |
Definition at line 257 of file xmipp_image_base.h.
|
protected |
Definition at line 262 of file xmipp_image_base.h.
|
protected |
Definition at line 258 of file xmipp_image_base.h.
|
protected |
Definition at line 259 of file xmipp_image_base.h.
|
protected |
Definition at line 248 of file xmipp_image_base.h.
|
protected |
Definition at line 252 of file xmipp_image_base.h.
|
protected |
Definition at line 261 of file xmipp_image_base.h.
|
protected |
Definition at line 269 of file xmipp_image_base.h.