cudaconfidencemapsdemo.cpp 21.6 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// ================================================================================================
// 
// This file is part of the CAMPVis Software Framework.
// 
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
//      Christian Schulte zu Berge <christian.szb@in.tum.de>
//      Chair for Computer Aided Medical Procedures
//      Technische Universitaet Muenchen
//      Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
// 
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
// 
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file 
// except in compliance with the License. You may obtain a copy of the License at
// 
// http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software distributed under the 
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
// either express or implied. See the License for the specific language governing permissions 
// and limitations under the License.
// 
// ================================================================================================

#include "cudaconfidencemapsdemo.h"

27
28
29
30
#include <iomanip>
#include <sstream>
#include <QDateTime>
#include <QDir>
31
32
#include <QClipboard>
#include <QApplication>
33
34
35
36
37
38

#ifdef CAMPVIS_HAS_MODULE_DEVIL
#include <IL/il.h>
#include <IL/ilu.h>
#endif

39
#include "core/datastructures/imagedata.h"
40
#include "core/datastructures/imagerepresentationgl.h"
41
42
#include "core/classification/geometry1dtransferfunction.h"
#include "core/classification/tfgeometry1d.h"
43
#include "cgt/event/keyevent.h"
44
45
46

namespace campvis {

47
48
49
50
    CudaConfidenceMapsDemo::CudaConfidenceMapsDemo(DataContainer* dc)
        : AutoEvaluationPipeline(dc)
        , _usIgtlReader()
        , _usCropFilter(&_canvasSize)
51
        , _usPreBlur(&_canvasSize)
52
        , _usBlurFilter(&_canvasSize)
53
        , _usResampler(&_canvasSize)
54
        , _usMapsSolver()
55
        , _usFusion(&_canvasSize)
56
        , _usFanRenderer(&_canvasSize)
57
58
59
        , p_useFixedIterationCount("UseFixedIterationCount", "Use Fixed Iteration Count", false)
        , p_millisecondBudget("MillisecondBudget", "(P)CG Milliseconds per frame", 24.0f, 10.0f, 60.0f)
        , p_iterationBudget("IterationBudget", "(P)CG Iteration Count", 100, 0, 1000)
60
        , p_connectDisconnectButton("ConnectToIGTLink", "Connect/Disconnect")
Declara Denis's avatar
Declara Denis committed
61
62
        , p_resamplingScale("ResampleScale", "Resample Scale", 0.5f, 0.01f, 1.0f)
        , p_beta("Beta", "Beta", 80.0f, 1.0f, 200.0f)
63
		, p_resetToDefault("ResetToDefault", "Reset Settings to Default")
64
65
        , p_collectStatistics("CollectStatistics", "Collect Statistics", false)
        , p_copyStatisticsToClipboard("CopyStatisticsToClipboard", "Copy Statistics To Clipboard as CSV")
66
67
68
        , p_showAdvancedOptions("ShowAdvancedOptions", "Advanced options...", false)
        , p_useAlphaBetaFilter("UseAlphaBetaFilter", "Alpha-Beta-Filter", true)
        , p_gaussianFilterSize("GaussianSigma", "Blur amount", 2.5f, 1.0f, 10.0f)
Declara Denis's avatar
Declara Denis committed
69
        , p_gradientScaling("GradientScaling", "Scaling factor for gradients", 2.0f, 0.001, 10)
70
        , p_alpha("Alpha", "Alpha", 2.0f, 0.0f, 10.0f)
71
        , p_gamma("Gamma", "Gamma", 0.05f, 0.0f, 0.4f, 0.001, 4)
72
        , p_fanHalfAngle("FanHalfAngle", "Fan Half Angle", 28.0f, 1.0f, 90.0f)
73
        , p_fanInnerRadius("FanInnerRadius", "Fan Inner Radius", 0.222f, 0.001f, 0.999f)
74
        , p_useSpacingEncodedFanGeometry("UseSpacingEncodedFanGeomtry", "Use spacing encoded fan geometry", true)
75
76
77
        , p_recordingDirectory("RecordingDirectory", "Recording output direcotry", "D:\\us_acquisitions\\")
        , p_enableRecording("EnableRecording", "Enable recording", false)
        , _recordedFrames(0)
Declara Denis's avatar
Declara Denis committed
78
        , _statisticsLastUpdateTime()
79
    {
80
81
82
        // Calculate file prefix, using date, hour, minute and second of when the pipeline was created
        _filePrefix = QDateTime::currentDateTime().toString("yyyyMMdd_hhmmss_").toStdString();

83
84
        addProcessor(&_usIgtlReader);
        addProcessor(&_usCropFilter);
85
        addProcessor(&_usPreBlur);
86
        addProcessor(&_usBlurFilter);
87
        addProcessor(&_usResampler);
88
        addProcessor(&_usMapsSolver);
89
        addProcessor(&_usFusion);
90
        addProcessor(&_usFanRenderer);
91

92
        addProperty(p_useFixedIterationCount);
93
        addProperty(p_millisecondBudget);
94
        addProperty(p_iterationBudget);
95
        addProperty(p_connectDisconnectButton);
96
        addProperty(p_resamplingScale);
97
        addProperty(p_beta);
98
		addProperty(p_resetToDefault);
99
100
        addProperty(p_collectStatistics);
        addProperty(p_copyStatisticsToClipboard);
101
102
103
104
105

        addProperty(p_showAdvancedOptions);

        addProperty(p_useAlphaBetaFilter);
        addProperty(p_gaussianFilterSize);
Declara Denis's avatar
Declara Denis committed
106
        addProperty(p_gradientScaling);
107
108
109
110
        addProperty(p_alpha);
        addProperty(p_gamma);
        addProperty(p_fanHalfAngle);
        addProperty(p_fanInnerRadius);
111
112
113
        addProperty(p_recordingDirectory);
        addProperty(p_enableRecording);

114
115
        addProperty(p_useSpacingEncodedFanGeometry);

116
        setAdvancedPropertiesVisibility(false);
117

118
119
120
        _canvasSize.setVisible(false);
        _renderTargetID.setVisible(false);

121
122
123
        // Reserve memory for statistics, so that (hopefully) no reallocation happens at runtime
        _statistics.reserve(1000);
        _objectCreationTime = tbb::tick_count::now();
124
125
126
127
128
129
130
131
    }

