import(stats)
import(utils)
#importFrom(utils, read.table, read.csv, write.table, glob2rx, head, tail, file_test, unzip, choose.dir, choose.files, Filter)
importFrom(ggplot2, ggplot, aes_string, geom_point, geom_line, geom_ribbon, ggtitle, ggsave)
importFrom(ggplot2, coord_cartesian, annotation_custom, theme, theme_bw, xlab, ylab)
importFrom(ggplot2, facet_grid, scale_shape_manual, guides, guide_legend, expand_limits)
importFrom(ggplot2, scale_y_continuous, scale_color_grey, scale_fill_grey)
importFrom(grid, gpar, segmentsGrob, arrow, unit, grobTree)
importFrom(KernSmooth, dpill, locpoly)
importFrom(reshape2, melt)
import(shiny)

export(readDVH,
       showDVH,
       saveDVH,
       getMetric,
       saveMetric,
       readConstraint,
       checkConstraint,
       showConstraint,
       saveConstraint,
       showMeanDVH)

export(convertDVH,
       convertDVHsmooth,
       mergeDVH,
       runGUI)

export(getBED,
       getEQD2,
       getIsoEffD,
       getEUD,
       getNTCP,
       getTCP,
       getDMEAN,
       getMeanDVH)

S3method(saveMetric,       data.frame)
S3method(saveMetric,       list)
S3method(print,            DVHs)
S3method(print,            DVHLst)
S3method(print,            DVHLstLst)
S3method(getMetric,        DVHs)
S3method(getMetric,        DVHLst)
S3method(getMetric,        DVHLstLst)
S3method(checkConstraint,  DVHs)
S3method(checkConstraint,  DVHLst)
S3method(checkConstraint,  DVHLstLst)
S3method(showConstraint,   DVHs)
S3method(showConstraint,   DVHLst)
S3method(showConstraint,   DVHLstLst)
S3method(showDVH,          DVHs)
S3method(showDVH,          DVHLst)
S3method(showDVH,          DVHLstLst)
S3method(convertDVH,       matrix)
S3method(convertDVH,       DVHs)
S3method(convertDVH,       DVHLst)
S3method(convertDVH,       DVHLstLst)
S3method(convertDVHsmooth, matrix)
S3method(convertDVHsmooth, DVHs)
S3method(convertDVHsmooth, DVHLst)
S3method(convertDVHsmooth, DVHLstLst)
S3method(getNTCP,          DVHs)
S3method(getNTCP,          DVHLst)
S3method(getNTCP,          DVHLstLst)
S3method(getEUD,           DVHs)
S3method(getEUD,           DVHLst)
S3method(getEUD,           DVHLstLst)
S3method(getBED,           default)
S3method(getBED,           DVHs)
S3method(getBED,           DVHLst)
S3method(getBED,           DVHLstLst)
S3method(getIsoEffD,       default)
S3method(getIsoEffD,       DVHs)
S3method(getIsoEffD,       DVHLst)
S3method(getIsoEffD,       DVHLstLst)
S3method(getEQD2,          default)
S3method(getEQD2,          DVHs)
S3method(getEQD2,          DVHLst)
S3method(getEQD2,          DVHLstLst)
S3method(getDMEAN,         DVHs)
S3method(getDMEAN,         DVHLst)
S3method(getDMEAN,         DVHLstLst)
S3method(getMeanDVH,       DVHs)
S3method(getMeanDVH,       DVHLst)
S3method(getMeanDVH,       DVHLstLst)
