Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

EMAN::FourierPlaneReconstructor Class Reference
[a function or class that is CUDA enabled]

Fourier space 3D reconstruction The Fourier reconstructor is designed to work in an iterative fashion, where similarity ("quality") metrics are used to determine if a slice should be inserted into the 3D in each subsequent iteration. More...

#include <reconstructor.h>

Inheritance diagram for EMAN::FourierPlaneReconstructor:

Inheritance graph
[legend]
Collaboration diagram for EMAN::FourierPlaneReconstructor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FourierPlaneReconstructor ()
 Default constructor calls load_default_settings().
virtual ~FourierPlaneReconstructor ()
 Deconstructor calls free_memory().
virtual void setup ()
 Setup the Fourier reconstructor.
virtual void setup_seed (EMData *seed, float seed_weight)
 Initialize the reconstructor with a seed volume.
virtual EMDatapreprocess_slice (const EMData *const slice, const Transform &t=Transform())
 Preprocess the slice prior to insertion into the 3D volume this Fourier tranforms the slice and make sure all the pixels are in the right position it always returns a copy of the provided slice, so it should be deleted by someone eventually.
virtual int insert_slice (const EMData *const slice, const Transform &euler, const float weight=1.0)
 Insert a slice into a 3D volume, in a given orientation.
virtual int determine_slice_agreement (EMData *slice, const Transform &euler, const float weight=1.0, bool sub=true)
 Compares a slice to the current reconstruction volume and computes a normalization factor and quality.
virtual EMDatafinish (bool doift=true)
 Get the reconstructed volume Normally will return the volume in real-space with the requested size.
virtual void clear ()
 clear the volume and tmp_data for use in Monte Carlo reconstructions
virtual string get_name () const
 Get the unique name of the reconstructor.
virtual string get_desc () const
 Get the one line description of the reconstructor.
virtual TypeDict get_param_types () const
 Get the parameter types of this object.

Static Public Member Functions

ReconstructorNEW ()
 Factory incorporation uses the pointer of this function.

Static Public Attributes

const string NAME = "fourier_plane"

Protected Member Functions

virtual void load_default_settings ()
 Load default settings.
virtual void free_memory ()
 Frees the memory owned by this object (but not parent objects) Deletes the FourierPixelInserter3D pointer.
virtual void load_inserter ()
 Load the pixel inserter based on the information in params.
virtual void do_insert_slice_work (const EMData *const input_slice, const Transform &euler, const float weight)
 A function to perform the nuts and bolts of inserting an image slice.
virtual void do_compare_slice_work (EMData *input_slice, const Transform &euler, float weight)
 A function to perform the nuts and bolts of comparing an image slice.
virtual bool pixel_at (const float &xx, const float &yy, const float &zz, float *dt)
 This is a mode-2 pixel extractor.

Protected Attributes

FourierPixelInserter3Dinserter
 A pixel inserter pointer which inserts pixels into the 3D volume using one of a variety of insertion methods.

Private Member Functions

 FourierPlaneReconstructor (const FourierPlaneReconstructor &that)
 Disallow copy construction.
FourierPlaneReconstructoroperator= (const FourierPlaneReconstructor &)
 Disallow assignment.

Detailed Description

Fourier space 3D reconstruction The Fourier reconstructor is designed to work in an iterative fashion, where similarity ("quality") metrics are used to determine if a slice should be inserted into the 3D in each subsequent iteration.

The client creates a Fourier reconstructor to insert real images into a 3D volume. The return image is a real space image

This reconstructor is based on EMAN1's Fourier reconstructor with a handful of modifications including 1. - Fourier ring correlation (FRC) as opposed to the mean phase residual is used to estimate slice quality. The FRC of the slice in the 3D volume is determined - but the slice is removed from the 3D volume before doing this so the score reflects the extent to which the slice agrees with the contribution of the other slices in the 3D volume. The FRC is converted to SNR using the relationship described by Penczek ( Three-dimensional spectral signal to noise ratio for a class of reconstruction algorithms, JSB 2002 138 (24-46) ) FRC = S/(sqrt(S+N1)sqrt(S+N2)) Where N1 is the noise in the slice of the 3D volume and N2 is the noise in the image slice being inserted. We make the assumption that the noise in the 3D volume is 0 (N1=0) to get FRC^2 = SNR/(1+SNR) which gives a spectral SNR plot - we then divide each SNR value by the number of particles in the class average (seeing as SNR should scale linearly with the number of particles) to get the estimated SNR per contributing particle in this class average. If the particles that have been averaged are not homogenous this score should be low etc. The scaled SNR curve is then converted back to a FRC curve and integrated. This integral is the similarity metric, and depends on how far information extends to in Fourier space - typical values range from 0.05 to 0.2, but can vary substantially depending on the data.

2 - Uses half of the memory used by EMAN1's equivalent reconstruction algorithm

Definition at line 702 of file reconstructor.h.


Constructor & Destructor Documentation

EMAN::FourierPlaneReconstructor::FourierPlaneReconstructor  )  [inline]
 

Default constructor calls load_default_settings().