    CudaConfidenceMapsDemo::~CudaConfidenceMapsDemo() {
    }

    void CudaConfidenceMapsDemo::init() {
        AutoEvaluationPipeline::init();

132
        // Set intial options
133
134
135
        _usIgtlReader.p_receiveImages.setValue(true);
        _usIgtlReader.p_receiveTransforms.setValue(false);
        _usIgtlReader.p_receivePositions.setValue(false);
136
        _usResampler.p_resampleScale.setValue(0.25f);
137
138
139
140
        // Set transfer function
        Geometry1DTransferFunction* tf = new Geometry1DTransferFunction(256);
        tf->addGeometry(TFGeometry1D::createQuad(cgt::vec2(0.0f, 0.5f), cgt::col4(0, 0, 0, 255), cgt::col4(0, 0, 0, 0)));
        _usFusion.p_confidenceTF.replaceTF(tf);
141
142

        // Create connectors
143
144
        _usIgtlReader.p_targetImagePrefix.setValue("us.igtl.");

145
        _usCropFilter.p_inputImage.setValue("us.igtl.CAMPUS");
146
147
148
149
150
        _usCropFilter.p_outputImage.setValue("us.cropped");

        _usPreBlur.p_inputImage.setValue("us.cropped");
        _usPreBlur.p_outputImage.setValue("us");
        _usPreBlur.p_sigma.setValue(.6f);
151
152

        _usBlurFilter.p_inputImage.setValue("us");
153
        _usBlurFilter.p_outputImage.setValue("us.blurred");
154
155
        _usBlurFilter.p_outputImage.addSharedProperty(&_usResampler.p_inputImage);
        _usBlurFilter.p_outputImage.addSharedProperty(&_usFusion.p_blurredImageId);
156

157
158
        _usResampler.p_outputImage.setValue("us.resampled");
        _usResampler.p_outputImage.addSharedProperty(&_usMapsSolver.p_inputImage);
159

160
        _usMapsSolver.p_outputConfidenceMap.setValue("us.confidence");
161
162
        _usMapsSolver.p_outputConfidenceMap.addSharedProperty(&_usFusion.p_confidenceImageID);

163
        _usFusion.p_usImageId.setValue("us");
164
165
        _usFusion.p_targetImageID.setValue("us.fusion");
        _usFusion.p_view.setValue(12);
166
167
        _usFusion.p_renderToTexture.setValue(true);
        _usFusion.p_targetImageID.addSharedProperty(&_usFanRenderer.p_inputImage);
168
169
        _usFusion.p_transferFunction.setAutoFitWindowToData(false);
        _usFusion.p_confidenceTF.setAutoFitWindowToData(false);
170

171
172
173
174
175
        _usFanRenderer.p_renderTargetID.setValue("us.fused_fan");
        _usFanRenderer.p_innerRadius.setValue(120.0f/540.0f);
        _usFanRenderer.p_halfAngle.setValue(37);

        _renderTargetID.setValue("us.fused_fan");
176

177
        // Bind buttons to event handlers
178
        p_connectDisconnectButton.s_clicked.connect(this, &CudaConfidenceMapsDemo::toggleIGTLConnection);
179
		p_resetToDefault.s_clicked.connect(this, &CudaConfidenceMapsDemo::resetSettingsToDefault);
180
181
182
183
184
185
        p_copyStatisticsToClipboard.s_clicked.connect(this, &CudaConfidenceMapsDemo::copyStatisticsToClipboard);

        // Bind pipeline proeprties to processor properties
        p_useFixedIterationCount.addSharedProperty(&_usMapsSolver.p_useFixedIterationCount);
        p_millisecondBudget.addSharedProperty(&_usMapsSolver.p_millisecondBudget);
        p_iterationBudget.addSharedProperty(&_usMapsSolver.p_iterationBudget);
186

187
188
        p_gaussianFilterSize.addSharedProperty(&_usBlurFilter.p_sigma);
        p_resamplingScale.addSharedProperty(&_usResampler.p_resampleScale);
Declara Denis's avatar
Declara Denis committed
189
        p_gradientScaling.addSharedProperty(&_usMapsSolver.p_gradientScaling);
190
191
192
193
194
195
        p_alpha.addSharedProperty(&_usMapsSolver.p_paramAlpha);
        p_beta.addSharedProperty(&_usMapsSolver.p_paramBeta);
        p_gamma.addSharedProperty(&_usMapsSolver.p_paramGamma);
        p_useAlphaBetaFilter.addSharedProperty(&_usMapsSolver.p_useAlphaBetaFilter);
        p_fanHalfAngle.addSharedProperty(&_usFanRenderer.p_halfAngle);
        p_fanInnerRadius.addSharedProperty(&_usFanRenderer.p_innerRadius);
196
197
198
199
200
201
    }

