Commit ff29ff68 authored by schultezub's avatar schultezub
Browse files

* added AbstractPipeline::addProcessor() and...

* added AbstractPipeline::addProcessor() and VisualizationPipeline::addEventHandler() convenience methods
* some refactoring of property names

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@344 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent d626149d
...@@ -128,4 +128,7 @@ namespace campvis { ...@@ -128,4 +128,7 @@ namespace campvis {
_enabled = enabled; _enabled = enabled;
} }
void AbstractPipeline::addProcessor(AbstractProcessor* processor) {
_processors.push_back(processor);
}
} }
...@@ -94,6 +94,12 @@ namespace campvis { ...@@ -94,6 +94,12 @@ namespace campvis {
*/ */
DataContainer& getDataContainer(); DataContainer& getDataContainer();
/**
* Adds the processors \a processor to this pipeline's processor list.
* \param processor The processor to add.
*/
void addProcessor(AbstractProcessor* processor);
/** /**
* Returns the list of processors of this pipeline. * Returns the list of processors of this pipeline.
* \return _processors * \return _processors
...@@ -147,6 +153,8 @@ namespace campvis { ...@@ -147,6 +153,8 @@ namespace campvis {
* \param processor Processor to execute. * \param processor Processor to execute.
*/ */
void executeProcessor(AbstractProcessor* processor); void executeProcessor(AbstractProcessor* processor);
DataContainer _data; ///< DataContainer containing local working set of data for this Pipeline DataContainer _data; ///< DataContainer containing local working set of data for this Pipeline
std::vector<AbstractProcessor*> _processors; ///< List of all processors of this pipeline std::vector<AbstractProcessor*> _processors; ///< List of all processors of this pipeline
......
...@@ -95,7 +95,7 @@ namespace campvis { ...@@ -95,7 +95,7 @@ namespace campvis {
tgtAssert(processor != 0, "Processor must not be 0!"); tgtAssert(processor != 0, "Processor must not be 0!");
// add processor to processor list and connect signals // add processor to processor list and connect signals
_processors.push_back(processor); VisualizationPipeline::addProcessor(processor);
processor->s_invalidated.connect<DigraphVisualizationPipeline>(this, &DigraphVisualizationPipeline::onProcessorInvalidated); processor->s_invalidated.connect<DigraphVisualizationPipeline>(this, &DigraphVisualizationPipeline::onProcessorInvalidated);
// create DependencyNode // create DependencyNode
......
...@@ -45,26 +45,26 @@ namespace campvis { ...@@ -45,26 +45,26 @@ namespace campvis {
RaycastingProcessor::RaycastingProcessor(GenericProperty<tgt::ivec2>& renderTargetSize, const std::string& fragmentShaderFileName, bool bindEntryExitDepthTextures) RaycastingProcessor::RaycastingProcessor(GenericProperty<tgt::ivec2>& renderTargetSize, const std::string& fragmentShaderFileName, bool bindEntryExitDepthTextures)
: VisualizationProcessor(renderTargetSize) : VisualizationProcessor(renderTargetSize)
, _sourceImageID("sourceImageID", "Input Image", "", DataNameProperty::READ) , p_sourceImageID("sourceImageID", "Input Image", "", DataNameProperty::READ)
, _entryImageID("entryImageID", "Input Entry Points Image", "", DataNameProperty::READ) , p_entryImageID("entryImageID", "Input Entry Points Image", "", DataNameProperty::READ)
, _exitImageID("exitImageID", "Input Exit Points Image", "", DataNameProperty::READ) , p_exitImageID("exitImageID", "Input Exit Points Image", "", DataNameProperty::READ)
, _camera("camera", "Camera") , p_camera("camera", "Camera")
, _transferFunction("transferFunction", "Transfer Function", new SimpleTransferFunction(256)) , p_transferFunction("transferFunction", "Transfer Function", new SimpleTransferFunction(256))
, _samplingStepSize("samplingStepSize", "Sampling Step Size", .05f, 0.001f, 1.f) , p_samplingStepSize("samplingStepSize", "Sampling Step Size", .05f, 0.001f, 1.f)
, _jitterEntryPoints("jitterEntryPoints", "Jitter Entry Points", true) , p_jitterEntryPoints("jitterEntryPoints", "Jitter Entry Points", true)
, _jitterStepSizeMultiplier("jitterStepSizeMultiplier", "Jitter Step Size Multiplier", .5f, .1f, 1.f) , p_jitterStepSizeMultiplier("jitterStepSizeMultiplier", "Jitter Step Size Multiplier", .5f, .1f, 1.f)
, _fragmentShaderFilename(fragmentShaderFileName) , _fragmentShaderFilename(fragmentShaderFileName)
, _shader(0) , _shader(0)
, _bindEntryExitDepthTextures(bindEntryExitDepthTextures) , _bindEntryExitDepthTextures(bindEntryExitDepthTextures)
{ {
addProperty(&_sourceImageID); addProperty(&p_sourceImageID);
addProperty(&_entryImageID); addProperty(&p_entryImageID);
addProperty(&_exitImageID); addProperty(&p_exitImageID);
addProperty(&_camera); addProperty(&p_camera);
addProperty(&_transferFunction); addProperty(&p_transferFunction);
addProperty(&_samplingStepSize); addProperty(&p_samplingStepSize);
addProperty(&_jitterEntryPoints); addProperty(&p_jitterEntryPoints);
addProperty(&_jitterStepSizeMultiplier); addProperty(&p_jitterStepSizeMultiplier);
} }
RaycastingProcessor::~RaycastingProcessor() { RaycastingProcessor::~RaycastingProcessor() {
...@@ -85,9 +85,9 @@ namespace campvis { ...@@ -85,9 +85,9 @@ namespace campvis {
} }
void RaycastingProcessor::process(DataContainer& data) { void RaycastingProcessor::process(DataContainer& data) {
DataContainer::ScopedTypedData<ImageDataGL> img(data, _sourceImageID.getValue()); DataContainer::ScopedTypedData<ImageDataGL> img(data, p_sourceImageID.getValue());
DataContainer::ScopedTypedData<ImageDataRenderTarget> entryPoints(data, _entryImageID.getValue()); DataContainer::ScopedTypedData<ImageDataRenderTarget> entryPoints(data, p_entryImageID.getValue());
DataContainer::ScopedTypedData<ImageDataRenderTarget> exitPoints(data, _exitImageID.getValue()); DataContainer::ScopedTypedData<ImageDataRenderTarget> exitPoints(data, p_exitImageID.getValue());
if (img != 0 && entryPoints != 0 && exitPoints != 0) { if (img != 0 && entryPoints != 0 && exitPoints != 0) {
if (img->getDimensionality() == 3) { if (img->getDimensionality() == 3) {
...@@ -97,7 +97,7 @@ namespace campvis { ...@@ -97,7 +97,7 @@ namespace campvis {
} }
glPushAttrib(GL_ALL_ATTRIB_BITS); glPushAttrib(GL_ALL_ATTRIB_BITS);
_transferFunction.getTF()->uploadTexture(); p_transferFunction.getTF()->uploadTexture();
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);
_shader->activate(); _shader->activate();
...@@ -105,14 +105,14 @@ namespace campvis { ...@@ -105,14 +105,14 @@ namespace campvis {
_shader->setIgnoreUniformLocationError(true); _shader->setIgnoreUniformLocationError(true);
decorateRenderProlog(data, _shader); decorateRenderProlog(data, _shader);
_shader->setUniform("_viewportSizeRCP", 1.f / tgt::vec2(_renderTargetSize.getValue())); _shader->setUniform("_viewportSizeRCP", 1.f / tgt::vec2(_renderTargetSize.getValue()));
_shader->setUniform("_jitterEntryPoints", _jitterEntryPoints.getValue()); _shader->setUniform("_jitterEntryPoints", p_jitterEntryPoints.getValue());
_shader->setUniform("_jitterStepSizeMultiplier", _jitterStepSizeMultiplier.getValue()); _shader->setUniform("_jitterStepSizeMultiplier", p_jitterStepSizeMultiplier.getValue());
_shader->setUniform("_samplingStepSize", _samplingStepSize.getValue() * .1f); _shader->setUniform("_samplingStepSize", p_samplingStepSize.getValue() * .1f);
const tgt::Camera& cam = _camera.getValue(); const tgt::Camera& cam = p_camera.getValue();
float n = cam.getNearDist(); float n = cam.getNearDist();
float f = cam.getFarDist(); float f = cam.getFarDist();
_shader->setUniform("_cameraPosition", _camera.getValue().getPosition()); _shader->setUniform("_cameraPosition", p_camera.getValue().getPosition());
_shader->setUniform("const_to_z_e_1", 0.5f + 0.5f*((f+n)/(f-n))); _shader->setUniform("const_to_z_e_1", 0.5f + 0.5f*((f+n)/(f-n)));
_shader->setUniform("const_to_z_e_2", ((f-n)/(f*n))); _shader->setUniform("const_to_z_e_2", ((f-n)/(f*n)));
_shader->setUniform("const_to_z_w_1", ((f*n)/(f-n))); _shader->setUniform("const_to_z_w_1", ((f*n)/(f-n)));
...@@ -122,7 +122,7 @@ namespace campvis { ...@@ -122,7 +122,7 @@ namespace campvis {
tgt::TextureUnit volumeUnit, entryUnit, exitUnit, tfUnit; tgt::TextureUnit volumeUnit, entryUnit, exitUnit, tfUnit;
img->bind(_shader, volumeUnit, "_volume"); img->bind(_shader, volumeUnit, "_volume");
_transferFunction.getTF()->bind(_shader, tfUnit); p_transferFunction.getTF()->bind(_shader, tfUnit);
if (! _bindEntryExitDepthTextures) { if (! _bindEntryExitDepthTextures) {
entryPoints->bind(_shader, &entryUnit, 0, "_entryPoints"); entryPoints->bind(_shader, &entryUnit, 0, "_entryPoints");
......
...@@ -98,15 +98,15 @@ namespace campvis { ...@@ -98,15 +98,15 @@ namespace campvis {
*/ */
virtual void process(DataContainer& data); virtual void process(DataContainer& data);
DataNameProperty _sourceImageID; ///< image ID for input image DataNameProperty p_sourceImageID; ///< image ID for input image
DataNameProperty _entryImageID; ///< image ID for output entry points image DataNameProperty p_entryImageID; ///< image ID for output entry points image
DataNameProperty _exitImageID; ///< image ID for output exit points image DataNameProperty p_exitImageID; ///< image ID for output exit points image
CameraProperty _camera; ///< Camera used for ray casting CameraProperty p_camera; ///< Camera used for ray casting
TransferFunctionProperty _transferFunction; ///< Transfer function TransferFunctionProperty p_transferFunction; ///< Transfer function
FloatProperty _samplingStepSize; ///< Ray casting step size FloatProperty p_samplingStepSize; ///< Ray casting step size
BoolProperty _jitterEntryPoints; ///< Flag whether to jitter the entry points BoolProperty p_jitterEntryPoints; ///< Flag whether to jitter the entry points
FloatProperty _jitterStepSizeMultiplier; ///< Step size multiplier for entry points jitter FloatProperty p_jitterStepSizeMultiplier; ///< Step size multiplier for entry points jitter
protected: protected:
/** /**
......
...@@ -67,10 +67,6 @@ namespace campvis { ...@@ -67,10 +67,6 @@ namespace campvis {
} }
} }
PropertyCollection& VisualizationPipeline::getPropertyCollection() {
return _properties;
}
void VisualizationPipeline::init() { void VisualizationPipeline::init() {
AbstractPipeline::init(); AbstractPipeline::init();
} }
......
...@@ -90,12 +90,6 @@ namespace campvis { ...@@ -90,12 +90,6 @@ namespace campvis {
*/ */
virtual void onEvent(tgt::Event* e); virtual void onEvent(tgt::Event* e);
/**
* Returns the PropertyCollection of this processor.
* \return _properties
*/
PropertyCollection& getPropertyCollection();
/** /**
* Sets the Canvas hosting the OpenGL context for this pipeline. * Sets the Canvas hosting the OpenGL context for this pipeline.
* \param canvas Canvas hosting the OpenGL context for this pipeline * \param canvas Canvas hosting the OpenGL context for this pipeline
...@@ -120,6 +114,12 @@ namespace campvis { ...@@ -120,6 +114,12 @@ namespace campvis {
*/ */
const std::string& getRenderTargetID() const; const std::string& getRenderTargetID() const;
/**
* Adds the event handler \a eventHandler to this pipeline's list of event handlers.
* \param eventHandler The event handler to add.
*/
void addEventHandler(AbstractEventHandler* eventHandler);
/// Signal emitted when the pipeline's render target has changed /// Signal emitted when the pipeline's render target has changed
sigslot::signal0<> s_renderTargetChanged; sigslot::signal0<> s_renderTargetChanged;
......
...@@ -45,11 +45,11 @@ namespace campvis { ...@@ -45,11 +45,11 @@ namespace campvis {
MhdImageReader::MhdImageReader() MhdImageReader::MhdImageReader()
: AbstractProcessor() : AbstractProcessor()
, _url("url", "Image URL", "") , p_url("url", "Image URL", "")
, _targetImageID("targetImageName", "Target Image ID", "MhdImageReader.output", DataNameProperty::WRITE) , p_targetImageID("targetImageName", "Target Image ID", "MhdImageReader.output", DataNameProperty::WRITE)
{ {
addProperty(&_url); addProperty(&p_url);
addProperty(&_targetImageID); addProperty(&p_targetImageID);
} }
MhdImageReader::~MhdImageReader() { MhdImageReader::~MhdImageReader() {
...@@ -59,7 +59,7 @@ namespace campvis { ...@@ -59,7 +59,7 @@ namespace campvis {
void MhdImageReader::process(DataContainer& data) { void MhdImageReader::process(DataContainer& data) {
try { try {
// start parsing // start parsing
TextFileParser tfp(_url.getValue(), true, "="); TextFileParser tfp(p_url.getValue(), true, "=");
tfp.parse<TextFileParser::ItemSeparatorLines>(); tfp.parse<TextFileParser::ItemSeparatorLines>();
// init optional parameters with sane default values // init optional parameters with sane default values
...@@ -124,11 +124,11 @@ namespace campvis { ...@@ -124,11 +124,11 @@ namespace campvis {
// get raw image location: // get raw image location:
url = StringUtils::trim(tfp.getString("ElementDataFile")); url = StringUtils::trim(tfp.getString("ElementDataFile"));
if (url == "LOCAL") { if (url == "LOCAL") {
url = _url.getValue(); url = p_url.getValue();
// find beginning of local data: // find beginning of local data:
tgt::File* file = FileSys.open(_url.getValue()); tgt::File* file = FileSys.open(p_url.getValue());
if (!file || !file->isOpen()) if (!file || !file->isOpen())
throw tgt::FileException("Could not open file " + _url.getValue() + " for reading.", _url.getValue()); throw tgt::FileException("Could not open file " + p_url.getValue() + " for reading.", p_url.getValue());
while (!file->eof()) { while (!file->eof()) {
std::string line = StringUtils::trim(file->getLine()); std::string line = StringUtils::trim(file->getLine());
...@@ -144,15 +144,15 @@ namespace campvis { ...@@ -144,15 +144,15 @@ namespace campvis {
return; return;
} }
else { else {
url = tgt::FileSystem::cleanupPath(tgt::FileSystem::dirName(_url.getValue()) + "/" + url); url = tgt::FileSystem::cleanupPath(tgt::FileSystem::dirName(p_url.getValue()) + "/" + url);
} }
// all parsing done - lets create the image: // all parsing done - lets create the image:
ImageDataDisk* image = new ImageDataDisk(url, dimensionality, size, pt, 1, offset, e); ImageDataDisk* image = new ImageDataDisk(url, dimensionality, size, pt, 1, offset, e);
data.addData(_targetImageID.getValue(), image); data.addData(p_targetImageID.getValue(), image);
_targetImageID.issueWrite(); p_targetImageID.issueWrite();
} }
catch (tgt::Exception& e) { catch (tgt::Exception& e) {
LERROR("Error while parsing MHD header: " << e.what()); LERROR("Error while parsing MHD header: " << e.what());
......
...@@ -66,8 +66,8 @@ namespace campvis { ...@@ -66,8 +66,8 @@ namespace campvis {
/// \see AbstractProcessor::getDescription() /// \see AbstractProcessor::getDescription()
virtual const std::string getDescription() const { return "Reads an MHD image into the pipeline."; }; virtual const std::string getDescription() const { return "Reads an MHD image into the pipeline."; };
StringProperty _url; ///< URL for file to read StringProperty p_url; ///< URL for file to read
DataNameProperty _targetImageID; ///< image ID for read image DataNameProperty p_targetImageID; ///< image ID for read image
protected: protected:
......
...@@ -87,11 +87,11 @@ namespace campvis { ...@@ -87,11 +87,11 @@ namespace campvis {
GradientVolumeGenerator::GradientVolumeGenerator() GradientVolumeGenerator::GradientVolumeGenerator()
: AbstractProcessor() : AbstractProcessor()
, _inputVolume("InputVolume", "Input Volume ID", "volume", DataNameProperty::READ) , p_inputVolume("InputVolume", "Input Volume ID", "volume", DataNameProperty::READ)
, _outputGradients("OutputGradients", "Output Gradient Volume ID", "gradients", DataNameProperty::WRITE) , p_outputGradients("OutputGradients", "Output Gradient Volume ID", "gradients", DataNameProperty::WRITE)
{ {
addProperty(&_inputVolume); addProperty(&p_inputVolume);
addProperty(&_outputGradients); addProperty(&p_outputGradients);
} }
GradientVolumeGenerator::~GradientVolumeGenerator() { GradientVolumeGenerator::~GradientVolumeGenerator() {
...@@ -99,14 +99,14 @@ namespace campvis { ...@@ -99,14 +99,14 @@ namespace campvis {
} }
void GradientVolumeGenerator::process(DataContainer& data) { void GradientVolumeGenerator::process(DataContainer& data) {
DataContainer::ScopedTypedData<ImageDataLocal> input(data, _inputVolume.getValue()); DataContainer::ScopedTypedData<ImageDataLocal> input(data, p_inputVolume.getValue());
if (input != 0) { if (input != 0) {
GenericImageDataLocal<float, 4>* output = new GenericImageDataLocal<float, 4>(input->getDimensionality(), input->getSize(), 0); GenericImageDataLocal<float, 4>* output = new GenericImageDataLocal<float, 4>(input->getDimensionality(), input->getSize(), 0);
tbb::parallel_for(tbb::blocked_range<size_t>(0, input->getNumElements()), ApplyCentralDifferences(input, output)); tbb::parallel_for(tbb::blocked_range<size_t>(0, input->getNumElements()), ApplyCentralDifferences(input, output));
data.addData(_outputGradients.getValue(), output); data.addData(p_outputGradients.getValue(), output);
_outputGradients.issueWrite(); p_outputGradients.issueWrite();
} }
else { else {
LDEBUG("No suitable input image found."); LDEBUG("No suitable input image found.");
......
...@@ -62,8 +62,8 @@ namespace campvis { ...@@ -62,8 +62,8 @@ namespace campvis {
virtual void process(DataContainer& data); virtual void process(DataContainer& data);
DataNameProperty _inputVolume; ///< ID for input volume DataNameProperty p_inputVolume; ///< ID for input volume
DataNameProperty _outputGradients; //< ID for output gradient volume DataNameProperty p_outputGradients; //< ID for output gradient volume
protected: protected:
......
...@@ -142,15 +142,15 @@ namespace campvis { ...@@ -142,15 +142,15 @@ namespace campvis {
LHHistogram::LHHistogram() LHHistogram::LHHistogram()
: AbstractProcessor() : AbstractProcessor()
, _inputVolume("InputVolume", "Input Volume ID", "volume", DataNameProperty::READ) , p_inputVolume("InputVolume", "Input Volume ID", "volume", DataNameProperty::READ)
, _inputGradients("InputGradients", "Input Gradient Volume ID", "gradients", DataNameProperty::READ) , p_inputGradients("InputGradients", "Input Gradient Volume ID", "gradients", DataNameProperty::READ)
, _outputFL("OutputFL", "FL Output Volume", "fl", DataNameProperty::WRITE) , p_outputFL("OutputFL", "FL Output Volume", "fl", DataNameProperty::WRITE)
, _outputFH("OutputFH", "FH Output Volume", "fh", DataNameProperty::WRITE) , p_outputFH("OutputFH", "FH Output Volume", "fh", DataNameProperty::WRITE)
{ {
addProperty(&_inputVolume); addProperty(&p_inputVolume);
addProperty(&_inputGradients); addProperty(&p_inputGradients);
addProperty(&_outputFL); addProperty(&p_outputFL);
addProperty(&_outputFH); addProperty(&p_outputFH);
} }
LHHistogram::~LHHistogram() { LHHistogram::~LHHistogram() {
...@@ -158,8 +158,8 @@ namespace campvis { ...@@ -158,8 +158,8 @@ namespace campvis {
} }
void LHHistogram::process(DataContainer& data) { void LHHistogram::process(DataContainer& data) {
DataContainer::ScopedTypedData<ImageDataLocal> intensities(data, _inputVolume.getValue()); DataContainer::ScopedTypedData<ImageDataLocal> intensities(data, p_inputVolume.getValue());
DataContainer::ScopedTypedData< GenericImageDataLocal<float, 4> > gradients(data, _inputGradients.getValue()); DataContainer::ScopedTypedData< GenericImageDataLocal<float, 4> > gradients(data, p_inputGradients.getValue());
if (intensities != 0 && gradients != 0) { if (intensities != 0 && gradients != 0) {
ImageDataLocal* fl = intensities->clone(); ImageDataLocal* fl = intensities->clone();
...@@ -182,10 +182,10 @@ namespace campvis { ...@@ -182,10 +182,10 @@ namespace campvis {
delete [] tmp; delete [] tmp;
data.addData("foo", tex); data.addData("foo", tex);
data.addData(_outputFH.getValue(), fh); data.addData(p_outputFH.getValue(), fh);
data.addData(_outputFL.getValue(), fl); data.addData(p_outputFL.getValue(), fl);
_outputFH.issueWrite(); p_outputFH.issueWrite();
_outputFL.issueWrite(); p_outputFL.issueWrite();
} }
else { else {
LDEBUG("No suitable intensities image found."); LDEBUG("No suitable intensities image found.");
......
...@@ -62,11 +62,11 @@ namespace campvis { ...@@ -62,11 +62,11 @@ namespace campvis {
virtual void process(DataContainer& data); virtual void process(DataContainer& data);
DataNameProperty _inputVolume; ///< ID for input volume DataNameProperty p_inputVolume; ///< ID for input volume
DataNameProperty _inputGradients; ///< ID for input gradient volume DataNameProperty p_inputGradients; ///< ID for input gradient volume
DataNameProperty _outputFL; ///< ID for output FL volume DataNameProperty p_outputFL; ///< ID for output FL volume
DataNameProperty _outputFH; ///< ID for output FH volume DataNameProperty p_outputFH; ///< ID for output FH volume
protected: protected:
......
...@@ -58,16 +58,16 @@ namespace campvis { ...@@ -58,16 +58,16 @@ namespace campvis {
_trackballEH = new TrackballNavigationEventHandler(&_camera, _renderTargetSize.getValue()); _trackballEH = new TrackballNavigationEventHandler(&_camera, _renderTargetSize.getValue());
_eventHandlers.push_back(_trackballEH); _eventHandlers.push_back(_trackballEH);
_processors.push_back(&_imageReader); addProcessor(&_imageReader);
_processors.push_back(&_pgGenerator); addProcessor(&_pgGenerator);
_processors.push_back(&_vmgGenerator); addProcessor(&_vmgGenerator);
_processors.push_back(&_vmRenderer); addProcessor(&_vmRenderer);
_processors.push_back(&_eepGenerator); addProcessor(&_eepGenerator);
_processors.push_back(&_vmEepGenerator); addProcessor(&_vmEepGenerator);
_processors.push_back(&_dvrNormal); addProcessor(&_dvrNormal);
_processors.push_back(&_dvrVM); addProcessor(&_dvrVM);
_processors.push_back(&_depthDarkening); addProcessor(&_depthDarkening);
_processors.push_back(&_combine); addProcessor(&_combine);
} }
DVRVis::~DVRVis() { DVRVis::~DVRVis() {
...@@ -77,67 +77,67 @@ namespace campvis { ...@@ -77,67 +77,67 @@ namespace campvis {
void DVRVis::init() { void DVRVis::init() {
VisualizationPipeline::init(); VisualizationPipeline::init();
_camera.addSharedProperty(&_vmgGenerator._camera); _camera.addSharedProperty(&_vmgGenerator.p_camera);
_camera.addSharedProperty(&_vmRenderer._camera); _camera.addSharedProperty(&_vmRenderer.p_camera);
_camera.addSharedProperty(&_eepGenerator._camera); _camera.addSharedProperty(&_eepGenerator.p_camera);
_camera.addSharedProperty(&_vmEepGenerator._camera); _camera.addSharedProperty(&_vmEepGenerator.p_camera);
_camera.addSharedProperty(&_dvrNormal._camera); _camera.addSharedProperty(&_dvrNormal.p_camera);
_camera.addSharedProperty(&_dvrVM._camera); _camera.addSharedProperty(&_dvrVM.p_camera);
//_imageReader._url.setValue("D:\\Medical Data\\Dentalscan\\dental.mhd"); //_imageReader.p_url.setValue("D:\\Medical Data\\Dentalscan\\dental.mhd");
_imageReader._url.setValue("D:\\Medical Data\\smallHeart.mhd"); _imageReader.p_url.setValue("D:\\Medical Data\\smallHeart.mhd");
_imageReader._targetImageID.setValue("reader.output"); _imageReader.p_targetImageID.setValue("reader.output");
_dvrNormal._targetImageID.setValue("drr.output"); _dvrNormal.p_targetImageID.setValue("drr.output");
_dvrNormal._sourceImageID.setValue("eep.input"); _dvrNormal.p_sourceImageID.setValue("eep.input");
Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f)); Geometry1DTransferFunction* dvrTF = new Geometry1DTransferFunction(128, tgt::vec2(0.f, .05f));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.4f, .42f), tgt::col4(255, 0, 0, 255), tgt::col4(255, 0, 0, 255))); dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.4f, .42f), tgt::col4(255, 0, 0, 255), tgt::col4(255, 0, 0, 255)));
dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.45f, .5f), tgt::col4(0, 255, 0, 255), tgt::col4(0, 255, 0, 255))); dvrTF->addGeometry(TFGeometry1D::createQuad(tgt::vec2(.45f, .5f), tgt::col4(0, 255, 0, 255), tgt::col4(0, 255, 0, 255)));
_dvrNormal._transferFunction.replaceTF(dvrTF); _dvrNormal.p_transferFunction.replaceTF(dvrTF);