template<typename TInputImage, typename TOutputImage = itk::Image<itk::VariableSizeMatrix<double>, TInputImage::ImageDimension>>
class itk::RieszStructureTensorImageFilter< TInputImage, TOutputImage >
Given an array of inputs, StructureTensor computes the linear combination (or direction) of inputs that maximizes the response for each location in the image. Instead of only measuring the response at the pixel of interest, it takes into account a local neighborhood.
Implementation based on article: Unser, M., Chenouard, N. and Van De Ville, D. Steerable Pyramids and Tight Wavelet Frames in \(L_{2}(\mathcal{R}^d)\), IEEE Transactions on Image Processing, DOI: 10.1109/TIP.2011.2138147
\[ \mathbf{u}({\mathbf{x}_0}) = \arg \max_{\Vert\mathbf{u}\Vert =1 } \int_{\mathbb{R}^d} g(\mathbf{x} - \mathbf{x}_0)
\left| \mathbf{I}_{\mathbf{u}}(\mathbf{x})\right|^2 \]
\[ \left| \mathbf{I}_{\mathbf{u}}(\mathbf{x})\right|^2 =
\mathbf{u}^T \cdot \mathbf{I}(\mathbf{x}) \cdot (\mathbf{I}(\mathbf{x}))^T \cdot \mathbf{u}
\]
\( \mathbf{I}\) is the required std::vector of input images. These images might be the output after applying a directional filter to an image (for example, directional derivatives from an image, or the basis of a steerable filter, such as a RieszImageFilter). Instead of just select the max response at every pixel, it uses the response over a local neighborhood that is specified using an isotropic Gaussian window \(g(\mathbf{x}\). This approach is more robust against noise. The user can control the radius and sigma of this gaussian kernel. Estimation of the local orientation this way results in an eigen system with matrix:
\[ [\mathbf{J}(\mathbf{x}_0)]_{mn} = \sum_{\mathbf{x} \in \mathbb{Z}^d} g(\mathbf{x} - \mathbf{x}_0)
I_m[\mathbf{x}]I_n[\mathbf{x}]
\]
where \(I_m, I_n \) are input images, \( m,n \in {0,N-1} \) and \(N\) is the total number of inputs. \(g\) is a gaussian kernel of radius SetGaussianWindowRadius()
The solution of the EigenSystem defined by \(\mathbf{J}\) are the N EigenValues and EigenVectors. The output of StructureTensor is a 2D Matrix of size (N,N+1), where the submatrix (N,N) are the EigenVectors, and the last column (N+1) are the EigenValues. The orientation that maximises the response: \(u\) is the EigenVector with largest EigenValue, which is is the Nth column of the output matrix. We can use the calculated direction \(u\) to get a new image with max response from the inputs at each pixel.
- See also
- ComputeProjectionImageWithLargestResponse(), or any other direction from other eigen vectors with
-
ComputeProjectionImage(unsigned int eigen_index)
Also we can compare eigen values to study the local coherency of each pixel:
\[ \chi (\mathbf{x}_0)= \frac{\lambda_N(\mathbf{x}_0) - A(\mathbf{x}_0)}{\lambda_N(\mathbf{x}_0) + A(\mathbf{x}_0)}
\]
where \(\lambda_N(\mathbf{x}_0)\) is the largest eigen value at pixel \(\mathbf{x}_0\) , and \(A(\mathbf{x}_0) = \frac{1}{N-1}\sum_{i=1}^{N-1}\lambda_i(\mathbf{x}_0)\) is the average of the other eigen values.
- See also
- RieszImageFilter
-
SymmetricEigenAnalysis
Definition at line 83 of file itkRieszStructureTensorImageFilter.h.
|
| void | BeforeThreadedGenerateData () override |
| |
| void | DynamicThreadedGenerateData (const OutputImageRegionType &outputRegionForThread) override |
| |
| void | PrintSelf (std::ostream &os, Indent indent) const override |
| |
| | RieszStructureTensorImageFilter () |
| |
| | ~RieszStructureTensorImageFilter () override=default |
| |
| virtual void | CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion) |
| |
| virtual void | CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion) |
| |
| void | GenerateInputRequestedRegion () override |
| |
| | ImageToImageFilter () |
| |
| void | VerifyInputInformation () const override |
| |
| | ~ImageToImageFilter () override=default |
| |
| virtual void | AfterThreadedGenerateData () |
| |
| virtual void | AllocateOutputs () |
| |
| void | ClassicMultiThread (ThreadFunctionType callbackFunction) |
| |
| void | GenerateData () override |
| |
| virtual const ImageRegionSplitterBase * | GetImageRegionSplitter () const |
| |
| | ImageSource () |
| |
| virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion) |
| |
| | ~ImageSource () override=default |
| |
| virtual void | ThreadedGenerateData (const OutputImageRegionType ®ion, ThreadIdType threadId) |
| |
| virtual bool | GetDynamicMultiThreading () const |
| |
| virtual void | SetDynamicMultiThreading (bool _arg) |
| |
| virtual void | DynamicMultiThreadingOn () |
| |
| virtual void | DynamicMultiThreadingOff () |
| |
| virtual void | AddInput (DataObject *input) |
| |
| void | AddOptionalInputName (const DataObjectIdentifierType &) |
| |
| void | AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
| |
| virtual void | AddOutput (DataObject *output) |
| |
| bool | AddRequiredInputName (const DataObjectIdentifierType &) |
| |
| bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
| |
| virtual void | CacheInputReleaseDataFlags () |
| |
| virtual void | GenerateOutputInformation () |
| |
| virtual void | GenerateOutputRequestedRegion (DataObject *output) |
| |
| DataObject * | GetInput (const DataObjectIdentifierType &key) |
| |
| const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
| |
| virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
| |
| virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
| |
| bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
| |
| bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
| |
| bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
| |
| DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
| |
| DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
| |
| DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
| |
| DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
| |
| | ProcessObject () |
| |
| virtual void | PropagateResetPipeline () |
| |
| virtual void | PushBackInput (const DataObject *input) |
| |
| virtual void | PushFrontInput (const DataObject *input) |
| |
| virtual void | ReleaseInputs () |
| |
| virtual void | RemoveInput (const DataObjectIdentifierType &key) |
| |
| virtual void | RemoveInput (DataObjectPointerArraySizeType) |
| |
| virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
| |
| virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
| |
| bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
| |
| virtual void | RestoreInputReleaseDataFlags () |
| |
| virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
| |
| virtual void | SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input) |
| |
| virtual void | SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output) |
| |
| void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
| |
| void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
| |
| virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
| |
| virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
| |
| virtual void | SetOutput (const DataObjectIdentifierType &name, DataObject *output) |
| |
| virtual void | SetPrimaryInput (DataObject *object) |
| |
| virtual void | SetPrimaryOutput (DataObject *object) |
| |
| void | SetRequiredInputNames (const NameArray &) |
| |
| virtual void | VerifyPreconditions () const |
| |
| | ~ProcessObject () override |
| |
| DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
| |
| const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
| |
| DataObject * | GetPrimaryInput () |
| |
| const DataObject * | GetPrimaryInput () const |
| |
| virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
| |
| virtual const char * | GetPrimaryInputName () const |
| |
| DataObject * | GetOutput (const DataObjectIdentifierType &key) |
| |
| const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
| |
| virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
| |
| virtual const char * | GetPrimaryOutputName () const |
| |
| DataObject * | GetOutput (DataObjectPointerArraySizeType i) |
| |
| const DataObject * | GetOutput (DataObjectPointerArraySizeType i) const |
| |
| DataObject * | GetPrimaryOutput () |
| |
| const DataObject * | GetPrimaryOutput () const |
| |
| virtual bool | GetThreaderUpdateProgress () const |
| |
| virtual void | ThreaderUpdateProgressOn () |
| |
| virtual void | ThreaderUpdateProgressOff () |
| |
| virtual void | SetThreaderUpdateProgress (bool arg) |
| |
| | Object () |
| |
| bool | PrintObservers (std::ostream &os, Indent indent) const |
| |
| virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
| |
| | ~Object () override |
| |
| virtual LightObject::Pointer | InternalClone () const |
| |
| | LightObject () |
| |
| virtual void | PrintHeader (std::ostream &os, Indent indent) const |
| |
| virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
| |
| virtual | ~LightObject () |
| |