Commit 7ff285ab authored by Joshua Santana's avatar Joshua Santana
Browse files

Resolved conflicts

Merge branch 'sprint_5' into 'top2021s5/#105_fix_gradient_hiding'

# Conflicts:
#   src/modules/filterProtonData/WCsvConverter.cpp
parents 09b87f36 9b97fa16
......@@ -80,6 +80,16 @@ namespace WPropertyHelper
}
}
namespace PC_CONFIRMOVERWRITE
{
void addTo( WPropFilename prop )
{
prop->addConstraint( boost::shared_ptr< WPropertyConstraintConfirmOverwrite< WPVBaseTypes::PV_PATH > >(
new WPropertyConstraintConfirmOverwrite< WPVBaseTypes::PV_PATH >()
) );
}
}
namespace PC_ISVALID
{
void addTo( WPropSelection prop )
......
......@@ -34,6 +34,7 @@
#include "constraints/WPropertyConstraintIsDirectory.h"
#include "constraints/WPropertyConstraintSelectOnlyOne.h"
#include "constraints/WPropertyConstraintIsValid.h"
#include "constraints/WPropertyConstraintConfirmOverwrite.h"
/**
......@@ -107,6 +108,19 @@ namespace WPropertyHelper
void addTo( WPropFilename prop );
}
/**
* Contains functions for easily adding contraints of type PC_CONFIRMOVERWRITE to properties compatible with this constraint.
*/
namespace PC_CONFIRMOVERWRITE
{
/**
* Add the PC_CONFIRMOVERWRITE constraint to the property.
*
* \param prop the property where to add the constraint.
*/
void addTo( WPropFilename prop );
}
/**
* Contains functions for easily adding constraints of type PC_ISVALID to properties compatible with this constraint.
*/
......
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#include "WPropertyConstraintConfirmOverwrite.h"
#include "../WPropertyVariable.h"
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WPROPERTYCONSTRAINTCONFIRMOVERWRITE_H
#define WPROPERTYCONSTRAINTCONFIRMOVERWRITE_H
#include "../WPropertyTypes.h"
#include "WPropertyConstraintTypes.h"
/**
* This class allows constraining properties to be existing filenames. This is especially useful for WPropFilename.
*/
template < typename T >
class WPropertyConstraintConfirmOverwrite: public WPropertyVariable< T >::PropertyConstraint
{
public:
/**
* Constructor.
*/
WPropertyConstraintConfirmOverwrite();
/**
* Destructor.
*/
virtual ~WPropertyConstraintConfirmOverwrite();
/**
* Checks whether the specified value is a directory or not.
*
* \param property the property whose new value should be set.
* \param value the new value to check
*
* \return true if the file/path is a directory
*/
virtual bool accept( boost::shared_ptr< WPropertyVariable< T > > property, const T& value );
/**
* Allows simple identification of the real constraint type.
*
* \return the type
*/
virtual PROPERTYCONSTRAINT_TYPE getType();
/**
* Method to clone the constraint and create a new one with the correct dynamic type.
*
* \return the constraint.
*/
virtual boost::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint > clone();
private:
};
template < typename T >
WPropertyConstraintConfirmOverwrite< T >::WPropertyConstraintConfirmOverwrite()
{
}
template < typename T >
WPropertyConstraintConfirmOverwrite< T >::~WPropertyConstraintConfirmOverwrite()
{
}
template < typename T >
bool WPropertyConstraintConfirmOverwrite< T >::accept( boost::shared_ptr< WPropertyVariable< T > > /* property */, const T& /* value */ )
{
return true;
}
template < typename T >
PROPERTYCONSTRAINT_TYPE WPropertyConstraintConfirmOverwrite< T >::getType()
{
return PC_CONFIRMOVERWRITE;
}
template < typename T >
boost::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint > WPropertyConstraintConfirmOverwrite< T >::clone()
{
return boost::shared_ptr< typename WPropertyVariable< T >::PropertyConstraint >( new WPropertyConstraintConfirmOverwrite< T >( *this ) );
}
#endif // WPROPERTYCONSTRAINTCONFIRMOVERWRITE_H
......@@ -39,7 +39,8 @@ typedef enum
PC_ISDIRECTORY, // type ID for WPropertyConstraintIsDirectory
PC_SELECTONLYONE, // type ID for WPropertyConstraintSelectOnlyOne
PC_SELECTATLEASTONE, // type ID for WPropertyConstraintSelectAtLeastOne
PC_ISVALID // type ID for WPropertyConstraintIsValid
PC_ISVALID, // type ID for WPropertyConstraintIsValid
PC_CONFIRMOVERWRITE // type ID for WPropertyConstraintConfirmOverwrite
}
PROPERTYCONSTRAINT_TYPE;
......
......@@ -24,6 +24,7 @@
#include "WDataSetCSV.h"
WDataSetCSV::WDataSetCSV( WDataSetCSV::ContentSPtr header, WDataSetCSV::ContentSPtr data )
: m_header( header ), m_data( data )
{
......
......@@ -25,11 +25,11 @@
#ifndef WDATASETCSV_H
#define WDATASETCSV_H
#include "WDataSet.h"
#include "string"
#include "vector"
#include "WDataSet.h"
/**
* Represents a CSV dataset.
*/
......
......@@ -26,6 +26,7 @@
#include "WDataSetPointsAndEventID.h"
boost::shared_ptr< WPrototyped > WDataSetPointsAndEventID::m_prototype = boost::shared_ptr< WPrototyped >();
WDataSetPointsAndEventID::WDataSetPointsAndEventID( WDataSetPointsAndEventID::VertexArray vertices,
......
......@@ -32,6 +32,7 @@
#include "WDataSetPoints.h"
/**
* Dataset to store a bunch of points with their sizes but without order or topology.
*/
......
......@@ -24,6 +24,7 @@
#include "WDataSetPointsAndFibers.h"
WDataSetPointsAndFibers::WDataSetPointsAndFibers( WDataSetPoints::SPtr points, WDataSetFibers::SPtr fibers )
: m_points( points ), m_fibers( fibers )
{
......
......@@ -26,13 +26,14 @@
#define WDATASETPOINTSANDFIBERS_H
#include "WDataSet.h"
#include "WDataSetPoints.h"
#include "WDataSetFibers.h"
#include "WDataSetPoints.h"
/**
* Dataset to store a bunch of points and Fibers.
*/
class WDataSetPointsAndFibers : public WDataSet
class WDataSetPointsAndFibers : public WDataSet
{
public:
/**
......@@ -77,7 +78,6 @@ private:
* Dataset to store a bunch of Fibers.
*/
WDataSetFibers::SPtr m_fibers;
};
#endif // WDATASETPOINTSANDFIBERS_H
\ No newline at end of file
#endif // WDATASETPOINTSANDFIBERS_H
......@@ -26,6 +26,7 @@
#include "WDataSetPointsAndSizes.h"
boost::shared_ptr< WPrototyped > WDataSetPointsAndSizes::m_prototype = boost::shared_ptr< WPrototyped >();
WDataSetPointsAndSizes::WDataSetPointsAndSizes( WDataSetPointsAndSizes::VertexArray vertices,
......
......@@ -32,6 +32,7 @@
#include "WDataSetPoints.h"
/**
* Dataset to store a bunch of points with their sizes but without order or topology.
*/
......
......@@ -25,6 +25,9 @@
#ifndef WDATASETCSV_TEST_H
#define WDATASETCSV_TEST_H
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <cxxtest/TestSuite.h>
......@@ -101,7 +104,6 @@ public:
{
TS_ASSERT_EQUALS( csvDataSet.getData(), m_data );
}
};
#endif // WDATASETCSV_TEST_H
......@@ -25,10 +25,10 @@
#include <string>
#include <vector>
#include "modules/data/io/WReaderCSV.h"
#include "core/common/WAssert.h"
#include "core/common/WIOTools.h"
#include "core/common/WPropertyHelper.h"
#include "core/dataHandler/exceptions/WDHException.h"
#include "core/dataHandler/WDataHandler.h"
#include "core/dataHandler/WDataSet.h"
#include "core/dataHandler/WDataSetScalar.h"
......@@ -38,7 +38,6 @@
#include "core/dataHandler/WDataTexture3D.h"
#include "core/dataHandler/WEEG2.h"
#include "core/dataHandler/WSubject.h"
#include "core/dataHandler/exceptions/WDHException.h"
#include "core/graphicsEngine/WGEColormapping.h"
#include "core/kernel/WDataModuleInputFile.h"
#include "core/kernel/WDataModuleInputFilterFile.h"
......@@ -47,20 +46,22 @@
#ifdef WBIOSIG_ENABLED
#include "io/WReaderBiosig.h"
#endif
#include "io/WReaderClustering.h"
#include "io/WReaderCSV.h"
#include "io/WReaderEEGASCII.h"
#include "io/WReaderNIfTI.h"
#include "io/WReaderELC.h"
#include "io/WReaderFiberVTK.h"
#include "io/WReaderVTK.h"
#ifdef WEEP_ENABLED
#include "io/WReaderLibeep.h"
#include "io/WPagerEEGLibeep.h"
#endif
#include "io/WReaderClustering.h"
#include "io/WReaderNIfTI.h"
#include "io/WReaderVTK.h"
#include "WMData.h"
#include "WMData.xpm"
WMData::WMData():
WDataModule(),
m_isTexture(),
......
......@@ -27,6 +27,7 @@
#include "WReaderCSV.h"
WReaderCSV::WReaderCSV( std::string fname )
: WReader( fname )
{
......
......@@ -29,9 +29,11 @@
#include <vector>
#include <boost/shared_ptr.hpp>
#include <core/dataHandler/WDataSetPoints.h>
#include <core/dataHandler/WDataSetCSV.h>
#include "core/dataHandler/io/WReader.h"
#include <core/dataHandler/WDataSetCSV.h>
#include <core/dataHandler/WDataSetPoints.h>
/**
* Read content from a CSV file.
......
......@@ -26,7 +26,9 @@
#define WREADERCSV_TEST_H
#include <string>
#include <cxxtest/TestSuite.h>
#include "../WReaderCSV.h"
......
......@@ -415,10 +415,19 @@ void WMFiberDisplay::moduleMain()
WGEColormapping::apply( endCapGeode, m_endCapShader );
// for line smoothing and width features
geode->getOrCreateStateSet()->setUpdateCallback( new WGEFunctorCallback< osg::StateSet >(
osg::ref_ptr< osg::StateSet > state = geode->getOrCreateStateSet();
state->setUpdateCallback( new WGEFunctorCallback< osg::StateSet >(
boost::bind( &WMFiberDisplay::lineGeodeStateCallback, this, boost::placeholders::_1 ) )
);
// set attributes
state->setAttributeAndModes( new osg::LineWidth( m_lineWidth->get( true ) ), osg::StateAttribute::ON );
osg::StateAttribute::GLModeValue onoff = m_lineSmooth->get() ? osg::StateAttribute::ON : osg::StateAttribute::OFF;
state->setAttributeAndModes( new osg::Hint( GL_LINE_SMOOTH_HINT, GL_NICEST ), onoff );
state->setMode( GL_LINE_SMOOTH, onoff );
state->setMode( GL_BLEND, osg::StateAttribute::ON );
// Add geometry
WKernel::getRunningKernel()->getGraphicsEngine()->getScene()->insert( m_plane );
......
#---------------------------------------------------------------------------
#
# Project: OpenWalnut ( http://www.openwalnut.org )
#
# Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
# For more information see http:#www.openwalnut.org/copying
#
# This file is part of OpenWalnut.
#
# OpenWalnut is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenWalnut is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with OpenWalnut. If not, see <http:#www.gnu.org/licenses/>.
#
#---------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Some common setup
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# we use the directory name as module name
GET_FILENAME_COMPONENT( MODULE_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Search own dependencies
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# 1: FindPackage( LibYouNeed )
# 2: INCLUDE_DIRECTORIES( ${LIBYOUNEED_INCLUDE_DIR} )
# 3: LINK_DIRECTORIES( ${LIBYOUNEED_LIBRARY_DIRS} )
# 4: Add ${LIBYOUNEED_LIBRARY} as _MODULE_DEPENDENCIES parameter to SETUP_MODULE
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Setup for compilation
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Let this function do the job. It sets up tests and copies shaders automatically. It additionally configures the stylecheck mechanism for this
# module.
SETUP_MODULE( ${MODULE_NAME} # name of the module
"${CMAKE_CURRENT_SOURCE_DIR}" # where to find the source ${CMAKE_CURRENT_SOURCE_DIR} is a good idea here mostly
"transferFunctionColorBar;data" # does your module need additional libs to compile?
"" # do you want to exclude files from stylechecking? (externals for example)
)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment