예제 #1
0
 // Blob was selected - display its information
 private void blobsBrowser_BlobSelected(object sender, Blob blob)
 {
     propertyGrid.SelectedObject = blob;
     propertyGrid.ExpandAllGridItems();
 }
예제 #2
0
 public static Rg.Rectangle3d GetRhRect(this Ai.Blob input, int transposition = 0)
 {
     return(input.Rectangle.ToRhinoRectangle(transposition));
 }
예제 #3
0
 public static Sd.Bitmap GetBitmap(this Ai.Blob input)
 {
     return((Sd.Bitmap)input.Image.ToManagedImage().Clone());
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Blob"/> class.
 /// </summary>
 /// 
 /// <param name="source">Source blob to copy.</param>
 /// 
 /// <remarks><para>This copy constructor leaves <see cref="Image"/> property not initialized. The blob's
 /// image may be extracted later using <see cref="BlobCounterBase.ExtractBlobsImage( Bitmap, Blob, bool )"/>
 /// or <see cref="BlobCounterBase.ExtractBlobsImage( UnmanagedImage, Blob, bool )"/> method.</para></remarks>
 /// 
 public Blob(Blob source)
 {
     // copy everything except image
     id = source.id;
     rect = source.rect;
     cog = source.cog;
     area = source.area;
     fullness = source.fullness;
     colorMean = source.colorMean;
     colorStdDev = source.colorStdDev;
 }