Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask array in Smoothing #29

Merged
merged 6 commits into from
Jul 4, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(ScalarFieldSmoother): add mask feature to cmd standalone
  • Loading branch information
Charles Gueunet committed Jul 3, 2017
commit 386d5366a753fa45793da226e1207ee5f86c6ca8
8 changes: 7 additions & 1 deletion standalone/ScalarFieldSmoother/cmd/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ int main(int argc, char **argv) {
vtkProgram<ttkScalarFieldSmoother> program;

// specify local parameters to the TTK module with default values.
int iterationNumber = 1, scalarFieldId = 0;
int iterationNumber = 1, scalarFieldId = 0, maskId = -1;

// register these arguments to the command line parser
program.parser_.setArgument("I", &iterationNumber,
"Iteration number", true);
program.parser_.setArgument("F", &scalarFieldId,
"Scalar field identifier", true);
program.parser_.setArgument("M", &maskId,
"Mask field identifier", true);

int ret = program.init(argc, argv);

Expand All @@ -29,6 +31,10 @@ int main(int argc, char **argv) {
// to execution.
program.ttkObject_->SetNumberOfIterations(iterationNumber);
program.ttkObject_->SetScalarFieldIdentifier(scalarFieldId);
if (maskId != -1) {
program.ttkObject_->SetUseInputMask(true);
program.ttkObject_->SetMaskIdentifier(maskId);
}

// execute data processing
ret = program.run();
Expand Down