freeart.interpreter

Python module to build and run a freeart reconstruction from a configuraton file (.cfg file).

freeart.interpreter.configinterpreter: config file management

Create the link between freeart and a configuration file. Basically set up a reconstruction

class freeart.interpreter.configinterpreter.AbsConfInterpreter(filePath, _config)[source]

Abstract class from which each interpreter (fluorescence, tx…) should inherit

resetAngles()[source]

Reset all angles

iterate()[source]

Iterate on the reconstruction. Each iteration generate a backward projection for each angle of acquisition (in a random order).

getFile()[source]
Returns:the current configuratioin file
setLimitParallelReconstruction(val)[source]

Limit the number of parallel reconstruction we can run

Parameters:val – the new limitation of parallel reconstructions to run
setLimitVoxels(val)[source]

Limit the maximal number of voxel we can run during one iteration

Parameters:val – the maximal number of voxel to run during one step.
adaptSinogramData(data, isI0=False)[source]

center, reduce sinogram (X definition and number of projection) and pick the range of projection requested.

Parameters:
  • data
  • computeAngles – If true then compute self.angles
Returns:

data adapted to constrain

getSinograms()[source]
Returns:A dictionnary of the sinograms to treat
class freeart.interpreter.configinterpreter.TxConfInterpreter(filePath, _config=None)[source]

Interpreter for tx reconstruction

Parameters:filePath – the path of the cfg file
getReconstructionAlgorithms()[source]
Returns:the dictionay of the freeart reconstruction.
iterate(nbIteration)[source]

Iterate on the reconstruction. Each iteration generate a backward projection for each angle of acquisition (in a random order).

class freeart.interpreter.configinterpreter.FluoConfInterpreter(filePath, _config=None)[source]

FreeART interpreter for fluorescence reconstruction. Basicall y take a .cfg file containing the description of the reconstruction in input and create all corresponding ARTAlgorithm for such reconstructions

Parameters:filePath – the configuration file to be interpreted.
fisxMaterials = None

Dict to associate at each material in the sample the corresponding fisx materials

selfAbsMatFile = None

File where to get the selfAbsMat file in case the user give them

absMatrixFile = None

The file of the absorption matrix file

fluoSinogramsAlgorithms = None

all the art algorithm to fit the configuration file

fluoSinograms = None

sinograms to treat

interactionMatrice = None

the interaction matrices

static getProbabilityOfEmission(energy, element, fisxElements, shell=None)[source]

compute the probability of emission of the element for a specific energy and material.

Parameters:
  • fisxMat – the fisx material of the interaction
  • energy – the nergy of the incomng beam
  • element – the generated element
  • shell – the targetted shell of the interaction.
Returns:

the probability of emission of the element for a specific energy and material.

getReconstructionAlgorithms()[source]
Returns:all the algorithm created for reconstructions
iterate(nbIteration)[source]

Iterate on the reconstruction. Each iteration generate a backward projection for each angle of acquisition (in a random order).

getDensityPhantoms()[source]

Return the phantom taking into account the probability of generation of the physical element