    void CudaConfidenceMapsDemo::deinit() {
        AutoEvaluationPipeline::deinit();
    }

202
    void CudaConfidenceMapsDemo::executePipeline() {
203
204
205
206
207
208
        // Only launch the pipeline if the IgtlReader has recieved new data
        // FIXME: It would be better to check if a new image actually arrived, instead
        // of just checking the invaildation state of the IGTLReader
        if (!_usIgtlReader.isValid()) {
            auto startTime = tbb::tick_count::now();

209
            // Make sure that the whole pipeline gets invalidated and executed
210
211
212
213
214
215
216
            _usBlurFilter.invalidate(AbstractProcessor::INVALID_RESULT);
            _usCropFilter.invalidate(AbstractProcessor::INVALID_RESULT);
            _usResampler.invalidate(AbstractProcessor::INVALID_RESULT);
            _usMapsSolver.invalidate(AbstractProcessor::INVALID_RESULT);
            _usFusion.invalidate(AbstractProcessor::INVALID_RESULT);
            executeProcessorAndCheckOpenGLState(&_usIgtlReader);
            executeProcessorAndCheckOpenGLState(&_usCropFilter);
217
218
            executeProcessorAndCheckOpenGLState(&_usPreBlur);
            executeProcessorAndCheckOpenGLState(&_usBlurFilter);
219
220
221
            executeProcessorAndCheckOpenGLState(&_usResampler);
            executeProcessorAndCheckOpenGLState(&_usMapsSolver);

222
223
224
225
226
227
228
229
230
231
232
            // Read fan geomtry from encoded image...
            if (p_useSpacingEncodedFanGeometry.getValue()) {
                ImageRepresentationGL::ScopedRepresentation img(*_data, _usCropFilter.p_inputImage.getValue());
                auto image = reinterpret_cast<const ImageData*>(_data->getData(_usCropFilter.p_inputImage.getValue()).getData());
                if (image != nullptr) {
                    cgt::vec3 encodedData = image->getMappingInformation().getVoxelSize();
                    p_fanHalfAngle.setValue(encodedData.x / 2.0f);
                    p_fanInnerRadius.setValue(encodedData.y);
                }
            }

233
234
            executeProcessorAndCheckOpenGLState(&_usFusion);
            executeProcessorAndCheckOpenGLState(&_usFanRenderer);
235
                
236
237
238
239
240
241
            auto endTime = tbb::tick_count::now();

            if ((startTime - _statisticsLastUpdateTime).seconds() > 0.5f) {
                _statisticsLastUpdateTime = startTime;

                auto ms = (endTime - startTime).seconds() * 1000.0f;
242
                auto solverMs = _usMapsSolver.getActualSolverExecutionTime();
243
                std::stringstream string;
244
                string << "Mode: " << _usFusion.p_view.getOptionValue() << std::endl;
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
                string << "Execution time: " << static_cast<int>(ms) << "ms" << std::endl;
                string << "Solver time: " << static_cast<int>(solverMs) << "ms" << std::endl;
                string << "CG Iterations: " << _usMapsSolver.getActualConjugentGradientIterations() << std::endl;
                string << "Error: " << _usMapsSolver.getResidualNorm() << std::endl;
                _usFanRenderer.p_text.setValue(string.str());
            }

            if (p_enableRecording.getValue()) {
                _recordedFrames++;
                QDir dir(QString::fromStdString(p_recordingDirectory.getValue()));
                std::stringstream filename;
                filename << _filePrefix << std::setw(4) << std::setfill('0') << _recordedFrames << ".png";
                auto url = dir.absoluteFilePath(QString::fromStdString(filename.str())).toStdString();

                ScopedTypedData<ImageData> rd(*_data, "us");
                const ImageRepresentationGL *rep = rd->getRepresentation<ImageRepresentationGL>();
                if (rep != 0) {
#ifdef CAMPVIS_HAS_MODULE_DEVIL
                    if (!cgt::FileSystem::dirExists(dir.absolutePath().toStdString()))
                        cgt::FileSystem::createDirectory(dir.absolutePath().toStdString());

                    // get color buffer content
                    GLubyte* colorBuffer = rep->getTexture()->downloadTextureToBuffer(GL_RED, GL_UNSIGNED_BYTE);
                    cgt::ivec2 size = rep->getSize().xy();

                    // create Devil image from image data and write it to file
                    ILuint img;
                    ilGenImages(1, &img);
                    ilBindImage(img);

                    // put pixels into IL-Image
                    ilTexImage(size.x, size.y, 1, 1, GL_LUMINANCE, IL_UNSIGNED_BYTE, colorBuffer);
                    ilEnable(IL_FILE_OVERWRITE);
                    ilResetWrite();
                    ILboolean success = ilSaveImage(url.c_str());
                    ilDeleteImages(1, &img);

                    delete[] colorBuffer;

                    if (!success) {
                        LERROR("Could not save image to file: " << ilGetError());
                    }
#endif
288
289
                }
            }
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322

            // Collect statistics
            if (p_collectStatistics.getValue()) {
                StatisticsEntry entry;
                entry.time = (startTime - _objectCreationTime).seconds() * 1000.0f;

                ImageRepresentationGL::ScopedRepresentation originalImage(*_data, _usCropFilter.p_outputImage.getValue());
                ImageRepresentationGL::ScopedRepresentation downsampledImage(*_data, _usResampler.p_outputImage.getValue());

                if (originalImage && downsampledImage) {
                    entry.originalWidth = originalImage->getSize().x;
                    entry.originalHeight = originalImage->getSize().y;
                    entry.downsampledWidth = downsampledImage->getSize().x;
                    entry.downsampledHeight = downsampledImage->getSize().y;
                } else {
                    LWARNING("Could not read image size");
                    entry.originalWidth = entry.originalHeight = -1;
                    entry.downsampledWidth = entry.downsampledHeight = -1;
                }

                entry.gaussianKernelSize = _usBlurFilter.p_sigma.getValue();
                entry.scalingFactor = _usResampler.p_resampleScale.getValue();
                entry.alpha = _usMapsSolver.p_paramAlpha.getValue();
                entry.beta = _usMapsSolver.p_paramBeta.getValue();
                entry.gamma = _usMapsSolver.p_paramGamma.getValue();
                entry.gradientScaling = _usMapsSolver.p_gradientScaling.getValue();
                entry.iterations = _usMapsSolver.getActualConjugentGradientIterations();
                entry.solverExecutionTime = _usMapsSolver.getActualSolverExecutionTime();
                entry.totalExecutionTime = (endTime - startTime).seconds() * 1000.0f;
                entry.solverError = _usMapsSolver.getResidualNorm();

                _statistics.push_back(entry);
            }
323
324
325
        }
    }

326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
    void CudaConfidenceMapsDemo::onEvent(cgt::Event* e) {
        // Allow for rapid switching between different visualizations
        //  F1: Ultrasound only
        //  F2: Sharpness
        //  F3: LAB
        //  F4: Color overlay
        //  F5: CM only
        if (typeid(*e) == typeid(cgt::KeyEvent)) {
            cgt::KeyEvent *keyEvent = reinterpret_cast<cgt::KeyEvent*>(e);
            if (keyEvent == nullptr) return;

            if (keyEvent->pressed()) {
                bool eventHandled = true;
                switch (keyEvent->keyCode()) {
                case cgt::KeyEvent::K_F1:
                    _usFusion.p_view.setValue(0); // US only
                    break;
                case cgt::KeyEvent::K_F2:
                    _usFusion.p_view.setValue(10); // Sharpness
                    {
                        Geometry1DTransferFunction* tf = new Geometry1DTransferFunction(256);
                        tf->addGeometry(TFGeometry1D::createQuad(cgt::vec2(0.0f, 1.0f), cgt::col4(0, 0, 0, 255), cgt::col4(0, 0, 0, 0)));
                        _usFusion.p_confidenceTF.replaceTF(tf);
                    }
                    break;
                case cgt::KeyEvent::K_F3:
                    _usFusion.p_view.setValue(8); // LAB
                    {
                        Geometry1DTransferFunction* tf = new Geometry1DTransferFunction(256);
355
                        tf->addGeometry(TFGeometry1D::createQuad(cgt::vec2(0.0f, 0.5f), cgt::col4(0, 0, 0, 192), cgt::col4(0, 0, 0, 0)));
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
                        _usFusion.p_confidenceTF.replaceTF(tf);
                        _usFusion.p_hue.setValue(0.23f);
                    }
                    break;
                case cgt::KeyEvent::K_F4:
                    _usFusion.p_view.setValue(12); // Color overlay
                    {
                        Geometry1DTransferFunction* tf = new Geometry1DTransferFunction(256);
                        tf->addGeometry(TFGeometry1D::createQuad(cgt::vec2(0.0f, 0.5f), cgt::col4(0, 0, 0, 255), cgt::col4(0, 0, 0, 0)));
                        _usFusion.p_confidenceTF.replaceTF(tf);
                        _usFusion.p_hue.setValue(0.15f);
                    }
                    break;
                case cgt::KeyEvent::K_F5:
                    _usFusion.p_view.setValue(2); // CM Only
                    break;
                default:
                    eventHandled = false;
                };
                if (eventHandled) {
                    e->accept();
                    // Force HUD statistics to be updated
                    _statisticsLastUpdateTime = tbb::tick_count();
                }
            }
        }
    }

384
385
386
387
388
389
390
391
392
    void CudaConfidenceMapsDemo::onPropertyChanged(const AbstractProperty* prop) {
        if (prop == &p_showAdvancedOptions) {
            setAdvancedPropertiesVisibility(p_showAdvancedOptions.getValue());
            return;
        }
        else if (prop == &_renderTargetID && _renderTargetID.getValue() != "us.fused_fan") {
            // Prevent the program from changing the render target
            _renderTargetID.setValue("us.fused_fan");
        }
393
394
395
396
397

        bool useFixedIterationCount = p_useFixedIterationCount.getValue();
        p_millisecondBudget.setVisible(!useFixedIterationCount);
        p_iterationBudget.setVisible(useFixedIterationCount);

398
399
400
401
402
403
404
405
406
407
        AutoEvaluationPipeline::onPropertyChanged(prop);
    }

