Exemplo n.º 1
0
        public void SmoothAndSave(string filename, RegionSize size, System.Drawing.Imaging.ImageFormat format, PixelFormat pixelFormat)
        {
            BSpline bs = new BSpline();

            MyCurrentPointSet3D = bs.BSpline3DofPepImage(MyOriginalPointSet3D, BmpRegion);
            SaveImage(filename, size, format, pixelFormat);
        }
Exemplo n.º 2
0
        //private EViewerHandler(List<MSPointSet3D> argMSPointSet3D)
        //{
        //    //_observers = new List<IMessageObserver>();
        //    originalPointsetLst = argMSPointSet3D;
        //    rawDataSet3DLst = argMSPointSet3D;
        //    initialize();
        //    SetColor();
        //    color_number = 180;
        //    BaseColor = 4;
        //    palette = new int[color_number, 3];

        //    for (int i = 0; i < (color_number / BaseColor); i++)
        //    {
        //        palette[i, 0] = color_number;
        //        palette[i, 1] = i * BaseColor;
        //        palette[i, 2] = 0;

        //        palette[i + color_number / BaseColor, 0] = color_number - (i * BaseColor);
        //        palette[i + color_number / BaseColor, 1] = color_number;
        //        palette[i + color_number / BaseColor, 2] = 0;

        //        palette[i + (color_number / BaseColor) * 2, 0] = 0;
        //        palette[i + (color_number / BaseColor) * 2, 1] = color_number;
        //        palette[i + (color_number / BaseColor) * 2, 2] = i * BaseColor;

        //        palette[i + (color_number / BaseColor) * 3, 0] = 0;
        //        palette[i + (color_number / BaseColor) * 3, 1] = color_number - (i * BaseColor);
        //        palette[i + (color_number / BaseColor) * 3, 2] = color_number;
        //    }

        //    smoothedSetLst = new List<MSPointSet3D>();
        //    foreach (MSPointSet3D msp3d in RawDataPointSet3DList)
        //    {
        //        BSpline BS = new BSpline();
        //        MSPointSet MSP = new MSPointSet();
        //        MSP.AddMSPoints(msp3d._x, msp3d._z);
        //        MSPointSet smoothedMSP = BS.BSpline2D(MSP, new RegionSize(MSP.X(0),MSP.X(MSP.Count-1),MSP.Y(MSP.MaxIntensityIdx),MSP.Y(MSP.MinIntensityIdx)), _bmpRegion);
        //        List<float> mz = new List<float>();
        //        for(int  i =0;i<smoothedMSP.XLst.Count;i++)
        //        {
        //            mz.Add(msp3d._y[0]);
        //        }
        //        smoothedSetLst.Add(new MSPointSet3D(smoothedMSP.XLst, mz, smoothedMSP.YLst));
        //    }
        //}
        public MSPointSet3D smoothing(MSPointSet3D current)
        {
            MSPointSet3D result3D = new MSPointSet3D();
            BSpline      BS       = new BSpline();

            result3D = BS.BSpline3DofPepImage(current, BmpRegion);
            return(result3D);
        }
Exemplo n.º 3
0
 //private EViewerHandler(List<MSPointSet3D> argMSPointSet3D)
 //{
 //    //_observers = new List<IMessageObserver>();
 //    originalPointsetLst = argMSPointSet3D;
 //    rawDataSet3DLst = argMSPointSet3D;
 //    initialize();
 //    SetColor();
 //    color_number = 180;
 //    BaseColor = 4;
 //    palette = new int[color_number, 3];
 //    for (int i = 0; i < (color_number / BaseColor); i++)
 //    {
 //        palette[i, 0] = color_number;
 //        palette[i, 1] = i * BaseColor;
 //        palette[i, 2] = 0;
 //        palette[i + color_number / BaseColor, 0] = color_number - (i * BaseColor);
 //        palette[i + color_number / BaseColor, 1] = color_number;
 //        palette[i + color_number / BaseColor, 2] = 0;
 //        palette[i + (color_number / BaseColor) * 2, 0] = 0;
 //        palette[i + (color_number / BaseColor) * 2, 1] = color_number;
 //        palette[i + (color_number / BaseColor) * 2, 2] = i * BaseColor;
 //        palette[i + (color_number / BaseColor) * 3, 0] = 0;
 //        palette[i + (color_number / BaseColor) * 3, 1] = color_number - (i * BaseColor);
 //        palette[i + (color_number / BaseColor) * 3, 2] = color_number;
 //    }
 //    smoothedSetLst = new List<MSPointSet3D>();
 //    foreach (MSPointSet3D msp3d in RawDataPointSet3DList)
 //    {
 //        BSpline BS = new BSpline();
 //        MSPointSet MSP = new MSPointSet();
 //        MSP.AddMSPoints(msp3d._x, msp3d._z);
 //        MSPointSet smoothedMSP = BS.BSpline2D(MSP, new RegionSize(MSP.X(0),MSP.X(MSP.Count-1),MSP.Y(MSP.MaxIntensityIdx),MSP.Y(MSP.MinIntensityIdx)), _bmpRegion);
 //        List<float> mz = new List<float>();
 //        for(int  i =0;i<smoothedMSP.XLst.Count;i++)
 //        {
 //            mz.Add(msp3d._y[0]);
 //        }
 //        smoothedSetLst.Add(new MSPointSet3D(smoothedMSP.XLst, mz, smoothedMSP.YLst));
 //    }
 //}
 public MSPointSet3D smoothing(MSPointSet3D current)
 {
     MSPointSet3D result3D = new MSPointSet3D();
     BSpline BS = new BSpline();
     result3D = BS.BSpline3DofPepImage(current, BmpRegion);
     return result3D;
 }
Exemplo n.º 4
0
 public void SmoothAndSave(string filename, RegionSize size, System.Drawing.Imaging.ImageFormat format, PixelFormat pixelFormat)
 {
     BSpline bs=new BSpline();
     MyCurrentPointSet3D = bs.BSpline3DofPepImage(MyOriginalPointSet3D, BmpRegion);
     SaveImage(filename, size, format, pixelFormat);
 }