Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
0639101c
Commit
0639101c
authored
Mar 04, 2013
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] added module to sample points on a fiber dataset whose parameter-field is filled
parent
5354c09d
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
483 additions
and
2 deletions
+483
-2
src/modules/fibersToPoints/WMFibersToPoints.cpp
src/modules/fibersToPoints/WMFibersToPoints.cpp
+2
-2
src/modules/modules-others.toolbox
src/modules/modules-others.toolbox
+1
-0
src/modules/sampleOnFibers/WMSampleOnFibers.cpp
src/modules/sampleOnFibers/WMSampleOnFibers.cpp
+281
-0
src/modules/sampleOnFibers/WMSampleOnFibers.h
src/modules/sampleOnFibers/WMSampleOnFibers.h
+139
-0
src/modules/sampleOnFibers/resources/META
src/modules/sampleOnFibers/resources/META
+60
-0
No files found.
src/modules/fibersToPoints/WMFibersToPoints.cpp
View file @
0639101c
...
...
@@ -179,7 +179,7 @@ void WMFibersToPoints::moduleMain()
WProgress
::
SPtr
progress
=
WProgress
::
SPtr
(
new
WProgress
(
"Creating Points from Fibers."
)
);
m_progress
->
addSubProgress
(
progress
);
debugLog
()
<<
"Creating point data. Num Points = "
<<
dataSet
->
getVertices
()
->
size
()
<<
"."
;
debugLog
()
<<
"Creating point data. Num Points = "
<<
dataSet
->
getVertices
()
->
size
()
/
3
<<
"."
;
WDataSetFibers
::
VertexArray
fibVerts
=
dataSet
->
getVertices
();
WDataSetFibers
::
ColorArray
fibColors
=
dataSet
->
getColorScheme
()
->
getColor
();
WDataSetFibers
::
VertexParemeterArray
fibParams
=
dataSet
->
getVertexParameters
();
...
...
@@ -225,7 +225,7 @@ void WMFibersToPoints::moduleMain()
}
debugLog
()
<<
"Done filtering. Result are "
<<
filteredVerts
->
size
()
<<
" points."
;
debugLog
()
<<
"Done filtering. Result are "
<<
filteredVerts
->
size
()
/
3
<<
" points."
;
WDataSetPoints
::
SPtr
result
(
new
WDataSetPoints
(
filteredVerts
,
filteredColors
,
filteredBB
)
);
m_pointsOutput
->
updateData
(
result
);
...
...
src/modules/modules-others.toolbox
View file @
0639101c
...
...
@@ -27,6 +27,7 @@ ADD_MODULE( mergePoints )
ADD_MODULE( paintTexture )
ADD_MODULE( pointRenderer )
ADD_MODULE( probTractDisplay )
ADD_MODULE( sampleOnFibers )
ADD_MODULE( scalarSegmentation )
ADD_MODULE( splineSurface )
ADD_MODULE( surfaceIllustrator )
...
...
src/modules/sampleOnFibers/WMSampleOnFibers.cpp
0 → 100644
View file @
0639101c
This diff is collapsed.
Click to expand it.
src/modules/sampleOnFibers/WMSampleOnFibers.h
0 → 100644
View file @
0639101c
//---------------------------------------------------------------------------
//
// 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 WMSAMPLEONFIBERS_H
#define WMSAMPLEONFIBERS_H
#include <string>
#include "core/dataHandler/WDataSetFibers.h"
#include "core/dataHandler/WDataSetPoints.h"
#include "core/kernel/WModule.h"
#include "core/kernel/WModuleInputData.h"
#include "core/kernel/WModuleOutputData.h"
/**
* This modules takes a fiber dataset and samples it at a given parameter value.
*
* \ingroup modules
*/
class
WMSampleOnFibers
:
public
WModule
{
public:
/**
* Default constructor.
*/
WMSampleOnFibers
();
/**
* Destructor.
*/
virtual
~
WMSampleOnFibers
();
/**
* 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:
/**
* The fiber dataset which is going to be used.
*/
boost
::
shared_ptr
<
WModuleInputData
<
WDataSetFibers
>
>
m_fiberInput
;
/**
* The output connector used to provide the calculated point data to other modules.
*/
boost
::
shared_ptr
<
WModuleOutputData
<
WDataSetPoints
>
>
m_pointsOutput
;
/**
* A condition used to notify about changes in several properties.
*/
boost
::
shared_ptr
<
WCondition
>
m_propCondition
;
/**
* A string which informs the user whether filtering is possible.
*/
WPropString
m_paramHint
;
/**
* The color to use for the resulting points.
*/
WPropColor
m_color
;
/**
* Filter fib point according to its parameter value and this value.
*/
WPropDouble
m_parameter
;
/**
* fiber parameter max
*/
double
m_parameterMax
;
/**
* fiber parameter min
*/
double
m_parameterMin
;
};
#endif // WMSAMPLEONFIBERS_H
src/modules/sampleOnFibers/resources/META
0 → 100644
View file @
0639101c
//---------------------------------------------------------------------------
//
// 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/>.
//
//---------------------------------------------------------------------------
// Provide additional material and descriptions for your module. You can
// provide this for multiple modules if you like.
// NOTE: everything but the module name is optional, even if this makes no
// sense at all.
// This defines some properties of the module "Template". This must
// match the name specified in WMTemplate::getName().
"Sample On Fibers"
{
// Provide an icon. If the icon exists, it overrides the one provided by your
// getXPMIcon method. This path is relative to your module's resource directory.
// icon="icon.png";
// Where to find the module?
website = "http://www.openwalnut.org";
// Provide a description, If you do so, this description overrides the one
// provided by your getDescription method.
// HINT: multi-line strings are not supported. Please provide long texts in
// one line.
description = "This module allows you to sample points on fibers using the parameters on ea fiber.";
// Provide a list of authors. These authors can have further information associated with them.
author = "OpenWalnut Project";
// Provide author information. Especially a contact address is very handy.
// This associates some URL and Mail contact info to "OpenWalnut Project".
"OpenWalnut Project"
{
url="http://www.openwalnut.org";
email="contact@openwalnut.org";
what="Design, Development and Bug fixing";
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment