
exportClasses(colorSpec)

## methods for class colorSpec
S3method(numSpectra,colorSpec)
S3method(numWavelengths,colorSpec)
S3method(organization,colorSpec)
S3method("organization<-",colorSpec)
S3method(coredata,colorSpec)
S3method(as.matrix,colorSpec)
S3method(as.data.frame,colorSpec)
S3method(extradata,colorSpec)
S3method("extradata<-",colorSpec)
S3method(wavelength,colorSpec)
S3method("wavelength<-",colorSpec)
S3method(type,colorSpec)
S3method(quantity,colorSpec)
S3method("quantity<-",colorSpec)
S3method(specnames,colorSpec)
S3method("specnames<-",colorSpec)
S3method(metadata,colorSpec)
S3method("metadata<-",colorSpec)
S3method(is.regular,colorSpec)
S3method(step.wl,colorSpec)
S3method(bind,colorSpec)
S3method(resample,colorSpec)
S3method(subset,colorSpec)
S3method(mean,colorSpec)
S3method(normalize,colorSpec)
S3method(linearize,colorSpec)
S3method(chop,colorSpec)
S3method(multiply,colorSpec)
S3method(applyspec,colorSpec)
S3method(convolvewith,colorSpec)
S3method(plot,colorSpec)
S3method(print,colorSpec)
S3method(summary,colorSpec)
S3method(product,colorSpec)
S3method(calibrate,colorSpec)
S3method(computeCCT,colorSpec)
S3method(computeCRI,colorSpec)
S3method(computeSSI,colorSpec)
S3method(radiometric,colorSpec)
S3method(is.radiometric,colorSpec)
S3method(actinometric,colorSpec)
S3method(is.actinometric,colorSpec)
S3method(photometric,colorSpec)
S3method(probeOptimalColors,colorSpec)
S3method(canonicalOptimalColors,colorSpec)
S3method(sectionOptimalColors,colorSpec)
S3method(plotOptimals3D,colorSpec)
S3method(plotOptimals2D,colorSpec)
S3method(computeADL,colorSpec)
S3method(interpolate,colorSpec)
S3method(ptransform,colorSpec)
S3method(emulate,colorSpec)      
S3method(invert,colorSpec)
S3method(responsivityMetrics,colorSpec)
S3method(bandRepresentation,colorSpec)

S3method(as.colorSpec,default)     

export(numSpectra, 
    numWavelengths, 
    organization, 
    "organization<-",
    coredata,
    extradata,
    "extradata<-",
    wavelength,
    "wavelength<-",
    type,
    quantity,
    "quantity<-",
    specnames,
    "specnames<-",
    metadata,
    "metadata<-",
    is.regular,
    is.colorSpec,
    as.colorSpec,
#   isValid,
    step.wl,
    product,
    calibrate,    
    normalize,
    linearize,
    chop,        
    multiply,
    bind,
    resample,
    applyspec,
    convolvewith,
    computeCCT,
    computeCRI,    
    computeSSI,
    radiometric,
    is.radiometric,    
    actinometric,
    is.actinometric,    
    photometric,
    probeOptimalColors,
    canonicalOptimalColors,    
    sectionOptimalColors,    
    plotOptimals3D,
    plotOptimals2D,    
    computeADL,
    interpolate,
    ptransform,
    emulate,
    invert,
    responsivityMetrics,
    bandRepresentation    
    )
    
#   functions that are already generic, for S3 classes    
export( 
    subset.colorSpec,
    mean.colorSpec,
    as.matrix.colorSpec,
    as.data.frame.colorSpec,    
    print.colorSpec,
    summary.colorSpec,
    plot.colorSpec
    )
    


export( colorSpec )
export( 
    readSpectra,
    readSpectraControl,
    readSpectraXYY,
    readSpectraSpreadsheet,
#   readSpectraExcel,
    readSpectrumScope,
    readSpectraCGATS,
    readCGATS    
    )
    
#   spectra with an equation    
export(
    erythemalSpectrum,
    neutralMaterial,
    rectangularMaterial,
    bandMaterial,
    lensAbsorbance,
    planckSpectra,
    daylightSpectra,
    illuminantE,
    atmosTransmittance
    )
    
#export(
#   daylightLocus,
#    CCTfromXYZ,
#    CCTfromxy,
#    CCTfromuv
#    )
    
# export(plotPatchesRGB)
export(DisplayRGBfromLinearRGB)
export(RGBfromXYZ)
export(officialXYZ)


export(cs.options)

# importFrom( MASS, ginv )
# importFrom( spacesXYZ, CCTfromXYZ, standardXYZ )
importFrom( grDevices, colorRampPalette, rgb, rainbow )
importFrom( graphics, abline, grid, legend, lines,
             lines.default, par, plot, plot.default, plot.new,
             plot.window, points, points.default, polygon,
             rect, text, title, axTicks, strwidth, strheight, segments )
importFrom( stats ,  approx, coef, lm, loess, predict,
             runif, spline, splinefun, rnorm )
importFrom( utils, capture.output, flush.console, modifyList,
             object.size, read.table, write.table, str, type.convert )
#importFrom( rootSolve, multiroot )
#   importFrom( minpack.lm, nls.lm )  was used in CCTfromuv() but no longer
# importFrom( spacesRGB, SignalRGBfromLinearRGB )