Definition at line 708 of file reconstructor.h.

00708 { load_default_settings(); }

virtual EMAN::FourierPlaneReconstructor::~FourierPlaneReconstructor  )  [inline, virtual]
 

Deconstructor calls free_memory().

Definition at line 713 of file reconstructor.h.

References free_memory().

00713 { free_memory(); }

EMAN::FourierPlaneReconstructor::FourierPlaneReconstructor const FourierPlaneReconstructor that  )  [private]
 

Disallow copy construction.


Member Function Documentation

void FourierPlaneReconstructor::clear  )  [virtual]
 

clear the volume and tmp_data for use in Monte Carlo reconstructions

Reimplemented from EMAN::Reconstructor.

Definition at line 333 of file reconstructor.cpp.

00333 {}

int FourierPlaneReconstructor::determine_slice_agreement EMData slice,
const Transform euler,
const float  weight = 1.0,
bool  sub = true
[virtual]
 

Compares a slice to the current reconstruction volume and computes a normalization factor and quality.

Normalization and quality are returned via attributes set in the passed slice. You may freely mix calls to determine_slice_agreement with calls to insert_slice, but note that determine_slice_agreement can only use information from slices that have already been inserted. Attributes set in the slice are: reconstruct_norm the relative normalization factor which should be applied before inserting the slice reconstruct_qual a scaled quality factor (larger better) for this slice as compared to the existing reconstruction reconstruct_absqual the absolute (not scaled based on weight) quality factor comparing this slice to the existing reconstruction reconstruct_weight the summed weights from all voxels intersecting with the inserted slice, larger -> more overlap with other slices

Parameters:
input_slice The EMData slice to be compared
euler The orientation of the slice as a Transform object
weight A weighting factor for this slice, generally the number of particles in a class-average. May be ignored by some reconstructors
sub Flag indicating whether to subtract the slice from the volume before comparing. May be ignored by some reconstructors
Returns:
0 if OK. 1 if error.
Exceptions:
NullPointerException if the input EMData pointer is null
ImageFormatException if the image is complex as opposed to real

Reimplemented from EMAN::Reconstructor.

Definition at line 337 of file reconstructor.cpp.

00337 { return 0; }

void FourierPlaneReconstructor::do_compare_slice_work EMData input_slice,
const Transform euler,
float  weight
[protected, virtual]
 

A function to perform the nuts and bolts of comparing an image slice.

Parameters:
input_slice the slice to insert into the 3D volume
euler a transform storing the slice euler angle

Definition at line 338 of file reconstructor.cpp.

00338 {}

void FourierPlaneReconstructor::do_insert_slice_work const EMData *const   input_slice,
const Transform euler,
const float  weight
[protected, virtual]
 

A function to perform the nuts and bolts of inserting an image slice.

Parameters:
input_slice the slice to insert into the 3D volume
euler a transform storing the slice euler angle
weight weighting factor for this slice (usually number of particles in a class-average)

Definition at line 336 of file reconstructor.cpp.

00336 {}

EMData * FourierPlaneReconstructor::finish bool  doift = true  )  [virtual]
 

Get the reconstructed volume Normally will return the volume in real-space with the requested size.

The calling application is responsible for removing any padding.

Parameters:
doift A flag indicating whether the returned object should be guaranteed to be in real-space (true) or should be left in whatever space the reconstructor generated
Returns:
The real space reconstructed volume

Reimplemented from EMAN::Reconstructor.

Definition at line 340 of file reconstructor.cpp.

00340 { return NULL; }

void FourierPlaneReconstructor::free_memory  )  [protected, virtual]
 

Frees the memory owned by this object (but not parent objects) Deletes the FourierPixelInserter3D pointer.

Reimplemented from EMAN::ReconstructorVolumeData.

Definition at line 329 of file reconstructor.cpp.

00329 {}

virtual string EMAN::FourierPlaneReconstructor::get_desc  )  const [inline, virtual]
 

Get the one line description of the reconstructor.

Implements EMAN::FactoryBase.

Definition at line 791 of file reconstructor.h.

00792                 {
00793                         return "Reconstruction via direct Fourier methods using one of a variety of different kernels, most of which are Gaussian based";
00794                 }

virtual string EMAN::FourierPlaneReconstructor::get_name  )  const [inline, virtual]
 

Get the unique name of the reconstructor.

Implements EMAN::FactoryBase.

Definition at line 784 of file reconstructor.h.

00785                 {
00786                         return NAME;
00787                 }

virtual TypeDict EMAN::FourierPlaneReconstructor::get_param_types  )  const [inline, virtual]
 

Get the parameter types of this object.

Returns:
a TypeDict detailing all of the acceptable (and necessary) parameters

Implements EMAN::FactoryBase.

Definition at line 807 of file reconstructor.h.

References EMAN::TypeDict::put().

