public Globedrawer( int size, DMSImage source, Color Background, Skeleton skeleton, bool bOrthographic = true ) : base(new Size(bOrthographic?size:2*size, size), source, Background) { m_bOrthographic = bOrthographic; m_Skeleton = skeleton; m_radius = size/2; m_center = new Point2D(m_radius, m_radius); }
//optionally opt out of a source image (will print blue greens) public Globemaker( Size size, Color Background, Skeleton skeleton ) : base(size, null, Background) { m_Skeleton = skeleton; m_Target = new RectangleF((float)(m_Skeleton.GetMinPt().X - Math.PI), (float)(m_Skeleton.GetMinPt().Y - Math.PI), (float)(m_Skeleton.GetMaxPt().X - m_Skeleton.GetMinPt().X + DMS.TAU), (float)(m_Skeleton.GetMaxPt().Y - m_Skeleton.GetMinPt().Y + DMS.TAU)); }
static void Main(string[] args) { //Usage if( args.Count() != 3 && args.Count() != 2 ) { Console.WriteLine( "Usage globedrawer <SkeletonName.skl> <OutputImg> [SourceImg]\n\n" ); return; } //Read in Skeleton Skeleton skel = new Skeleton( args[0] ); //Read in Source image DMSImage source = null; if( args.Count() == 3 ) source = new DMSImage(args[2]); bool bDrawAsSphere = false; Globedrawer drawer = new Globedrawer(1500, source, Color.Gray, skel, bDrawAsSphere); DMSImage output = new DMSImage(drawer); output.Save(args[1]); }