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

Function MakeNewImage2D

src/gui/MakeNewSystem.cpp:60–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58// ---------------------------------------------------------------------
59
60unique_ptr<AbstractRD> MakeNewImage2D(const bool is_opencl_available, const int opencl_platform, const int opencl_device, Properties& render_settings)
61{
62 // perhaps at some point we will want this to be determined by the user
63 const int data_type = VTK_FLOAT;
64
65 wxBusyCursor busy;
66 unique_ptr<ImageRD> image_sys;
67 if (is_opencl_available)
68 image_sys = make_unique<FormulaOpenCLImageRD>(opencl_platform, opencl_device, data_type);
69 else
70 image_sys = make_unique<GrayScottImageRD>();
71 image_sys->SetDimensionsAndNumberOfChemicals(128, 128, 1, 2);
72 render_settings.GetProperty("active_chemical").SetChemical("b");
73 wxMessageBox(_("Created a 128x128x1 image. The dimensions can be edited in the Info Pane."));
74 return image_sys;
75}
76
77// ---------------------------------------------------------------------
78

Callers 1

OnNewPatternMethod · 0.85

Calls 2

SetChemicalMethod · 0.80

Tested by

no test coverage detected