00808                 {
00809                         TypeDict d;
00810                         d.put("size", EMObject::INTARRAY, "Required. The dimensions of the real-space output volume, including any padding (must be handled by the calling application). Assumed that apix x/y/z identical.");
00811                         d.put("sym", EMObject::STRING, "Optional. The symmetry of the reconstructed volume, c?, d?, oct, tet, icos, h?. Default is c1, ie - an asymmetric object");
00812                         d.put("mode", EMObject::STRING, "Optional. Fourier pixel insertion mode name (nearest_neighbor, gauss_2, gauss_3, gauss_5, gauss_5_slow, gypergeom_5, experimental) gauss_2 is the default.");
00813                         d.put("sqrtnorm", EMObject::BOOL, "Optional. When normalizing, additionally divides by the sqrt of the normalization factor to damp exaggerated features. Is this justifyable ? No idea (yet). Default is false.");
00814                         d.put("verbose", EMObject::BOOL, "Optional. Toggles writing useful information to standard out. Default is false.");
00815                         d.put("quiet", EMObject::BOOL, "Optional. If false, print verbose information.");
00816                         return d;
00817                 }

int FourierPlaneReconstructor::insert_slice const EMData *const   slice,
const Transform euler,
const float  weight = 1.0
[virtual]
 

Insert a slice into a 3D volume, in a given orientation.

Returns:
0 if successful, 1 otherwise
Parameters:
slice the image slice to be inserted into the 3D volume
euler Euler angle of this image slice.
weight A weighting factor for this slice, generally the number of particles in a class-average. May be ignored by some reconstructors
Returns:
0 if OK. 1 if error.
Exceptions:
NullPointerException if the input EMData pointer is null
ImageFormatException if the image is complex as opposed to real

Reimplemented from EMAN::Reconstructor.

Definition at line 335 of file reconstructor.cpp.

00335 { return 0; }

void FourierPlaneReconstructor::load_default_settings  )  [protected, virtual]
 

Load default settings.

Definition at line 328 of file reconstructor.cpp.

00328 {}

void FourierPlaneReconstructor::load_inserter  )  [protected, virtual]
 

Load the pixel inserter based on the information in params.

Definition at line 330 of file reconstructor.cpp.

00330 {}

Reconstructor* EMAN::FourierPlaneReconstructor::NEW  )  [inline, static]
 

Factory incorporation uses the pointer of this function.

Returns:
a Reconstructor pointer to a newly allocated FourierReconstructor

Definition at line 799 of file reconstructor.h.

00800                 {
00801                         return new FourierPlaneReconstructor();
00802                 }

FourierPlaneReconstructor& EMAN::FourierPlaneReconstructor::operator= const FourierPlaneReconstructor  )  [private]
 

Disallow assignment.

bool FourierPlaneReconstructor::pixel_at const float &  xx,
const float &  yy,
const float &  zz,
float *  dt
[protected, virtual]
 

This is a mode-2 pixel extractor.

Parameters:
xx,yy,zz voxel coordinates (need not be integers)
dt float pointer with 3 floats allocated for returned complex value and weight sum

Definition at line 339 of file reconstructor.cpp.

00339 { return false; }

EMData * FourierPlaneReconstructor::preprocess_slice const EMData *const   slice,
const Transform t = Transform()
[virtual]
 

Preprocess the slice prior to insertion into the 3D volume this Fourier tranforms the slice and make sure all the pixels are in the right position it always returns a copy of the provided slice, so it should be deleted by someone eventually.

Returns:
the processed slice
Parameters:
slice the slice to be prepocessed
t transform to be used for insertion
Exceptions:
InvalidValueException when the specified padding value is less than the size of the images

Reimplemented from EMAN::Reconstructor.

Definition at line 334 of file reconstructor.cpp.

00334 { return NULL; }

void FourierPlaneReconstructor::setup  )  [virtual]
 

Setup the Fourier reconstructor.

Exceptions:
InvalidValueException When one of the input parameters is invalid

Implements EMAN::Reconstructor.

Definition at line 331 of file reconstructor.cpp.

00331 {}

void FourierPlaneReconstructor::setup_seed EMData seed,
float  seed_weight
[virtual]
 

Initialize the reconstructor with a seed volume.

This can be used to provide some 'default' value when there is missing data in Fourier space. The passed 'seed' must be of the appropriate padded size, must be in Fourier space, and the same EMData* object will be returned by finish(), meaning the Reconstructor is implicitly taking ownership of the object. However, in Python, this means the seed may be passed in without copying, as the same EMData will be coming back out at the end. The seed_weight determines how 'strong' the seed volume should be as compared to other inserted slices in Fourier space.

Exceptions:
InvalidValueException When one of the input parameters is invalid

Reimplemented from EMAN::Reconstructor.

Definition at line 332 of file reconstructor.cpp.

00332 {}


Member Data Documentation

FourierPixelInserter3D* EMAN::FourierPlaneReconstructor::inserter [protected]
 

A pixel inserter pointer which inserts pixels into the 3D volume using one of a variety of insertion methods.

Definition at line 855 of file reconstructor.h.

const string FourierPlaneReconstructor::NAME = "fourier_plane" [static]
 

Definition at line 78 of file reconstructor.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 11 13:42:55 2013 for EMAN2 by  doxygen 1.3.9.1