CASToR
2.0
Tomographic Reconstruction (PET/SPECT/CT)
|
This class is designed to manage and store system matrix elements associated to a vEvent. More...
#include <oProjectionLine.hh>
Public Member Functions | |
oProjectionLine () | |
The constructor of oProjectionLine. More... | |
~oProjectionLine () | |
The destructor of oProjectionLine. More... | |
int | CheckParameters () |
A function used to check the parameters settings. More... | |
int | Initialize () |
A function used to initialize a bunch of stuff after parameters have been checked. More... | |
void | ComputeLineLength () |
Simply compute and update the m_length using the associated mp_position1 and mp_position2. More... | |
bool | NotEmptyLine () |
This function is used to know if the line contains any voxel contribution. More... | |
void | Reset () |
Reset length and all the voxel indices and weights tabs. More... | |
void | ApplyOffset () |
Apply the offset of oImageDimensionsAndQuantification to the mp_position1 and mp_position2. More... | |
void | ApplyBedOffset () |
Apply the bed offset of m_bedOffset to the mp_position1 and mp_position2. More... | |
INTNB | GetVoxelIndex (int a_direction, int a_TOFBin, INTNB a_voxelInLine) |
This function is used to get the contributing voxel index of the provided direction, TOF bin and voxel rank. More... | |
void | AddVoxelInTOFBin (int a_direction, int a_TOFBin, INTNB a_voxelIndice, FLTNB a_voxelWeight) |
This function is used to add a voxel contribution to the line and provided TOF bin. More... | |
void | AddVoxelAllTOFBins (int a_direction, INTNB a_voxelIndex, FLTNB a_voxelWeight, HPFLTNB *a_tofWeights, INTNB a_tofBinFirst, INTNB a_tofBinLast) |
Add a voxel contribution to the line for all relevant TOF bins. More... | |
void | AddVoxel (int a_direction, INTNB a_voxelIndice, FLTNB a_voxelWeight) |
This function is used to add a voxel contribution to the line, assuming TOF bin 0 (i.e. no TOF). More... | |
FLTNB | ForwardProject (FLTNB *ap_image=NULL) |
Simply forward projects the provided image if not null, or else 1, for the current TOF bin. More... | |
FLTNB | ForwardProjectWithSPECTAttenuation (FLTNB *ap_attenuation, FLTNB *ap_image=NULL) |
Forward projects the provided image for the current TOF bin with an inner loop on the attenuation (for SPECT). More... | |
void | BackwardProject (FLTNB *ap_image, FLTNB a_value) |
Simply backward projects the provided value inside the provided image, for the current TOF bin. More... | |
void | BackwardProjectWithSPECTAttenuation (FLTNB *ap_attenuation, FLTNB *ap_image, FLTNB a_value) |
Backward project the provided value inside the provided image with an inner loop on the attenuation (for SPECT). More... | |
FLTNB | ComputeLineIntegral (int a_direction) |
It simply computes the sum of all voxels contributions following the provided direction. More... | |
FLTNB | GetVoxelWeights (int a_direction, int a_TOFBin, INTNB a_voxelInLine) |
This function is used to get the contributing voxel weight of the provided direction, TOF bin and voxel rank. More... | |
INTNB | GetCurrentNbVoxels (int a_direction, int a_TOFBin) |
This function is used to get the current number of contributing voxels to the line. More... | |
int | GetNbTOFBins () |
This function is used to get the number of TOF bins in use. More... | |
FLTNB | GetLength () |
This function is used to get the length of the line. More... | |
int | GetComputationStrategy () |
This function is used to get the computation strategy. More... | |
FLTNB * | GetPosition1 () |
This function is used to get the pointer to the mp_position1 (3-values tab). More... | |
FLTNB * | GetPosition2 () |
This function is used to get the pointer to the mp_position2 (3-values tab). More... | |
FLTNB * | GetBufferPosition1 () |
This function is used to get the pointer to the mp_bufferPosition1 (3-values tab). More... | |
FLTNB * | GetBufferPosition2 () |
This function is used to get the pointer to the mp_bufferPosition2 (3-values tab). More... | |
FLTNB * | GetOrientation1 () |
This function is used to get the pointer to the mp_orientation1 (3-values tab). More... | |
FLTNB * | GetOrientation2 () |
This function is used to get the pointer to the mp_orientation2 (3-values tab). More... | |
FLTNB * | GetBufferOrientation1 () |
This function is used to get the pointer to the mp_bufferOrientation1 (3-values tab). More... | |
FLTNB * | GetBufferOrientation2 () |
This function is used to get the pointer to the mp_bufferOrientation2 (3-values tab). More... | |
FLTNB * | GetPOI1 () |
This function is used to get the pointer to POI of point 1 (3-values tab). More... | |
FLTNB * | GetPOI2 () |
This function is used to get the pointer to POI of point 2 (3-values tab). More... | |
FLTNB | GetTOFResolution () |
This function is used to get the TOF resolution. More... | |
FLTNB | GetTOFMeasurement () |
This function is used to get the TOF measurement. More... | |
FLTNB | GetTOFBinSize () |
This function is used to get the size in ps of a TOF bin. More... | |
int | GetIndex1 () |
This function is used to get the index associated to point 1. More... | |
int | GetIndex2 () |
This function is used to get the index associated to point 2. More... | |
int | GetThreadNumber () |
This function is used to get the thread number associated to this line. More... | |
FLTNB | GetBedOffset () |
This function is used to get the axial bed offset associated to this line. More... | |
void | SetLength (FLTNB a_length) |
This function is used to set the length of the line. More... | |
void | SetPOI1 (FLTNB *ap_POI1) |
This function is used to set the POI of point 1. More... | |
void | SetPOI2 (FLTNB *ap_POI2) |
This function is used to set the POI of point 2. More... | |
void | SetTOFMeasurement (FLTNB a_TOFMeasurement) |
This function is used to set the TOF measurement associated to the line. More... | |
void | SetTOFBinSize (FLTNB a_TOFBinSize) |
This function is used to set the size of a TOF bin in ps. More... | |
void | SetIndex1 (int a_index1) |
This function is used to set the index m_index1 of point 1. More... | |
void | SetIndex2 (int a_index2) |
This function is used to set the index m_index1 of point 2. More... | |
void | SetNbTOFBins (int a_nbTOFBins) |
This function is used to set the number of TOF bins in use. More... | |
void | SetCurrentTOFBin (int a_TOFBin) |
This function is used to set the current TOF bin that is used. More... | |
void | SetMatchedProjectors (bool a_UseMatchedProjectors) |
This function is used to set the boolean that says if we use matched projectors. More... | |
void | SetTOFResolution (FLTNB a_TOFResolution) |
This function is used to set the TOF resolution in use. More... | |
void | SetPOIResolution (FLTNB *ap_POIResolution) |
This function is used to set the POI resolution along the 3 axes. More... | |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
This function is used to set the pointer to the oImageDimensionsAndQuantification in use. More... | |
void | SetComputationStrategy (int a_computationStrategy) |
This function is used to set the computation strategy in use. More... | |
void | SetForwardProjector (vProjector *ap_Projector) |
This function is used to set the pointer to the forward projector. More... | |
void | SetBackwardProjector (vProjector *ap_Projector) |
This function is used to set the pointer to the backward projector. More... | |
void | SetThreadNumber (int a_threadNumber) |
This function is used to set the thread number of this particular line. More... | |
void | SetMultiplicativeCorrection (FLTNB a_multiplicativeCorrection) |
This function is used to set the multiplicative correction to be applied during forward and backward projections. More... | |
void | SetVerbose (int a_verbose) |
This function is used to set the verbose level. More... | |
void | SetBedOffset (FLTNB a_bedOffset) |
This function is used to set the bed offset. More... | |
This class is designed to manage and store system matrix elements associated to a vEvent.
This class is basically a container for system matrix elements associated to a vEvent. It can use different storage and computation strategies for this role. It contains the voxel contributions to the LOR associated to a vEvent. It manages TOF bins.
Definition at line 92 of file oProjectionLine.hh.
oProjectionLine::oProjectionLine | ( | ) |
The constructor of oProjectionLine.
This is the default and unique constructor. It does not take any parameter and its role is only to affect default values to each member of the class.
Definition at line 40 of file oProjectionLine.cc.
oProjectionLine::~oProjectionLine | ( | ) |
The destructor of oProjectionLine.
This is the default and unique destructor. It does not take any parameter and its role is only to free or delete all structures that were built by this class.
Definition at line 83 of file oProjectionLine.cc.
This function is used to add a voxel contribution to the line, assuming TOF bin 0 (i.e. no TOF).
int | a_direction |
INTNB | a_voxelIndice |
FLTNB | a_voxelWeight |
Definition at line 687 of file oProjectionLine.cc.
void oProjectionLine::AddVoxelAllTOFBins | ( | int | a_direction, |
INTNB | a_voxelIndex, | ||
FLTNB | a_voxelWeight, | ||
HPFLTNB * | a_tofWeights, | ||
INTNB | a_tofBinFirst, | ||
INTNB | a_tofBinLast | ||
) |
Add a voxel contribution to the line for all relevant TOF bins.
int | a_direction |
INTNB | a_voxelIndex |
FLTNB | a_voxelWeight |
HPFLTNB* | a_tofWeights : TOF weightings for all TOF bins for this voxel |
INTNB | a_tofBinFirst : first relevant TOF bin for this voxel |
INTNB | a_tofBinLast : last relevant TOF bin for this voxel |
Definition at line 622 of file oProjectionLine.cc.
void oProjectionLine::AddVoxelInTOFBin | ( | int | a_direction, |
int | a_TOFBin, | ||
INTNB | a_voxelIndice, | ||
FLTNB | a_voxelWeight | ||
) |
This function is used to add a voxel contribution to the line and provided TOF bin.
int | a_direction |
int | a_TOFBin |
INTNB | a_voxelIndex |
FLTNB | a_voxelWeight |
Definition at line 566 of file oProjectionLine.cc.
void oProjectionLine::ApplyBedOffset | ( | ) |
Apply the bed offset of m_bedOffset to the mp_position1 and mp_position2.
Definition at line 508 of file oProjectionLine.cc.
void oProjectionLine::ApplyOffset | ( | ) |
Apply the offset of oImageDimensionsAndQuantification to the mp_position1 and mp_position2.
Definition at line 479 of file oProjectionLine.cc.
Simply backward projects the provided value inside the provided image, for the current TOF bin.
FLTNB* | ap_image |
FLTNB | a_value |
It backward projects for the current TOF bin the provided value inside the provided image. It also applies the inverse of the multiplicative correction term before the backward projection, and assumes it is not zero.
Definition at line 877 of file oProjectionLine.cc.
void oProjectionLine::BackwardProjectWithSPECTAttenuation | ( | FLTNB * | ap_attenuation, |
FLTNB * | ap_image, | ||
FLTNB | a_value | ||
) |
Backward project the provided value inside the provided image with an inner loop on the attenuation (for SPECT).
FLTNB* | ap_attenuation |
FLTNB* | ap_image |
FLTNB | a_value |
It backward projects the provided into the provided image. It does it for the current TOF bin (for genericity purpose) even if this function should only be called for SPECT. The order of the voxels contributions is assumed to be from the outside to the detector, so it only works with the list computation strategy. It also applies the inverse of the multiplicative correction term before the backward projection, and assumes it is not zero.
Definition at line 902 of file oProjectionLine.cc.
int oProjectionLine::CheckParameters | ( | ) |
A function used to check the parameters settings.
This function does not take any parameter and is used to check that all mandatory members were correctly parameterized.
Definition at line 138 of file oProjectionLine.cc.
FLTNB oProjectionLine::ComputeLineIntegral | ( | int | a_direction | ) |
It simply computes the sum of all voxels contributions following the provided direction.
int | a_direction |
Definition at line 956 of file oProjectionLine.cc.
void oProjectionLine::ComputeLineLength | ( | ) |
Simply compute and update the m_length using the associated mp_position1 and mp_position2.
Definition at line 383 of file oProjectionLine.cc.
Simply forward projects the provided image if not null, or else 1, for the current TOF bin.
FLTNB* | ap_image = NULL |
It forward projects for the current TOF bin the provided image if not NULL, or else it assumes a uniform image of 1. It also applies the inverse of the multiplicative correction term, and assumes it is not zero.
Definition at line 746 of file oProjectionLine.cc.
FLTNB oProjectionLine::ForwardProjectWithSPECTAttenuation | ( | FLTNB * | ap_attenuation, |
FLTNB * | ap_image = NULL |
||
) |
Forward projects the provided image for the current TOF bin with an inner loop on the attenuation (for SPECT).
FLTNB* | ap_attenuation |
FLTNB* | ap_image = NULL |
It forward projects the provided image if not null, or else it assumes a uniform image of 1. It does it for the current TOF bin (for genericity purpose) even if this function should only be called for SPECT. The order of the voxels contributions is assumed to be from the outside to the detector, so it only works with the list computation strategy. It also applies the inverse of the multiplicative correction term, and assumes it is not zero.
Definition at line 785 of file oProjectionLine.cc.
|
inline |
This function is used to get the axial bed offset associated to this line.
Definition at line 404 of file oProjectionLine.hh.
|
inline |
This function is used to get the pointer to the mp_bufferOrientation1 (3-values tab).
Definition at line 334 of file oProjectionLine.hh.
|
inline |
This function is used to get the pointer to the mp_bufferOrientation2 (3-values tab).
Definition at line 341 of file oProjectionLine.hh.
|
inline |
This function is used to get the pointer to the mp_bufferPosition1 (3-values tab).
Definition at line 306 of file oProjectionLine.hh.
|
inline |
This function is used to get the pointer to the mp_bufferPosition2 (3-values tab).
Definition at line 313 of file oProjectionLine.hh.
|
inline |
This function is used to get the computation strategy.
Definition at line 285 of file oProjectionLine.hh.
|
inline |
This function is used to get the current number of contributing voxels to the line.
int | a_direction |
int | a_TOFBin |
Definition at line 264 of file oProjectionLine.hh.
|
inline |
This function is used to get the index associated to point 1.
Definition at line 383 of file oProjectionLine.hh.
|
inline |
This function is used to get the index associated to point 2.
Definition at line 390 of file oProjectionLine.hh.
|
inline |
This function is used to get the length of the line.
Definition at line 278 of file oProjectionLine.hh.
|
inline |
This function is used to get the number of TOF bins in use.
Definition at line 271 of file oProjectionLine.hh.
|
inline |
This function is used to get the pointer to the mp_orientation1 (3-values tab).
Definition at line 320 of file oProjectionLine.hh.
|
inline |
This function is used to get the pointer to the mp_orientation2 (3-values tab).
Definition at line 327 of file oProjectionLine.hh.
|
inline |
This function is used to get the pointer to POI of point 1 (3-values tab).
Definition at line 348 of file oProjectionLine.hh.
|
inline |
This function is used to get the pointer to POI of point 2 (3-values tab).
Definition at line 355 of file oProjectionLine.hh.
|
inline |
This function is used to get the pointer to the mp_position1 (3-values tab).
Definition at line 292 of file oProjectionLine.hh.
|
inline |
This function is used to get the pointer to the mp_position2 (3-values tab).
Definition at line 299 of file oProjectionLine.hh.
|
inline |
This function is used to get the thread number associated to this line.
Definition at line 397 of file oProjectionLine.hh.
|
inline |
This function is used to get the size in ps of a TOF bin.
Definition at line 376 of file oProjectionLine.hh.
|
inline |
This function is used to get the TOF measurement.
Definition at line 369 of file oProjectionLine.hh.
|
inline |
This function is used to get the TOF resolution.
Definition at line 362 of file oProjectionLine.hh.
This function is used to get the contributing voxel index of the provided direction, TOF bin and voxel rank.
int | a_direction |
int | a_TOFBin |
INTNB | a_voxelInLine |
Definition at line 533 of file oProjectionLine.cc.
|
inline |
This function is used to get the contributing voxel weight of the provided direction, TOF bin and voxel rank.
int | a_direction |
int | a_TOFBin |
INTNB | a_voxelInLine |
Definition at line 255 of file oProjectionLine.hh.
int oProjectionLine::Initialize | ( | ) |
A function used to initialize a bunch of stuff after parameters have been checked.
It allocates all tables depending on the computation strategy.
Definition at line 176 of file oProjectionLine.cc.
bool oProjectionLine::NotEmptyLine | ( | ) |
This function is used to know if the line contains any voxel contribution.
Definition at line 407 of file oProjectionLine.cc.
void oProjectionLine::Reset | ( | ) |
Reset length and all the voxel indices and weights tabs.
Definition at line 431 of file oProjectionLine.cc.
|
inline |
This function is used to set the pointer to the backward projector.
vProjector* | ap_Projector |
Definition at line 521 of file oProjectionLine.hh.
|
inline |
This function is used to set the bed offset.
FLTNB | a_bedOffset |
Definition at line 549 of file oProjectionLine.hh.
|
inline |
This function is used to set the computation strategy in use.
int | a_computationStrategy |
Definition at line 507 of file oProjectionLine.hh.
|
inline |
This function is used to set the current TOF bin that is used.
int | a_TOFBin |
Definition at line 472 of file oProjectionLine.hh.
|
inline |
This function is used to set the pointer to the forward projector.
vProjector* | ap_Projector |
Definition at line 514 of file oProjectionLine.hh.
|
inline |
This function is used to set the pointer to the oImageDimensionsAndQuantification in use.
oImageDimensionsAndQuantification* | ap_ImageDimensionsAndQuantification |
Definition at line 500 of file oProjectionLine.hh.
|
inline |
This function is used to set the index m_index1 of point 1.
int | a_index1 |
Definition at line 451 of file oProjectionLine.hh.
|
inline |
This function is used to set the index m_index1 of point 2.
int | a_index2 |
Definition at line 458 of file oProjectionLine.hh.
|
inline |
This function is used to set the length of the line.
FLTNB | a_length |
Definition at line 416 of file oProjectionLine.hh.
|
inline |
This function is used to set the boolean that says if we use matched projectors.
bool | a_UseMatchedProjectors |
Definition at line 479 of file oProjectionLine.hh.
|
inline |
This function is used to set the multiplicative correction to be applied during forward and backward projections.
FLTNB | a_multiplicativeCorrection |
Definition at line 535 of file oProjectionLine.hh.
|
inline |
This function is used to set the number of TOF bins in use.
int | a_nbTOFBins |
Definition at line 465 of file oProjectionLine.hh.
|
inline |
This function is used to set the POI of point 1.
FLTNB* | ap_POI1 |
Definition at line 423 of file oProjectionLine.hh.
|
inline |
This function is used to set the POI of point 2.
FLTNB* | ap_POI2 |
Definition at line 430 of file oProjectionLine.hh.
|
inline |
This function is used to set the POI resolution along the 3 axes.
FLTNB* | ap_POIResolution |
Definition at line 493 of file oProjectionLine.hh.
|
inline |
This function is used to set the thread number of this particular line.
int | a_threadNumber |
Definition at line 528 of file oProjectionLine.hh.
|
inline |
This function is used to set the size of a TOF bin in ps.
FLTNB | a_TOFBinSize |
Definition at line 444 of file oProjectionLine.hh.
|
inline |
This function is used to set the TOF measurement associated to the line.
FLTNB | a_TOFMeasurement |
Definition at line 437 of file oProjectionLine.hh.
|
inline |
This function is used to set the TOF resolution in use.
FLTNB | a_TOFResolution |
Definition at line 486 of file oProjectionLine.hh.
|
inline |
This function is used to set the verbose level.
int | a_verbose |
Definition at line 542 of file oProjectionLine.hh.
|
private |
Number of allocated voxels for each direction and each TOF bin
Definition at line 619 of file oProjectionLine.hh.
|
private |
Current number of voxels for each direction and each TOF bin
Definition at line 620 of file oProjectionLine.hh.
|
private |
List of contributing voxel indices for each direction and each TOF bin
Definition at line 622 of file oProjectionLine.hh.
|
private |
List of contributing voxel weights for each direction and each TOF bin
Definition at line 624 of file oProjectionLine.hh.
|
private |
Bed axial offset when reconstructing multiple bed positions at once, in mm
Definition at line 578 of file oProjectionLine.hh.
|
private |
Boolean that says if the parameters were checked or not
Definition at line 560 of file oProjectionLine.hh.
|
private |
Integer defining the computation/storage strategy of the contributing voxels
Definition at line 576 of file oProjectionLine.hh.
|
private |
The current TOF bin in use, can be used for simple to calls to forward or backward projections
Definition at line 583 of file oProjectionLine.hh.
|
private |
The current index of point 1 (associated to the vScanner in use)
Definition at line 601 of file oProjectionLine.hh.
|
private |
The current index of point 2 (associated to the vScanner in use)
Definition at line 602 of file oProjectionLine.hh.
|
private |
Boolean that says if the manager was initialized or not
Definition at line 562 of file oProjectionLine.hh.
|
private |
The current length of the line
Definition at line 590 of file oProjectionLine.hh.
|
private |
Multiplicative correction factor that will be applied during forward and backward projections
Definition at line 571 of file oProjectionLine.hh.
|
private |
The number of TOF bins in use
Definition at line 580 of file oProjectionLine.hh.
|
private |
Thread number associated to this projection line
Definition at line 569 of file oProjectionLine.hh.
|
private |
The size in ps of a single TOF bin
Definition at line 584 of file oProjectionLine.hh.
|
private |
The current TOF measurement of the event
Definition at line 582 of file oProjectionLine.hh.
|
private |
The TOF resolution in use
Definition at line 581 of file oProjectionLine.hh.
|
private |
Boolean that says if we use matched projectors (forward = backward)
Definition at line 606 of file oProjectionLine.hh.
|
private |
The verbose level
Definition at line 558 of file oProjectionLine.hh.
|
private |
Pointer to the backward projector in use
Definition at line 608 of file oProjectionLine.hh.
|
private |
A buffer for orientation of point 1 (used when compression)
Definition at line 598 of file oProjectionLine.hh.
|
private |
A buffer for orientation of point 2 (used when compression)
Definition at line 599 of file oProjectionLine.hh.
|
private |
A buffer for position of point 1 (used when compression)
Definition at line 594 of file oProjectionLine.hh.
|
private |
A buffer for position of point 2 (used when compression)
Definition at line 595 of file oProjectionLine.hh.
|
private |
Pointer to the forward projector in use
Definition at line 607 of file oProjectionLine.hh.
|
private |
Pointer to the oImageDimensionsAndQuantification object in use
Definition at line 574 of file oProjectionLine.hh.
|
private |
The current orientation of point 1 (along the 3 axes)
Definition at line 596 of file oProjectionLine.hh.
|
private |
The current orientation of point 2 (along the 3 axes)
Definition at line 597 of file oProjectionLine.hh.
|
private |
The current POI of point 1 of the event (along the 3 axes)
Definition at line 586 of file oProjectionLine.hh.
|
private |
The current POI of point 2 of the event (along the 3 axes)
Definition at line 587 of file oProjectionLine.hh.
|
private |
The POI resolution in use (along the 3 axes)
Definition at line 588 of file oProjectionLine.hh.
|
private |
The current position of point 1 (along the 3 axes)
Definition at line 592 of file oProjectionLine.hh.
|
private |
The current position of point 2 (along the 3 axes)
Definition at line 593 of file oProjectionLine.hh.