public static AstroPlate FromReflectedObject(object reflObj) { var rv = new AstroPlate(); rv.m_ImageWidth = StarMap.GetPropValue <int>(reflObj, "m_ImageWidth"); rv.m_ImageHeight = StarMap.GetPropValue <int>(reflObj, "m_ImageHeight"); rv.m_MatrixToImageScaleX = StarMap.GetPropValue <double>(reflObj, "m_MatrixToImageScaleX"); rv.m_MatrixToImageScaleY = StarMap.GetPropValue <double>(reflObj, "m_MatrixToImageScaleY"); rv.EffectiveFocalLength = StarMap.GetPropValue <double>(reflObj, "EffectiveFocalLength"); rv.EffectivePixelWidth = StarMap.GetPropValue <double>(reflObj, "EffectivePixelWidth"); rv.EffectivePixelHeight = StarMap.GetPropValue <double>(reflObj, "EffectivePixelHeight"); object obj = StarMap.GetPropValue <object>(reflObj, "m_Matrix"); rv.m_Matrix = CCDMatrix.FromReflectedObject(obj); try { rv.m_BitPix = StarMap.GetPropValue <int>(reflObj, "BitPix"); } catch { rv.m_BitPix = 8; } return(rv); }
public static CCDMatrix FromReflectedObject(object reflObj) { var rv = new CCDMatrix(); rv.m_CellX = StarMap.GetPropValue <double>(reflObj, "m_CellX"); rv.m_CellY = StarMap.GetPropValue <double>(reflObj, "m_CellY"); rv.m_Width = StarMap.GetPropValue <int>(reflObj, "m_Width"); rv.m_Height = StarMap.GetPropValue <int>(reflObj, "m_Height"); return(rv); }
public static StarMapFeature FromReflectedObject(object refl) { int featureId = StarMap.GetPropValue <int>(refl, "FeatureId"); int width = StarMap.GetPropValue <int>(refl, "Width"); StarMapFeature feature = new StarMapFeature(featureId, width); feature.m_MaxBrightness = StarMap.GetPropValue <byte>(refl, "m_MaxBrightness"); feature.m_MaxBrightnessFirstKey = StarMap.GetPropValue <ulong>(refl, "m_MaxBrightnessFirstKey"); feature.m_MaxBrightnessPixels = StarMap.GetPropValue <int>(refl, "m_MaxBrightnessPixels"); feature.m_Generation = StarMap.GetPropValue <int>(refl, "m_Generation"); feature.m_Merges = StarMap.GetPropValue <int>(refl, "m_Merges"); feature.m_Intencity = StarMap.GetPropValue <uint>(refl, "m_Intencity"); feature.m_Pixels = StarMap.GetPropValue <SortedDictionary <ulong, uint> >(refl, "m_Pixels"); return(feature); }