advancedusfusion.h 4.27 KB
Newer Older
1
2
3
4
// ================================================================================================
// 
// This file is part of the CAMPVis Software Framework.
// 
5
// If not explicitly stated otherwise: Copyright (C) 2012-2014, all rights reserved,
6
7
//      Christian Schulte zu Berge <christian.szb@in.tum.de>
//      Chair for Computer Aided Medical Procedures
8
9
//      Technische Universitaet Muenchen
//      Boltzmannstr. 3, 85748 Garching b. Muenchen, Germany
10
// 
11
12
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
// 
13
14
15
16
// 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
17
// 
18
19
20
21
// 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.
22
23
24
25
26
27
28
29
30
31
32
// 
// ================================================================================================

#ifndef ADVANCEDUSFUSION_H__
#define ADVANCEDUSFUSION_H__

#include <string>

#include "core/pipeline/abstractprocessordecorator.h"
#include "core/pipeline/visualizationprocessor.h"
#include "core/properties/datanameproperty.h"
33
#include "core/properties/floatingpointproperty.h"
34
35
#include "core/properties/genericproperty.h"
#include "core/properties/numericproperty.h"
36
#include "core/properties/optionproperty.h"
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "core/properties/transferfunctionproperty.h"

namespace tgt {
    class Shader;
}

namespace campvis {
    class ImageData;

    /**
     * Extracts a slice from a 3D image and renders it into a rendertarget.
     */
    class AdvancedUsFusion : public VisualizationProcessor, public HasProcessorDecorators {
    public:
        /**
         * Constructs a new AdvancedUsFusion Processor
         **/
54
        AdvancedUsFusion(IVec2Property* viewportSizeProp);
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

        /**
         * Destructor
         **/
        virtual ~AdvancedUsFusion();

        /// \see AbstractProcessor::init
        virtual void init();

        /// \see AbstractProcessor::deinit
        virtual void deinit();

        /// \see AbstractProcessor::getName()
        virtual const std::string getName() const { return "AdvancedUsFusion"; };
        /// \see AbstractProcessor::getDescription()
        virtual const std::string getDescription() const { return "Extracts a single slice from the input image and renders it using a transfer function."; };
71
72
73
        /// \see AbstractProcessor::getAuthor()
        virtual const std::string getAuthor() const { return "Christian Schulte zu Berge <christian.szb@in.tum.de>"; };
        /// \see AbstractProcessor::getProcessorState()
74
        virtual ProcessorState getProcessorState() const { return AbstractProcessor::EXPERIMENTAL; };
75
76

        DataNameProperty p_usImageId;                  ///< image ID for input image
77
        DataNameProperty p_blurredImageId;
78
79
80
81
82
83
        DataNameProperty p_gradientImageID;
        DataNameProperty p_confidenceImageID;
        DataNameProperty p_targetImageID;                  ///< image ID for output image

        IntProperty p_sliceNumber;                       ///< number of the slice to extract
        TransferFunctionProperty p_transferFunction;     ///< Transfer function
84
        TransferFunctionProperty p_confidenceTF;         ///< Transfer function confidence to uncertainty
85
        GenericOptionProperty<std::string> p_view;
86
        FloatProperty p_blurredScaling;
87
88
        FloatProperty p_confidenceScaling;
        FloatProperty p_hue;
89
        BoolProperty p_use3DTexture;
90
91

    protected:
92
93
        /// \see AbstractProcessor::updateResult
        virtual void updateResult(DataContainer& dataContainer);
94
        /// adapts the range of the p_sliceNumber property to the image
95
        virtual void updateProperties(DataContainer dc);
96

97
98
        std::string generateHeader() const;

99
100
101
102
103
104
105
106
        tgt::Shader* _shader;                           ///< Shader for slice rendering

        static const std::string loggerCat_;
    };

}

#endif // ADVANCEDUSFUSION_H__