public void Show(Vector2d position) { tile = (SkyImageTile)TileCache.GetTile(0, 0, 0, layer.ImageSet, null); DivElement picker = Document.GetElementById <DivElement>("histogram"); DivElement closeBtn = Document.GetElementById <DivElement>("histogramClose"); /////////////picker.ClassName = "histogram"; picker.Style.Display = "block"; picker.Style.Left = position.X.ToString() + "px"; picker.Style.Top = position.Y.ToString() + "px"; SelectedCurveStyle = (int)image.lastScale; dropDown = Document.GetElementById <SelectElement>("ScaleTypePicker"); dropDown.AddEventListener("change", CurveStyleSelected, false); dropDown.AddEventListener("click", IgnoreMe, true); CanvasElement canvas = Document.GetElementById <CanvasElement>("graph"); canvas.AddEventListener("mousedown", MouseDown, false); canvas.AddEventListener("mousemove", mousemove, false); canvas.AddEventListener("mouseup", mouseup, false); closeBtn.AddEventListener("click", Close, true); Draw(); }
public static Tile GetNewTile(Imageset imageset, int level, int x, int y, Tile parent) { switch (imageset.Projection) { case ProjectionType.Mercator: { MercatorTile newTile = MercatorTile.Create(level, x, y, imageset, parent); return(newTile); } case ProjectionType.Equirectangular: { return(EquirectangularTile.Create(level, x, y, imageset, parent)); } //case ProjectionType.Spherical: // { // return new SphericalTile(level, x, y, imageset, parent); // } default: case ProjectionType.Toast: { return(ToastTile.Create(level, x, y, imageset, parent)); } case ProjectionType.SkyImage: { return(SkyImageTile.Create(level, x, y, imageset, parent)); } case ProjectionType.Plotted: { return(PlotTile.Create(level, x, y, imageset, parent)); } case ProjectionType.Healpix: { if (imageset.HipsProperties == null) { imageset.HipsProperties = new HipsProperties(imageset); } if (imageset.HipsProperties.DownloadComplete) { return(new HealpixTile(level, x, y, imageset, parent)); } else { return(null); } } case ProjectionType.Tangent: { TangentTile newTile = TangentTile.Create(level, x, y, imageset, parent); return(newTile); } } }
public static void UpdateScale(ImageSetLayer isl, ScaleTypes scale, double low, double hi) { FitsImage image = isl.ImageSet.WcsImage as FitsImage; SkyImageTile Tile = (SkyImageTile)TileCache.GetTile(0, 0, 0, isl.ImageSet, null); int z = image.lastBitmapZ; string colorMapperName = image.lastBitmapColorMapperName; Tile.texture2d = image.GetScaledBitmap(low, hi, scale, z, colorMapperName).GetTexture(); }
public static void UpdateImage(ImageSetLayer isl, double z) { FitsImage image = isl.ImageSet.WcsImage as FitsImage; SkyImageTile Tile = (SkyImageTile)TileCache.GetTile(0, 0, 0, isl.ImageSet, null); double low = image.lastBitmapMin; double hi = image.lastBitmapMax; Tile.texture2d = image.GetScaledBitmap(low, hi, image.lastScale, Math.Floor(z * (image.Depth - 1)), null).GetTexture(); }
public static void UpdateImage(ImageSetLayer isl, double z) { if (!RenderContext.UseGlVersion2) { FitsImageJs image = isl.ImageSet.WcsImage as FitsImageJs; SkyImageTile Tile = (SkyImageTile)TileCache.GetTile(0, 0, 0, isl.ImageSet, null); Tile.texture2d = image.GetBitmap().GetTexture(); } }
public static void UpdateColorMapper(ImageSetLayer isl, string colorMapperName) { isl.ImageSet.FitsProperties.ColorMapName = colorMapperName; if (!RenderContext.UseGlVersion2) { FitsImageJs image = isl.ImageSet.WcsImage as FitsImageJs; SkyImageTile Tile = (SkyImageTile)TileCache.GetTile(0, 0, 0, isl.ImageSet, null); Tile.texture2d = image.GetBitmap().GetTexture(); } }
public static void UpdateScale(ImageSetLayer isl, ScaleTypes scale, double low, double hi) { isl.ImageSet.FitsProperties.ScaleType = scale; isl.ImageSet.FitsProperties.LowerCut = low; isl.ImageSet.FitsProperties.UpperCut = hi; if (!RenderContext.UseGlVersion2) { FitsImageJs image = isl.ImageSet.WcsImage as FitsImageJs; SkyImageTile Tile = (SkyImageTile)TileCache.GetTile(0, 0, 0, isl.ImageSet, null); Tile.texture2d = image.GetBitmap().GetTexture(); } }
public static SkyImageTile Create(int level, int x, int y, Imageset dataset, Tile parent) { SkyImageTile temp = new SkyImageTile(); temp.Parent = parent; temp.Level = level; temp.tileX = x; temp.tileY = y; temp.dataset = dataset; temp.GetParameters(); temp.ComputeMatrix(); temp.sphereCenter = temp.GeoTo3dTan(0, 0); temp.radius = 1.25f; return temp; }
public static SkyImageTile Create(int level, int x, int y, Imageset dataset, Tile parent) { SkyImageTile temp = new SkyImageTile(); temp.Parent = parent; temp.Level = level; temp.tileX = x; temp.tileY = y; temp.dataset = dataset; temp.GetParameters(); temp.ComputeMatrix(); temp.sphereCenter = temp.GeoTo3dTan(0, 0); temp.radius = 1.25f; return(temp); }
public static Tile GetNewTile(Imageset imageset, int level, int x, int y, Tile parent) { switch (imageset.Projection) { case ProjectionType.Mercator: { MercatorTile newTile = MercatorTile.Create(level, x, y, imageset, parent); return(newTile); } case ProjectionType.Equirectangular: { return(EquirectangularTile.Create(level, x, y, imageset, parent)); } //case ProjectionType.Spherical: // { // return new SphericalTile(level, x, y, imageset, parent); // } default: case ProjectionType.Toast: { return(ToastTile.Create(level, x, y, imageset, parent)); } case ProjectionType.SkyImage: { return(SkyImageTile.Create(level, x, y, imageset, parent)); } case ProjectionType.Plotted: { return(PlotTile.Create(level, x, y, imageset, parent)); } case ProjectionType.Tangent: { TangentTile newTile = TangentTile.Create(level, x, y, imageset, parent); return(newTile); } } }