    void CudaConfidenceMapsDemo::toggleIGTLConnection() {
        // Simulate a click on the currently visible button of the IGTL reader,
        // causing it to either connect or disconnect from a server.
        if (_usIgtlReader.p_connect.isVisible())
            _usIgtlReader.p_connect.click();
        else
            _usIgtlReader.p_disconnect.click();
408
    }
409

410
411
412
413
414
415
416
417
418
	void CudaConfidenceMapsDemo::resetSettingsToDefault() {
		p_resamplingScale.setValue(.5f);
		p_gaussianFilterSize.setValue(2.5f);
		p_gradientScaling.setValue(2.f);
		p_alpha.setValue(2.f);
		p_beta.setValue(80.f);
		p_gamma.setValue(.05f);
	}

419
420
421
422
423
424
425
    void CudaConfidenceMapsDemo::copyStatisticsToClipboard() {
        // Copy statistics to the clipboard in CSV format
        std::cout << "Have " << _statistics.size() << " stats items" << std::endl;

        std::stringstream stream;
        stream << "time, originalWidth, originalHeight, downsampledWidth, downsampledHeight, gaussianKernelSize, scalingFactor, alpha, beta, gamma, gradientScaling, iterations, solverExecutionTime, totalExecutionTime, solverError" << std::endl;

426
427
        for (auto it = _statistics.begin(); it != _statistics.end(); ++it) {
            auto& item = *it;
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
            stream << item.time << ", ";
            stream << item.originalWidth << ", ";
            stream << item.originalHeight << ", ";
            stream << item.downsampledWidth << ", ";
            stream << item.downsampledHeight << ", ";
            stream << item.gaussianKernelSize << ", ";
            stream << item.scalingFactor << ", ";
            stream << item.alpha << ", ";
            stream << item.beta << ", ";
            stream << item.gamma << ", ";
            stream << item.gradientScaling << ", ";
            stream << item.iterations << ", ";
            stream << item.solverExecutionTime << ", ";
            stream << item.totalExecutionTime << ", ";
            stream << item.solverError << std::endl;
        }

        // Copy CSV stream to clipboard
        QClipboard *clipboard = QApplication::clipboard();
        QString text = QString::fromStdString(stream.str());
        clipboard->setText(text);

        _statistics.clear();
        _statistics.reserve(1000);
    }

454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
    void CudaConfidenceMapsDemo::setAdvancedPropertiesVisibility(bool visible) {
        if (p_showAdvancedOptions.getValue() != visible) {
            p_showAdvancedOptions.setValue(visible);
        }

        p_useAlphaBetaFilter.setVisible(visible);
        p_gaussianFilterSize.setVisible(visible);
        p_gradientScaling.setVisible(visible);
        p_alpha.setVisible(visible);
        p_gamma.setVisible(visible);
        p_fanHalfAngle.setVisible(visible);
        p_fanInnerRadius.setVisible(visible);
        p_recordingDirectory.setVisible(visible);
        p_enableRecording.setVisible(visible);
    }

470
}