Xmipp
v3.23.11-Nereus
|
#include <psf_xr.h>
Public Types | |
enum | operMode { GENERATE_PSF, PSF_FROM_FILE } |
Public Member Functions | |
XRayPSF () | |
XRayPSF (const XRayPSF &)=delete | |
XRayPSF (const XRayPSF &&)=delete | |
XRayPSF & | operator= (const XRayPSF &)=delete |
XRayPSF & | operator= (const XRayPSF &&)=delete |
~XRayPSF () | |
void | init () |
void | clear () |
Clear. More... | |
void | readParams (XmippProgram *program) |
void | read (const FileName &fn, bool readVolume=true) |
void | write (const FileName &fn) |
void | show () |
Show the microscope parameters. More... | |
void | setFocalShift (double zShift) |
Add focal shift to previously read psf zshift. More... | |
void | calculateParams (double _dxo, double _dzo=-1, double threshold=0.) |
Produce Side information. More... | |
void | reducePSF2Slabs (double threshold) |
Calculate the width of the slabs to reduce computing time and the mean PSF for each. More... | |
void | applyOTF (MultidimArray< double > &Im, const double sliceOffset) const |
Apply the OTF to the image, by means of the convolution. More... | |
void | generateOTF (MultidimArray< std::complex< double > > &OTF, double Zpos) const |
Generate the Optical Transfer Function (OTF) for a slice according to Microscope and Im parameters. More... | |
void | generatePSF () |
Generate the 3D Point Spread Function (PSF) according to Microscope parameters. More... | |
void | adjustParam () |
Calculate if a resize of the X-Y plane is needed to avoid the Nyquist Limit. More... | |
void | adjustParam (MultidimArray< double > &Vol) |
Static Public Member Functions | |
static void | defineParams (XmippProgram *program) |
Public Attributes | |
operMode | mode |
PsfType | type |
Define the selected PSF generation algorithm. More... | |
ImageGeneric | psfGen |
Image< double > | psfVol |
3D PSF read from file More... | |
MultidimArray< double > | PSF |
Working PSF with nonlinear zdim whose slices are the mean PSF for slabs. More... | |
double | slabThr |
Threshold to separate The volume into slabs to use the same PSF. More... | |
std::vector< int > | slabIndex |
Z positions in the original PSF Volume to determine de slabs. More... | |
Matrix2D< double > | T |
MultidimArray< double > * | mask |
Lens shape Mask. More... | |
double | Rlens |
Lens Aperture Radius. More... | |
double | Zo |
Object plane on Focus (Reference) More... | |
double | Zi |
Object plane. More... | |
double | DoF |
Depth of focus. Only for information purposes. More... | |
size_t | Nox |
X size of the input image (object plane size) More... | |
size_t | Noy |
Y size of the input image (object plane size) More... | |
size_t | Noz |
Z size of the input image (object plane size) More... | |
double | dxiMax |
double | dxl |
Pixel size in X-dim in lens plane. More... | |
double | dyl |
Pixel size in Y-dim in lens plane. More... | |
double | deltaZMaxX |
Z limits around Zo in the psf generation due to Nyquist Limit. More... | |
double | deltaZMaxY |
double | deltaZMinX |
double | deltaZMinY |
PsfxrAdjust | AdjustType |
Parameters to change image size to avoid Nyquist limit. More... | |
double | pupileSizeMin |
Minimum diameter size of the microscope pupile in the lens plane, measured in pixels. More... | |
double | lambda |
Lambda of illumination. More... | |
double | Flens |
Focal length. More... | |
double | Nzp |
Number of zones in zone plate. More... | |
double | deltaR |
Outermost zone width. More... | |
double | Ms |
Magnification. More... | |
double | DeltaZo |
Z axis global shift. More... | |
double | dxo |
object space XY-plane sampling rate More... | |
double | dxi |
Image space XY-plane sampling rate. More... | |
double | dzo |
object space Z sampling rate More... | |
size_t | Nix |
Size of the image in image plane, to be rescaled if needed. More... | |
size_t | Niy |
double | dxoPSF |
object space XY-plane sampling rate of the PSF Volume More... | |
double | dzoPSF |
object space Z sampling rate of the PSF Volume More... | |
int | verbose |
Switch to control verbose mode. More... | |
int | nThr |
Protected Member Functions | |
void | generatePSFIdealLens (MultidimArray< double > &PSFi, double Zpos) const |
Generate the PSF for a single plane according to a ideal lens. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const XRayPSF &psf) |
Show. More... | |
X-ray PSF class. Here goes how to filter an image with the Point Spread Function of a X-ray microscope optics
enum XRayPSF::operMode |
Enumerator | |
---|---|
GENERATE_PSF | |
PSF_FROM_FILE |
Definition at line 108 of file psf_xr.h.
XRayPSF::XRayPSF | ( | ) |
Empty constructor.
Definition at line 33 of file psf_xr.cpp.
|
delete |
|
delete |
XRayPSF::~XRayPSF | ( | ) |
Definition at line 38 of file psf_xr.cpp.
void XRayPSF::adjustParam | ( | ) |
Calculate if a resize of the X-Y plane is needed to avoid the Nyquist Limit.
Lens Radius in pixels higher than image
For indices in standard fashion
Definition at line 673 of file psf_xr.cpp.
void XRayPSF::adjustParam | ( | MultidimArray< double > & | Vol | ) |
Definition at line 664 of file psf_xr.cpp.
void XRayPSF::applyOTF | ( | MultidimArray< double > & | Im, |
const double | sliceOffset | ||
) | const |
Apply the OTF to the image, by means of the convolution.
Definition at line 384 of file psf_xr.cpp.
void XRayPSF::calculateParams | ( | double | _dxo, |
double | _dzo = -1 , |
||
double | threshold = 0. |
||
) |
Produce Side information.
Calculation of the rest of microscope parameters
TODO: The scale in Z may not be necessary to save memory and should be used the nearest PSF slice for each Z plane
Definition at line 279 of file psf_xr.cpp.
void XRayPSF::clear | ( | ) |
|
static |
Definition at line 45 of file psf_xr.cpp.
void XRayPSF::generateOTF | ( | MultidimArray< std::complex< double > > & | OTF, |
double | Zpos | ||
) | const |
Generate the Optical Transfer Function (OTF) for a slice according to Microscope and Im parameters.
Definition at line 458 of file psf_xr.cpp.
void XRayPSF::generatePSF | ( | ) |
Generate the 3D Point Spread Function (PSF) according to Microscope parameters.
Definition at line 525 of file psf_xr.cpp.
|
protected |
Generate the PSF for a single plane according to a ideal lens.
Definition at line 581 of file psf_xr.cpp.
void XRayPSF::init | ( | ) |
Definition at line 250 of file psf_xr.cpp.
void XRayPSF::read | ( | const FileName & | fn, |
bool | readVolume = true |
||
) |
Read from file. An exception is thrown if the file cannot be open.
Definition at line 82 of file psf_xr.cpp.
void XRayPSF::readParams | ( | XmippProgram * | program | ) |
Definition at line 64 of file psf_xr.cpp.
void XRayPSF::reducePSF2Slabs | ( | double | threshold | ) |
Calculate the width of the slabs to reduce computing time and the mean PSF for each.
Definition at line 345 of file psf_xr.cpp.
void XRayPSF::setFocalShift | ( | double | zShift | ) |
void XRayPSF::show | ( | ) |
Show the microscope parameters.
Definition at line 244 of file psf_xr.cpp.
void XRayPSF::write | ( | const FileName & | fn | ) |
Write to file. An exception is thrown if the file cannot be open.
Definition at line 184 of file psf_xr.cpp.
|
friend |
PsfxrAdjust XRayPSF::AdjustType |
double XRayPSF::deltaZMaxX |
double XRayPSF::DoF |
double XRayPSF::dxoPSF |
double XRayPSF::dzoPSF |
MultidimArray<double>* XRayPSF::mask |
size_t XRayPSF::Nix |
size_t XRayPSF::Nox |
size_t XRayPSF::Noy |
size_t XRayPSF::Noz |
MultidimArray<double> XRayPSF::PSF |
ImageGeneric XRayPSF::psfGen |
double XRayPSF::pupileSizeMin |
std::vector<int> XRayPSF::slabIndex |
double XRayPSF::slabThr |
PsfType XRayPSF::type |
double XRayPSF::Zi |