![]() |
ImFusion SDK 4.3
|
Internal implementation details for CT utilities. More...
Internal implementation details for CT utilities.
Classes | |
| class | Creator |
| Base class for factory "create" functionality. More... | |
| class | CreatorImpl |
| Wrapper around a pair of std::functions used for constructing an item Derived from Base. More... | |
| class | GlobalTransformationGeneratorBase |
| Base class for global transformation generators. More... | |
| class | PerFrameTransformationGeneratorBase |
| Base class for per-frame transformation generators. More... | |
| class | RelativeGeneratorMixin |
| Template mixin for relative geometry generators. More... | |
| struct | RelativeTransformationSetupWrapperBase |
| Base class for RelativeTransformationSetupWrapper which requires customer move and copy semantics due to signal connections it creates. More... | |
| struct | SparseSharedImageSet |
| Representation of a SharedImageSet with N images with the same descriptor of which only M (<N) are used at the same time. More... | |
| class | TrivialConfigurable |
| Helper class for storing arbitrary Properties in a Configurable instance. More... | |
Functions | |
| std::unique_ptr< SharedImageSet > | cloneContainer (const SharedImageSet &sis, std::optional< PixelType > pixelType, int channels=0) |
| Creates a copy of sis without cloning the image content. | |
| SparseSharedImageSet | createSparseSharedImageSetContainer (const SharedImageSet &sis, int numImgs, std::optional< PixelType > pixelType, int channels=0) |
| Creates a ring buffer SharedImageSet with effectively numImgs SharedImages but used in a ring fashion such that the SharedImageSet has as many frames as sis. | |
| void | updateSparseSharedImageSet (const SparseSharedImageSet &buffer) |
| Updates buffer such that the M images in the SparseSharedImageSet are moved to the currently selected images. | |
| bool | hasLinearGradient (const OptimizationProblem &problem) |
| Returns true if the problem has a linear gradient. | |
| bool | isIsotropicTV (const OptimizationProblem &problem) |
| Returns true if the problem is a Least-Squares problem with an Isotropic TV regularization. | |
| std::pair< std::shared_ptr< ImageMath::ExprBase >, std::unique_ptr< SharedImageSet > > | checkOutExprAndCreateUpdateExprAndTmpOut (const ImageMath::ExprBase *exprOut, SharedImageSet &out, int varChannels, bool forceRequired=false) |
| The function checkOutExprAndCreateUpdateExprAndTmpOut is intended to correctly deal in apply() and applyAdjoint() with the case where the outExpr parameter contains the parameter out. | |
| auto | scopedSelection (const SharedImageSet *sis, const Selection &sel, bool silentClear, bool silentSet) |
| The resulting ScopeGuard sets the selection to the provided one, and resets it on destruction. | |
| auto | scopedSelection (const SharedImageSet *sis, bool silentClear) |
| The resulting ScopeGuard sets the selection to one present at construction at destruction. | |
| int | numSelected (const SharedImageSet *sis, Selection::NonePolicy pol=Selection::NonePolicy::All) |
| std::unique_ptr< SharedImageSet > cloneContainer | ( | const SharedImageSet & | sis, |
| std::optional< PixelType > | pixelType, | ||
| int | channels = 0 ) |
Creates a copy of sis without cloning the image content.
| [in] | sis | Reference image |
| [in] | pixelType | Image type |
| [in] | channels | If bigger than 0 the number of channels in the reference will be replaced with this value |
| SparseSharedImageSet createSparseSharedImageSetContainer | ( | const SharedImageSet & | sis, |
| int | numImgs, | ||
| std::optional< PixelType > | pixelType, | ||
| int | channels = 0 ) |
Creates a ring buffer SharedImageSet with effectively numImgs SharedImages but used in a ring fashion such that the SharedImageSet has as many frames as sis.
| [in] | sis | Reference image |
| [in] | pixelType | Image type |
| [in] | numImgs | Number of active images (M in SparseSharedImageSet) |
| [in] | channels | If bigger than 0 the number of channels in the reference will be replaced with this value |
| void updateSparseSharedImageSet | ( | const SparseSharedImageSet & | buffer | ) |
Updates buffer such that the M images in the SparseSharedImageSet are moved to the currently selected images.
Size of the selection of buffer.sis needs to match the size of buffer.imgs
| std::pair< std::shared_ptr< ImageMath::ExprBase >, std::unique_ptr< SharedImageSet > > checkOutExprAndCreateUpdateExprAndTmpOut | ( | const ImageMath::ExprBase * | exprOut, |
| SharedImageSet & | out, | ||
| int | varChannels, | ||
| bool | forceRequired = false ) |
The function checkOutExprAndCreateUpdateExprAndTmpOut is intended to correctly deal in apply() and applyAdjoint() with the case where the outExpr parameter contains the parameter out.
The values used from out are those from before the operator is applied. This is nontrivial given the fact that some operators – including backprojection operators used in CT reconstruction – additively split their computation into blocks and thus the previous values of out have been overwritten by the time the final result is available. Note: If the operator does NOT split up the computation into such blocks, exprOut can be used directly, i.e. no temp is needed. The restrictions that otherwise also apply to ImageMath operators remain unchanged in this case.
On a more technical level, this function checks if the outExpr has the format 'out + scalar * var'. In this case, the expression encodes the operation \(out += scalar*A(in)\) This format is suitable without modification for use within additive blocks. If not, an output expression containing a temporary variable with the initial values from the out parameter is returned.
| varChannels | - the number of channels in the variable, this is typically the number of channels in the shader output If this does not match the number of channels in out, a temporary is always required. |
exprOut in case the operator splits up the computation by dividing the operator in blocks (here var is the result of the computation on the current subset).exprOut = var, see below in "\p exprOut does not contain \p out".out. In this case, a temporary is not required, as the expression distributes over the splitting. exprOut can be directly used also to accumulate the results from the individual blocks. exprOut must be applied for all blocks INCLUDING the first one.forceRequired is set to true the previous case will be used whenever exprOut contains out.