This repository was archived by the owner on Dec 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +2
-48
lines changed Expand file tree Collapse file tree 4 files changed +2
-48
lines changed Original file line number Diff line number Diff line change 43
43
<ItemGroup >
44
44
<Reference Include =" System" />
45
45
<Reference Include =" System.Numerics" />
46
- <Reference Include =" MathNet.Numerics" >
47
- <HintPath >..\packages\MathNet.Numerics.Signed.3.5.0\lib\net40\MathNet.Numerics.dll</HintPath >
48
- </Reference >
49
46
</ItemGroup >
50
47
<ItemGroup >
51
48
<Compile Include =" Properties\AssemblyInfo.cs" />
52
- <Compile Include =" src\MatchingFunctions\AMatchingFunction.cs" />
53
49
<Compile Include =" src\MatchingFunctions\RegularMatchingFunction.cs" />
54
50
<Compile Include =" src\MatchingFunctions\TabularMatchingFunction.cs" />
55
51
<Compile Include =" src\LightSpectrums\ALightSpectrum.cs" />
86
82
<Compile Include =" src\Illuminants\CIE_D50.cs" />
87
83
<Compile Include =" src\Illuminants\CIE_D55.cs" />
88
84
<Compile Include =" src\LightSpectrums\BlackBodySpectrum.cs" />
85
+ <Compile Include =" src\MatchingFunctions\AMatchingFunction.cs" />
89
86
</ItemGroup >
90
87
<Import Project =" $(MSBuildBinPath)\Microsoft.CSharp.targets" />
91
88
<ItemGroup >
100
97
<None Include =" ColorSharp.nuspec" />
101
98
<None Include =" build_nuget_pkg.sh" />
102
99
<None Include =" colorsharp.pub" />
103
- <None Include =" packages.config" />
104
100
</ItemGroup >
105
101
</Project >
Original file line number Diff line number Diff line change 14
14
- Added new Illuminants
15
15
- Added new Matching Functions
16
16
- Improved spectrum -> color conversion mechanism
17
+ - Added black body spectrums
17
18
- Minor API breaks.
18
19
</releaseNotes >
19
20
<copyright >Copyright 2014-2015</copyright >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 27
27
*/
28
28
29
29
30
- using System ;
31
-
32
- using Litipk . ColorSharp . LightSpectrums ;
33
30
using Litipk . ColorSharp . InternalUtils ;
34
31
35
32
@@ -45,42 +42,6 @@ namespace MatchingFunctions
45
42
*/
46
43
public abstract class AMatchingFunction : IRealFunctionWithFiniteSupport
47
44
{
48
- #region shared methods
49
-
50
- /**
51
- * <summary>Applies the matching function to a spectrum to obtain a parameter of a color space.</summary>
52
- */
53
- public double DoConvolution ( ALightSpectrum lss )
54
- {
55
- double minWavelength = Math . Max ( this . GetSupportMinValue ( ) , lss . GetSupportMinValue ( ) ) ;
56
- double maxWavelength = Math . Min ( this . GetSupportMaxValue ( ) , lss . GetSupportMaxValue ( ) ) ;
57
-
58
- int numberOfPartitions ;
59
-
60
- if ( lss is AInterpolatedLightSpectrum ) {
61
- numberOfPartitions = Math . Max (
62
- this . GetNumberOfDataPoints ( ) ,
63
- ( lss as AInterpolatedLightSpectrum ) . GetNumberOfDataPoints ( )
64
- ) ;
65
- } else {
66
- numberOfPartitions = this . GetNumberOfDataPoints ( ) ;
67
- }
68
-
69
- if ( numberOfPartitions == - 1 ) {
70
- numberOfPartitions = ( ( int ) Math . Round ( maxWavelength - minWavelength ) ) + 2 ;
71
- }
72
-
73
- return MathNet . Numerics . Integration . NewtonCotesTrapeziumRule . IntegrateComposite (
74
- waveLength => this . EvaluateAt ( waveLength ) * lss . EvaluateAt ( waveLength ) ,
75
- minWavelength ,
76
- maxWavelength ,
77
- numberOfPartitions
78
- ) ;
79
- }
80
-
81
- #endregion
82
-
83
-
84
45
#region abstract methods to be implemented in subclasses
85
46
86
47
/**
You can’t perform that action at this time.
0 commit comments