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

Function MakeNewImage3D

src/gui/MakeNewSystem.cpp:79–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77// ---------------------------------------------------------------------
78
79unique_ptr<AbstractRD> MakeNewImage3D(const bool is_opencl_available, const int opencl_platform, const int opencl_device, Properties& render_settings)
80{
81 // perhaps at some point we will want this to be determined by the user
82 const int data_type = VTK_FLOAT;
83
84 wxBusyCursor busy;
85 unique_ptr<ImageRD> image_sys;
86 if (is_opencl_available)
87 image_sys = make_unique<FormulaOpenCLImageRD>(opencl_platform, opencl_device, data_type);
88 else
89 image_sys = make_unique<GrayScottImageRD>();
90 image_sys->SetDimensionsAndNumberOfChemicals(32, 32, 32, 2);
91 render_settings.GetProperty("active_chemical").SetChemical("b");
92 wxMessageBox(_("Created a 32x32x32 image. The dimensions can be edited in the Info Pane."));
93 return image_sys;
94}
95
96// ---------------------------------------------------------------------
97

Callers 1

OnNewPatternMethod · 0.85

Calls 2

SetChemicalMethod · 0.80

Tested by

no test coverage detected