14 #ifndef ITALA_API_SMART_H 15 #define ITALA_API_SMART_H 18 #include "ItalaApi/IDevice.h" 19 #include "ItalaApi/IImage.h" 20 #include "ItalaApi/ISystem.h" 21 #include "ItalaApi/Polarization.h" 49 typedef std::shared_ptr<ISystem> SystemPtr;
50 typedef std::shared_ptr<IDevice> DevicePtr;
51 typedef std::shared_ptr<IImage> ImagePtr;
53 inline SystemPtr SmartAssign(ISystem* pSystem) {
57 inline DevicePtr SmartAssign(IDevice* pDevice) {
61 inline ImagePtr SmartAssign(IImage* pImage) {
65 struct SmartPolarComponents {
70 operator PolarComponents()
const {
return {P0.get(), P45.get(), P90.get(), P135.get()}; }
73 struct SmartPolarComponentsColor {
74 SmartPolarComponents RedComponents, GreenComponents, BlueComponents;
75 operator PolarComponentsColor()
const {
return {RedComponents, GreenComponents, BlueComponents}; }
78 struct SmartStokesVectors {
80 operator StokesVectors()
const {
return {S0.get(), S1.get(), S2.get()}; }
83 inline SmartPolarComponents SmartAssign(PolarComponents polarComponents) {
84 return {SmartAssign(polarComponents.P0), SmartAssign(polarComponents.P45),
85 SmartAssign(polarComponents.P90), SmartAssign(polarComponents.P135)};
88 inline SmartPolarComponentsColor SmartAssign(PolarComponentsColor& polarComponentsColor) {
89 return {SmartAssign(polarComponentsColor.RedComponents),
90 SmartAssign(polarComponentsColor.GreenComponents),
91 SmartAssign(polarComponentsColor.BlueComponents)};
94 inline SmartStokesVectors SmartAssign(StokesVectors stokesVector) {
95 return {SmartAssign(stokesVector.S0), SmartAssign(stokesVector.S1), SmartAssign(stokesVector.S2)};
Definition: DefectivePixel.h:23