MCPcopy Create free account
hub / github.com/GollyGang/ready / MakeNewImage1D

Function MakeNewImage1D

src/gui/MakeNewSystem.cpp:41–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39using namespace std;
40
41unique_ptr<AbstractRD> MakeNewImage1D(const bool is_opencl_available,const int opencl_platform,const int opencl_device,Properties& render_settings)
42{
43 // perhaps at some point we will want this to be determined by the user
44 const int data_type = VTK_FLOAT;
45
46 wxBusyCursor busy;
47 unique_ptr<ImageRD> image_sys;
48 if (is_opencl_available)
49 image_sys = make_unique<FormulaOpenCLImageRD>(opencl_platform, opencl_device, data_type);
50 else
51 image_sys = make_unique<GrayScottImageRD>();
52 image_sys->SetDimensionsAndNumberOfChemicals(128, 1, 1, 2);
53 render_settings.GetProperty("active_chemical").SetChemical("b");
54 wxMessageBox(_("Created a 128x1x1 image. The dimensions can be edited in the Info Pane."));
55 return image_sys;
56}
57
58// ---------------------------------------------------------------------
59

Callers 1

OnNewPatternMethod · 0.85

Calls 2

SetChemicalMethod · 0.80

Tested by

no test coverage detected