/** * <summary>Converts the color point to an LMS cones stimulous value.</summary> */ public virtual LMS ToLMS(LMSStrategy strategy = LMSStrategy.Bradford) { if (DataSource is LMS) { // TODO: Check other LMS-related TODOs... return(DataSource as LMS); } return(ToCIEXYZ().ToLMS(strategy)); }
/** * <summary>Converter method that allows chosing the conversion strategy.</summary> * <param name="strategy">Strategy to choose which conversion matrix we apply.</param> */ public CIEXYZ ToCIEXYZ(LMSStrategy strategy) { if (DataSource is CIEXYZ) { // TODO : Check chromatic adaptation, depends on "connecting" the ASimpleColor class // TODO : Add historic data about strategy because here we don't know the "applied" strategy return(DataSource as CIEXYZ); } if (strategy == LMSStrategy.Bradford) { return(BradfordTransform()); } if (strategy == LMSStrategy.VonKries) { return(VonKriesTransform()); } throw new NotImplementedException(); }
/** * <inheritdoc /> */ public override LMS ToLMS(LMSStrategy strategy = LMSStrategy.Bradford) { LMS lmsDS = DataSource as LMS; if (lmsDS != null) { // TODO : Check chromatic adaptation, depends on "connecting" the ASimpleColor class // TODO : Use the added historic data about strategy in LMS... return(lmsDS); } if (strategy == LMSStrategy.Bradford) { return(BradfordTransform()); } if (strategy == LMSStrategy.VonKries) { return(VonKriesTransform()); } throw new NotImplementedException(); }
/** * <inheritdoc /> */ public override LMS ToLMS(LMSStrategy strategy=LMSStrategy.Bradford) { LMS lmsDS = DataSource as LMS; if (lmsDS != null) { // TODO : Check chromatic adaptation, depends on "connecting" the ASimpleColor class // TODO : Use the added historic data about strategy in LMS... return lmsDS; } if (strategy == LMSStrategy.Bradford) { return BradfordTransform (); } if (strategy == LMSStrategy.VonKries) { return VonKriesTransform (); } throw new NotImplementedException (); }
/** * <summary>Converter method that allows chosing the conversion strategy.</summary> * <param name="strategy">Strategy to choose which conversion matrix we apply.</param> */ public CIEXYZ ToCIEXYZ(LMSStrategy strategy) { if (DataSource is CIEXYZ) { // TODO : Check chromatic adaptation, depends on "connecting" the ASimpleColor class // TODO : Add historic data about strategy because here we don't know the "applied" strategy return DataSource as CIEXYZ; } if (strategy == LMSStrategy.Bradford) { return BradfordTransform (); } if (strategy == LMSStrategy.VonKries) { return VonKriesTransform (); } throw new NotImplementedException (); }