OrsReconstruction

Tool to reconstruct projection (CT) data

author:

Dragonfly Team, Stoyan Asenov, Zacharie Legault, Emmanuelle Richer

contact:

https://dragonfly.comet.tech

email:

support.dragonfly@comet.tech

organization:

Comet Technologies Canada Inc.

address:

460 Ste-Catherine Ouest, suite 600, Montréal, Québec, Canada, H3B 1A7

copyright:

Comet Technologies Canada Inc. All rights reserved 2023.

date:

Jun 11 2018 15:29

dragonflyVersion:

4.0.0.542 (D)

UUID:

84da1d5ee44311e89d54448a5b5d70c0

Class Code

class OrsPythonPlugins.OrsReconstruction.OrsReconstruction.OrsReconstruction(*args, **kwargs)
cleanup()

Deletes the variables managed by the plugin. It is the place to remove callbacks and other references to Python objects that would prevent them to be garbage collected. This method is called during the process of deletion of the plugin. It calls for the cleanup and deletion of the forms.

interfacemethod computePreview(projectionStack: Channel, metadata: Metadata, reconstructorEngineAlgorithmInstance: AbstractReconstructor, sliceIndex: int, preProcessor: CTPreProcessor, postProcessor: CTPostProcessor = None, progress: Progress = None) Tuple[Channel, str]

Reconstruct projection for slice sliceIndex following the given reconstruction engine and pre processing workflow

Parameters:
  • projectionStack (ORSModel.ors.Channel) – input projection stack to be reconstruct

  • metadata (transient Metadata) – the associated ct acquisition geometry

  • reconstructorEngineAlgorithmInstance (transient AbstractReconstructor) – the instance of the reconstruction engine

  • sliceIndex (int) – slice index

  • preProcessor (transient CTPreProcessor) – pre processing filters workflow to be applied

  • postProcessor (transient CTPostProcessor) – post processing filters to be applied

  • progress (ORSModel.ors.Progress) – an optional progress bar

Returns:
  • reconstructedOutputPreview (ORSModel.ors.Channel) – reconstructed preview

  • err (str) – error message if an error occur

computePreviewAndPublish()

Reconstruct the input dataset from the set instance variables. If succeed, the reconstructed dataset will be published.

Returns:
  • succeed (bool) – true if the reconstruction and publish succeed, false otherwise.

  • errorMessage (str) – detail of the error when an error occur.

classmethod getMainFormClass()

Gets the class of the main form

Returns:

output

classmethod importAllLoggingClasses()

This method is called to make any class extension available for macro playing. It should:

  1. import all class extension;

  2. return a list of classes where logging is supported.

Returns:

output (list of classes) – list of classes where logging is supported by the current plugin

interfacemethod reconstruct(projectionStack: Channel, metadata: Metadata, reconstructorEngineAlgorithmInstance: AbstractReconstructor, preProcessor: CTPreProcessor, postProcessor: CTPostProcessor = None, progress: Progress = None) Tuple[Channel, str]

Reconstruct projection following the given reconstruction engine and pre processing workflow

Parameters:
  • projectionStack (ORSModel.ors.Channel) – input projection stack to be reconstruct

  • metadata (transient Metadata) – the associated ct acquisition geometry

  • reconstructorEngineAlgorithmInstance (transient AbstractReconstructor) – the instance of the reconstruction engine

  • preProcessor (transient CTPreProcessor) – pre processing filters workflow to be applied

  • postProcessor (transient CTPostProcessor) – post processing filters workflow to be applied

  • progress (ORSModel.ors.Progress) – an optional progress bar

Returns:
  • reconstructedOutputVolume (ORSModel.ors.Channel) – reconstructed volume

  • err (str) – error message if an error occur

interfacemethod reconstructAndSaveAsTiff(projectionStack: Channel, metadata: Metadata, reconstructorEngineAlgorithmInstance: AbstractReconstructor, preProcessor: CTPreProcessor, outputFileDirectory: str, postProcessor: CTPostProcessor = None) Tuple[bool, str]

Reconstruct projection following the given reconstruction engine and pre processing workflow, and sava the results on disk as tiff

Parameters:
  • projectionStack (ORSModel.ors.Channel) – input projection stack to be reconstruct

  • metadata (transient Metadata) – the associated ct acquisition geometry

  • reconstructorEngineAlgorithmInstance (transient AbstractReconstructor) – the instance of the reconstruction engine

  • preProcessor (transient CTPreProcessor) – pre processing filters workflow to be applied

  • outputFileDirectory (str) – output file directory

  • postProcessor (transient CTPostProcessor) – post processing filters workflow to be applied

Returns:
  • succeed (bool) – succeed or not

  • errorMessage (str) – error message

reconstructDatasetAndPublish()

Reconstruct the input dataset from the set instance variables. If succeed, the reconstructed dataset will be published.

setReconstructionPluginInstanceVariableFromSelectedPreview(selectedPreview)

Update reconstruction plugin instance from a selected preview (ORS Channel)

classmethod startupDefault(openMainForm=True)

Creates an instance of the plugin class and opens the main form (if required) at the default position.

Returns:

output (AbstractPlugin) – plugin instance