Viskores  1.0
SelectTopVolumeBranchesFilter.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 // Copyright (c) 2018, The Regents of the University of California, through
19 // Lawrence Berkeley National Laboratory (subject to receipt of any required approvals
20 // from the U.S. Dept. of Energy). All rights reserved.
21 //
22 // Redistribution and use in source and binary forms, with or without modification,
23 // are permitted provided that the following conditions are met:
24 //
25 // (1) Redistributions of source code must retain the above copyright notice, this
26 // list of conditions and the following disclaimer.
27 //
28 // (2) Redistributions in binary form must reproduce the above copyright notice,
29 // this list of conditions and the following disclaimer in the documentation
30 // and/or other materials provided with the distribution.
31 //
32 // (3) Neither the name of the University of California, Lawrence Berkeley National
33 // Laboratory, U.S. Dept. of Energy nor the names of its contributors may be
34 // used to endorse or promote products derived from this software without
35 // specific prior written permission.
36 //
37 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
38 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
39 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
40 // IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
41 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
42 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
43 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
44 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
45 // OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
46 // OF THE POSSIBILITY OF SUCH DAMAGE.
47 //
48 //=============================================================================
49 
50 #ifndef viskores_filter_scalar_topology_SelectTopVolumeBranchesFilter_h
51 #define viskores_filter_scalar_topology_SelectTopVolumeBranchesFilter_h
52 
53 #include <viskores/filter/Filter.h>
55 
56 namespace viskores
57 {
58 namespace filter
59 {
60 namespace scalar_topology
61 {
62 
64 class VISKORES_FILTER_SCALAR_TOPOLOGY_EXPORT SelectTopVolumeBranchesFilter
66 {
67 public:
69 
70  VISKORES_CONT void SetSavedBranches(const viskores::Id& numBranches)
71  {
72  this->NumSavedBranches = numBranches;
73  }
74 
76  {
77  this->PresimplifyThreshold = presimpThres;
78  }
79 
80  VISKORES_CONT viskores::Id GetSavedBranches() { return this->NumSavedBranches; }
81  VISKORES_CONT viskores::Id GetPresimplifyThreshold() { return this->PresimplifyThreshold; }
82  VISKORES_CONT viskores::cont::LogLevel GetTimingsLogLevel() { return this->TimingsLogLevel; }
83 
84 private:
87  const viskores::cont::PartitionedDataSet& inData) override;
88 
89  viskores::Id NumSavedBranches = 1;
90  viskores::Id PresimplifyThreshold = 0;
95 
96  // the parent branch for top volume branches
97  // we only care about the parent branch for top volume branches at the moment
98  // as a result, the index stored in this array follows the descending order of branch volumes
100 
103 };
104 
105 } // namespace scalar_topology
106 } // namespace worklet
107 } // namespace viskores
108 
109 #endif
viskores::filter::scalar_topology::SelectTopVolumeBranchesFilter::SetSavedBranches
void SetSavedBranches(const viskores::Id &numBranches)
Definition: SelectTopVolumeBranchesFilter.h:70
viskores::filter::scalar_topology::SelectTopVolumeBranchesFilter::BranchVolume
viskores::cont::ArrayHandle< viskores::Id > BranchVolume
Definition: SelectTopVolumeBranchesFilter.h:91
viskores::filter::scalar_topology::SelectTopVolumeBranchesFilter::GetPresimplifyThreshold
viskores::Id GetPresimplifyThreshold()
Definition: SelectTopVolumeBranchesFilter.h:81
viskores::cont::DataSet
Contains and manages the geometric data structures that Viskores operates on.
Definition: DataSet.h:66
viskores::filter::scalar_topology::SelectTopVolumeBranchesFilter::BranchSaddleIsoValue
viskores::cont::UnknownArrayHandle BranchSaddleIsoValue
Definition: SelectTopVolumeBranchesFilter.h:94
viskores::filter::Filter
Base class for all filters.
Definition: Filter.h:171
viskores::cont::ArrayHandle< viskores::Id >
viskores::filter::scalar_topology::SelectTopVolumeBranchesFilter
Compute branch decompostion from distributed contour tree.
Definition: SelectTopVolumeBranchesFilter.h:64
viskores::filter::scalar_topology::SelectTopVolumeBranchesFilter::GetTimingsLogLevel
viskores::cont::LogLevel GetTimingsLogLevel()
Definition: SelectTopVolumeBranchesFilter.h:82
viskores::filter::scalar_topology::SelectTopVolumeBranchesFilter::BranchSaddleEpsilon
viskores::cont::ArrayHandle< viskores::Id > BranchSaddleEpsilon
Definition: SelectTopVolumeBranchesFilter.h:92
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
VISKORES_CONT
#define VISKORES_CONT
Definition: ExportMacros.h:65
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::cont::LogLevel
LogLevel
Log levels for use with the logging macros.
Definition: Logging.h:311
viskores::cont::PartitionedDataSet
Comprises a set of viskores::cont::DataSet objects.
Definition: PartitionedDataSet.h:34
viskores::filter::scalar_topology::SelectTopVolumeBranchesFilter::GetSavedBranches
viskores::Id GetSavedBranches()
Definition: SelectTopVolumeBranchesFilter.h:80
viskores::filter::scalar_topology::SelectTopVolumeBranchesFilter::SortedBranchByVolume
viskores::cont::ArrayHandle< viskores::Id > SortedBranchByVolume
Definition: SelectTopVolumeBranchesFilter.h:93
viskores::filter::scalar_topology::SelectTopVolumeBranchesFilter::SetPresimplifyThreshold
void SetPresimplifyThreshold(const viskores::Id &presimpThres)
Definition: SelectTopVolumeBranchesFilter.h:75
viskores::cont::LogLevel::Perf
@ Perf
General timing data and algorithm flow information, such as filter execution, worklet dispatches,...
viskores::cont::UnknownArrayHandle
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:451
viskores_filter_scalar_topology_export.h
viskores::filter::scalar_topology::SelectTopVolumeBranchesFilter::TopVolBranchParent
viskores::cont::ArrayHandle< viskores::Id > TopVolBranchParent
Definition: SelectTopVolumeBranchesFilter.h:99
Filter.h