internal static void Test() { TestParms test = TestParms.CreateParmsForLobster(); TestSpanFill(test); TestBlockSpanFill(test); }
public override void Initialize(TestParms test) { this.width = test.image.width; this.height = test.image.height; this.depth = test.image.depth; mmf = MemoryMappedFile.CreateFromFile(test.path, FileMode.OpenOrCreate, "chnhide", 120 * 1024 * 1024); accessor = mmf.CreateViewAccessor(); }
public override void Initialize(TestParms test) { test.LoadData(); allData = test.image.data; width = test.image.width; height = test.image.height; depth = test.image.depth; }
public static TestParms CreateParmsForCube() { TestParms parm = new TestParms(); parm.image = new BitMap3d(100, 100, 100, 240); parm.seed = new Int16Triple(50, 50, 50); parm.min = 0; parm.max = 255; return(parm); }
public static TestParms CreateParmsForBackPack() { TestParms parm = new TestParms(); parm.image = new BitMap3d(512, 512, 373); //parm.image.ReadRaw("D://VTKproj//backpack8.raw"); parm.path = "D://VTKproj//backpack8.raw"; parm.seed = new Int16Triple(53, 390, 160); parm.min = 46; parm.max = 255; return(parm); }
public static TestParms CreateParmsForEngine() { TestParms parm = new TestParms(); parm.image = new BitMap3d(256, 256, 128); //parm.image.ReadRaw("D://VTKproj//engine.raw"); parm.path = "D://VTKproj//engine.raw"; parm.seed = new Int16Triple(149, 44, 43); parm.min = 64; parm.max = 255; return(parm); }
public static TestParms CreateParmsForPhantom() { TestParms parm = new TestParms(); parm.image = new BitMap3d(512, 512, 442); //parm.image.ReadRaw("D://VTKproj//colon_phantom8.raw"); parm.path = "D://VTKproj//colon_phantom8.raw"; parm.seed = new Int16Triple(256, 256, 227); parm.max = 255; parm.min = 42; return(parm); }
public static TestParms CreateParmsForLobster() { TestParms parm = new TestParms(); parm.image = new BitMap3d(301, 324, 56); parm.path = "D://VTKproj//lobster.raw"; //parm.image.ReadRaw("D://VTKproj//lobster.raw"); parm.seed = new Int16Triple(124, 168, 27); parm.min = 37; parm.max = 255; return(parm); }
public static void TestSpanFill(TestParms test) { test.LoadData(); L_LargeSpanFill_Threshold ff = new L_LargeSpanFill_Threshold(); ff.SetThres(test.min, test.max); ff.ExecuteSeededGrow(new SpanFillInput( test.image.data, test.image.width, test.image.height, test.image.depth, new FlagMap3d(test.image.width, test.image.height, test.image.depth), new List <Range>(), test.seed, false, false, true) ); Console.WriteLine("SpanFill Result Count :" + ff.GetResult()); }
static void TestBlockSpanFill(TestParms test) { DataFiller_Simulation df = new DataFiller_Simulation(); df.Initialize(test); Block.SP.B_LargeSeededGrowManager_SpanFill lsg = new Block.SP.B_LargeSeededGrowManager_SpanFill(); lsg.SetScale(test.image.width, test.image.height, test.image.depth, 50, 50, 20); Block.SP.ConcreteFills.B_LargeSpanFill_Threshold ff = new Block.SP.ConcreteFills.B_LargeSpanFill_Threshold(); ff.SetThres(test.min, test.max); lsg.SetExecutor(ff); lsg.SetDataProvider(df); lsg.ExecuteSeededGrow(test.seed); Console.WriteLine("Block Based SpanFill Result Count :" + lsg.GetResult().Count); IO.WriteXYZFile(lsg.GetResult().resultSet, "test1.xyz"); }
public static void TestLayerFloodFill(TestParms test) { DataFiller_Simulation df = new DataFiller_Simulation(); df.Initialize(test); L_LargeSeededGrowManager_FloodFill lsg = new L_LargeSeededGrowManager_FloodFill(); lsg.SetScale(test.image.width, test.image.height, test.image.depth, 20); L_LargeFloodFill_Threshold ff = new L_LargeFloodFill_Threshold(); ff.SetThres(test.min, test.max); lsg.SetExecutor(ff); lsg.SetDataProvider(df); lsg.ExecuteSeededGrow(test.seed); Console.WriteLine("Layer Based FloodFill Result Count :" + lsg.resultCount); }
public static void TestFloodFill(TestParms test) { L_LargeFloodFill_Threshold ff = new L_LargeFloodFill_Threshold(); test.LoadData(); ff.SetThres(test.min, test.max); ff.ExecuteSeededGrow(new FloodFillInput( test.image.data, test.image.width, test.image.height, test.image.depth, new FlagMap3d(test.image.width, test.image.height, test.image.depth), new List <Int16Triple>() { test.seed }, false, false, true) ); Console.WriteLine("FloodFill Result Count :" + ff.GetResult()); return; }
public static void TestLayerSpanFill(TestParms test) { DataFiller df = new DataFiller_Simulation(); df.Initialize(test); L_LargeSeededGrowManager_SpanFill lsg = new L_LargeSeededGrowManager_SpanFill(); lsg.SetScale(test.image.width, test.image.height, test.image.depth, 20); L_LargeSpanFill_Threshold ff = new L_LargeSpanFill_Threshold(); ff.SetThres(test.min, test.max); lsg.SetExecutor(ff); lsg.SetDataProvider(df); lsg.ExecuteSeededGrow(test.seed); Console.WriteLine("Layer Based SpanFill Result Count :" + lsg.resultCount); //df.Close(); //IO.WriteXYZFile(lsg.resultSet, "Test1.xyz"); //return lsg.resultSet; }
public abstract void Initialize(TestParms test);