Commit ae2fe107 authored by Mathias Goldau's avatar Mathias Goldau

[ADD] Now the fiberStipple and isoLine modules are living inside this toolbox,...

[ADD] Now the fiberStipple and isoLine modules are living inside this toolbox, not polluting our pristine sources for our framework
parent 7e442774
You are free to copy, modify and re-distribute these files as you like.
* This is an example of how to create your own module toolbox
for OpenWalnut (http://www.openwalnut.org).
* You should have a look at our WIKI for further details under
http://www.openwalnut.org/projects/openwalnut/wiki/Module_ExternalDevelopment
* It basically creates one library with two modules in it.
You can use this example as your basic development setup
and extend it as you need.
* Please contact us if you have trouble or if you have added
platform support to the OpenWalnut.cmake script. We
appreciate your help!
Happy coding!
- The OpenWalnut Team -
# OW Version File. This file specifies the version. The line VERSION=X.Y.Z is
# used and parsed. This file has to be here everytime. The VERSION needs to be
# set properly or CMake will fail.
#
# SYNTAX: The version string always is 1.2.3 with an optional postfix of "+hg1234".
# This is useful if building is done by scripts. If you want to automatically
# add the correct HG revision, use only +hgX without number.
#
# IMPORTANT: If you modify the file, cmake re-creates the version header. But
# it is not able to set all library version. Please re-run cmake if
# you change something here.
#
# NOTE: do not add a space after #. The current CMake script will fail.
# Examples:
#VERSION=1.2.0
#VERSION=1.2.0+hgX -> replaces the X with the current revision number
#VERSUIB=1.2.0+hg1234 -> here, revision number was set by the build scripts for example.
VERSION=0.1.0+hgX
This diff is collapsed.
<doxygenlayout version="1.0">
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title=""/>
<tab type="modules" visible="yes" title="Groups"/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespaces" visible="yes" title=""/>
<tab type="namespacemembers" visible="yes" title=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classes" visible="yes" title=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title=""/>
<tab type="classmembers" visible="yes" title=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="files" visible="yes" title=""/>
<tab type="globals" visible="yes" title=""/>
</tab>
<tab type="dirs" visible="yes" title=""/>
<tab type="examples" visible="yes" title=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<allmemberslink visible="yes"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<typedefs title=""/>
<enums title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<dirs visible="yes" title=""/>
<nestedgroups visible="yes" title=""/>
<files visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>
#---------------------------------------------------------------------------
#
# 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/>.
#
#---------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# General CMake Setup
#
# ---------------------------------------------------------------------------------------------------------------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT( FiberStippleToolbox )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# Include the OpenWalnut build system.
#
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# where to find our utils and cmake modules?
SET( OW_TOOLS_DIR ${PROJECT_SOURCE_DIR}/../tools )
# append search path for FindModules:
LIST( APPEND CMAKE_MODULE_PATH ${OW_TOOLS_DIR}/cmake )
# These scripts contains all the needed tools to setup the build:
# * Compiler Setup
# * Common OpenWalnut Options
# * Third-party Dependencies Setup
# * Unit Testing Setup if found
# * Doxygen Setup if found
INCLUDE( OpenWalnut )
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# Setup your additional dependencies and tools
#
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# IMPORTANT: NEVER add any commands bore the line INCLUDE( OpenWalnut ). This might cause problems!
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# Setup all modules
#
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Here, you can add your own targets, call ADD_MODULE provided by OpenWalnut or a combination of it. When using ADD_MODULE or SETUP_MODULE, the
# OpenWalnut CMake scripts manages proper resource handling, test compilation and similar. You should use it whenever possible. More details on
# how to develop external modules, have a look at http://www.openwalnut.org. You can have a look at OpenWalnut.cmake if you want to modify
# the default behaviour.
# Please see the documentation of SETUP_MODULE as it shows how to add custom dependencies (third-party libs)
SETUP_MODULE(
${PROJECT_NAME} # use project name as module(-toolbox) name
"." # where to find the sources
"" # no additonal dependencies
"" # no sources to exclude
)
# ---------------------------------------------------------------------------------------------------------------------------------------------------
#
# Additional Setup
#
# ---------------------------------------------------------------------------------------------------------------------------------------------------
# Add the files under ../resources/MyGlobalResources as additional, global resources
# The first parameter is the directory name, the second parameter is the component name. This is used during installation to identify to which
# install component this belongs. The name is arbitrary but must be unique.
#
# NOTE: The first parameter of SETUP_MODULE is not allowed as component name here because SETUP_MODULE already registers this component. Simply
# append some string.
SETUP_GLOBAL_RESOURCES( "MyGlobalResources" ${PROJECT_NAME}_Global )
#include <boost/shared_ptr.hpp>
#include <core/kernel/WModule.h>
#include "fiberStipples/WMFiberStipples.h"
#include "isoLines/WMIsoLines.h"
#include "WToolkit.h"
// This file's purpose is to provide a list of modules as entry point for OpenWalnut's module loader.
// Add your modules here. If you miss this step, OpenWalnut will not be able to load your modules.
extern "C" void WLoadModule( WModuleList& m ) // NOLINT
{
m.push_back( boost::shared_ptr< WModule >( new WMIsoLines ) );
m.push_back( boost::shared_ptr< WModule >( new WMFiberStipples ) );
}
#ifndef WTOOLKIT_H
#define WTOOLKIT_H
// nothing to do here. Have a look at WToolkit.cpp for registration of all the modules inside the toolbox.
#endif // WTOOLKIT_H
This diff is collapsed.
//---------------------------------------------------------------------------
//
// 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 WMFIBERSTIPPLES_H
#define WMFIBERSTIPPLES_H
#include <string>
#include "core/kernel/WModule.h"
// forward declarations to reduce compile dependencies
template< class T > class WModuleInputData;
class WDataSetScalar;
class WDataSetVector;
class WGEManagedGroupNode;
/**
* Draws Fiber Stipples on slice in order to visualize probabilistic tractograms.
*
* \note For further information see http://dx.doi.org/10.1109/BioVis.2011.6094044.
*
* \ingroup modules
*/
class WMFiberStipples: public WModule
{
public:
/**
* Default constructor.
*/
WMFiberStipples();
/**
* Destructor.
*/
virtual ~WMFiberStipples();
/**
* Gives back the name of this module.
* \return the module's name.
*/
virtual const std::string getName() const;
/**
* Gives back a description of this module.
* \return description to module.
*/
virtual const std::string getDescription() const;
/**
* Due to the prototype design pattern used to build modules, this method returns a new instance of this method. NOTE: it
* should never be initialized or modified in some other way. A simple new instance is required.
*
* \return the prototype used to create every module in OpenWalnut.
*/
virtual boost::shared_ptr< WModule > factory() const;
/**
* Get the icon for this module in XPM format.
* \return The icon.
*/
virtual const char** getXPMIcon() const;
protected:
/**
* Entry point after loading the module. Runs in separate thread.
*/
virtual void moduleMain();
/**
* Initialize the connectors this module is using.
*/
virtual void connectors();
/**
* Initialize the properties for this module.
*/
virtual void properties();
private:
/**
* Initialize OSG root node for this module. All other nodes from this module should be attached to this root node.
*
* \param probTract Pointer to dataset containing the connectivity scores or probabilities. We need this for two things:
* First, determine the maxium of connectivity scores to, scale the tracts between 0.0...1.0 and secondly to determine the
* boundingbox for the scene. (Furthermore it is assumed that the vectors are also available within this BB.)
*/
void initOSG( boost::shared_ptr< WDataSetScalar > probTract );
/**
* The probabilistic tractogram input connector.
*/
boost::shared_ptr< WModuleInputData< WDataSetScalar > > m_probIC;
/**
* Input connector for the largest eigen vector dataset.
*/
boost::shared_ptr< WModuleInputData< WDataSetVector > > m_vectorIC;
/**
* The OSG root node for this module. All other geodes or OSG nodes will be attached on this single node.
*/
osg::ref_ptr< WGEManagedGroupNode > m_output;
/**
* Controls the slice position, only back and forth will be possible.
*/
WPropDouble m_Pos;
/**
* Color for the fiber stipples.
*/
WPropColor m_color;
/**
* Connectivity scores below that threshold will not be rendered.
*/
WPropDouble m_threshold;
/**
* For scale the thickness of the stipples.
*/
WPropDouble m_glyphThickness;
/**
* For initial slice positioning we need to control if the module is in intial state or not.
*/
bool m_first;
};
#endif // WMFIBERSTIPPLES_H
/* XPM */
static const char * WMFiberStipples_xpm[] = {
"32 32 310 2",
" c #FBFBFB",
". c #FCFCFC",
"+ c #C5C5C5",
"@ c #E4E4E4",
"# c #F3F3F3",
"$ c #FEFEFE",
"% c #FDFDFD",
"& c #2E2E2E",
"* c #474747",
"= c #808080",
"- c #BABABA",
"; c #FFFFFF",
"> c #F8F8F8",
", c #AFAFAF",
"' c #787878",
") c #4C4C4C",
"! c #5C5C5C",
"~ c #929292",
"{ c #D8D8D8",
"] c #E5E5E5",
"^ c #A2A2A2",
"/ c #656565",
"( c #484848",
"_ c #737373",
": c #C9C9C9",
"< c #EBEBEB",
"[ c #BEBEBE",
"} c #717171",
"| c #3E3E3E",
"1 c #4B4B4B",
"2 c #BDBDBD",
"3 c #F1F1F1",
"4 c #DCDCDC",
"5 c #9D9D9D",
"6 c #2A2A2A",
"7 c #2C2C2C",
"8 c #9F9F9F",
"9 c #FAFAFA",
"0 c #EFEFEF",
"a c #ADADAD",
"b c #363636",
"c c #0D0D0D",
"d c #FBFCFC",
"e c #FCFBFB",
"f c #DEDEDE",
"g c #0E0E0E",
"h c #585858",
"i c #C0C0C0",
"j c #FCFAFA",
"k c #FCFDFD",
"l c #757575",
"m c #222222",
"n c #A9A9A9",
"o c #F7F7F7",
"p c #FD9898",
"q c #FD9C9C",
"r c #FD9B9B",
"s c #FDB8B8",
"t c #FCF2F2",
"u c #FBFFFF",
"v c #FDFEFE",
"w c #909090",
"x c #3C3C3C",
"y c #8B8B8B",
"z c #C8C8C8",
"A c #F5F5F5",
"B c #FE3535",
"C c #FE2D2D",
"D c #FE2E2E",
"E c #FE2424",
"F c #FE2C2C",
"G c #FCD1D1",
"H c #FDA0A0",
"I c #FD8B8B",
"J c #FDB3B3",
"K c #FBFEFE",
"L c #FCD2D2",
"M c #FBC8C8",
"N c #FFFCFF",
"O c #FFFDFF",
"P c #FDFEFD",
"Q c #BBBBBB",
"R c #636363",
"S c #6A6A6A",
"T c #C1C1C1",
"U c #FCE3E3",
"V c #FCDCDC",
"W c #FCDDDD",
"X c #FCD6D6",
"Y c #FCBABA",
"Z c #FCD8D8",
"` c #FD6B6B",
" . c #FE3F3F",
".. c #FFA0A6",
"+. c #FF8990",
"@. c #90E7B2",
"#. c #C3F2D6",
"$. c #FBFDFD",
"%. c #CBCBCB",
"&. c #707070",
"*. c #4D4D4D",
"=. c #7D7D7D",
"-. c #F6F6F6",
";. c #FE2828",
">. c #FE5757",
",. c #FCE5E5",
"'. c #FCDEDE",
"). c #FCDFDF",
"!. c #FDF2F3",
"~. c #FEB0B2",
"{. c #78B06F",
"]. c #BACDAC",
"^. c #77AE6D",
"/. c #C1D7BA",
"(. c #FF464E",
"_. c #FDEAEA",
":. c #FEFFFF",