Working With LieAnalysis Objects
Most of the functions in the LieAnalysis package return a special type, which we call LieAnalysis Objects. These objects contain elements, data which is stored in memory, and properties which are usually computed from the elements.
To see the current version of the package
LieAnalysis Classes and Parent/Child Relations
All objects start with Obj, therefore we can easily find all available objects
The child-parent relation between the objects
Elements and Properties
The output from many Lie Analysis functions returns a Lie Analysis object which contains elements and properties. Elements are stored in memory, therefor they trend to be optimized to minimize the consumption of memory. Properties are usually computed from the elements.
The most Lie Analysis functions return a Lie Analysis object
The Lie Analysis objects allows us to bundle data and functionality into a single symbol. For example if we wish to get the angular resolution, we can use the property Angular Resolution.
Elements are accessed by double brackets, e.g. cws[["elementsName"]], and properties are accessed by single brackets, e.g. cws["propertyName"].
The property Angular Resolution
There are several ways to see the available elements and properties. The easiest way to see all available elements is using the sign in the left top corner of the output. It is also possible to use a property to see the available elements or properties.
The available elements and properties
And finally you can use the symbol documentation notebooks to lookup more in dept details about a certain property or element. For example Object or ObjPositionOrientationData.
It is also possible to convert the Lie Analysis object to an Association by using the function Normal. Obviously the properties are then no longer available.
Convert a Lie Analysis object to an Association
It is possible to replace/update elements from a Lie Analysis object using the function Affix or AffixTo.
If a Lie Analysis Object is used as input for a Lie Analysis function the elements need to be coherent. If they are not, it is possible the kernel will crash and you will lose work!
Make the data from the cake-wavelets real valued
The function AffixTo works similar as Append is to AppendTo.
Make the data from the cake-wavelets negative using AffixTo
It is also possible to change the class of the objects by modifying its head by using ClassSet. Although I suggest that you only go from parent to child as other conversions lead to unexpected results.
Convert class the object belongs too, the following example demonstrates this, but the class conversion does not make sense as we went from a wavelet transform to a wavelet.
Before we change any of the elements, let start by validating elements using the function ValidQ. Note that this function check individual elements of a Lie Analysis object, thus does not check the coherence between the different elements.
ValidQ does not check the coherence of the elements but the validity of the individual elements.
Check if we have a valid element
The ValidQ check the invariant of type of the argument you provide. However you can check if some object is also valid for another class.
The class invariant can be viewed, which should give you some intuition.
The invariant of an class is a set of Boolean functions
Sometimes you want to mold your own data into a Lie Analysis class so you can use it with our functions. I suggest you check the documentation of the specific class you wish to use (for example ObjPositionOrientationData)
Lie Analysis objects are functions take take a list of rules which contain the elements
Create Your Own Classes
Although this is out of the scope of the package I will shortly show you how to create your own class. This could be useful when you define your own functions. Lets say we want a object for a new kind of wavelet for 2D images.
The available functions to work with classes are in the Classes` context
Define ObjNewWavelet to contain the new wavelet
Now we have declared a new wavelet that has the parent ObjWavelet. Thus ObjNewWavelet contains all elements and properties from ObjWavelet. We can examine our new empty wavelet object by simply calling it.
Show our just created new class
Objects are valid if their Invariant is maintained. To see which invariants are specified for an object request the property "Invariant".
Show the already specified invariants
We could extend and tighten the invariant by specifying new ones. For example we could state that the data needs to be a 3D dimensional array.
Specify new Invariant, do not forget to include the default value (Automatic in this case)
It is also possible to add new elements to the object (this can also be done for already existing objects). Adding a new element requires that you also assign a default value.
It is also a good idea to specify an invariant to this element, so that you are sure the object works with the functions you are going to use it.
Declare invariant for NewElement and test if the invariant works
Processing On 2D Images
Processing On 3D Images