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

[MergeTreeTemporalReduction] rename encoding #975

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 8 additions & 0 deletions core/base/mergeTreeTemporalReduction/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ttk_add_base_library(mergeTreeTemporalReduction
SOURCES
MergeTreeTemporalReduction.cpp
HEADERS
MergeTreeTemporalReduction.h
DEPENDS
mergeTreeClustering
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <MergeTreeTemporalReduction.h>

ttk::MergeTreeTemporalReduction::MergeTreeTemporalReduction() {
// inherited from Debug: prefix will be printed at the beginning of every msg
this->setDebugMsgPrefix("MergeTreeTemporalReduction");
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// \ingroup base
/// \class ttk::MergeTreeTemporalReductionEncoding
/// \class ttk::MergeTreeTemporalReduction
/// \author Mathieu Pont (mathieu.pont@lip6.fr)
/// \date 2021.
///
/// This module defines the %MergeTreeTemporalReductionEncoding class that
/// This module defines the %MergeTreeTemporalReduction class that
/// computes a temporal reduction of a sequence of merge trees.
///
/// \b Related \b publication \n
Expand All @@ -30,11 +30,11 @@
namespace ttk {

/**
* The MergeTreeTemporalReductionEncoding class provides methods to compute
* The MergeTreeTemporalReduction class provides methods to compute
* a temporal reduction of a sequence of merge trees.
*/
class MergeTreeTemporalReductionEncoding : virtual public Debug,
public MergeTreeBase {
class MergeTreeTemporalReduction : virtual public Debug,
public MergeTreeBase {
protected:
double removalPercentage_ = 50.;
bool useL2Distance_ = false;
Expand All @@ -43,7 +43,7 @@ namespace ttk {
std::vector<double> timeVariable_;

public:
MergeTreeTemporalReductionEncoding();
MergeTreeTemporalReduction();

void setRemovalPercentage(double rs) {
removalPercentage_ = rs;
Expand Down Expand Up @@ -397,6 +397,6 @@ namespace ttk {
return removed;
}

}; // MergeTreeTemporalReductionEncoding class
}; // MergeTreeTemporalReduction class

} // namespace ttk
8 changes: 0 additions & 8 deletions core/base/mergeTreeTemporalReductionEncoding/CMakeLists.txt

This file was deleted.

This file was deleted.

11 changes: 11 additions & 0 deletions core/vtk/ttkMergeTreeTemporalReduction/ttk.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
NAME
ttkMergeTreeTemporalReduction
SOURCES
ttkMergeTreeTemporalReduction.cpp
HEADERS
ttkMergeTreeTemporalReduction.h
ttkMergeTreeTemporalReductionUtils.h
DEPENDS
mergeTreeTemporalReduction
ttkAlgorithm
ttkPlanarGraphLayout
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <ttkMergeTreeTemporalReductionEncoding.h>
#include <ttkMergeTreeTemporalReduction.h>

#include <ttkMergeTreeUtils.h>
#include <ttkMergeTreeVisualization.h>
Expand All @@ -20,7 +20,7 @@ using namespace ttk::ftm;

// A VTK macro that enables the instantiation of this class via ::New()
// You do not have to modify this
vtkStandardNewMacro(ttkMergeTreeTemporalReductionEncoding);
vtkStandardNewMacro(ttkMergeTreeTemporalReduction);

/**
* The constructor has to specify the number of input and output ports
Expand All @@ -32,20 +32,19 @@ vtkStandardNewMacro(ttkMergeTreeTemporalReductionEncoding);
* explicitly, by for example allocating memory on the heap that needs
* to be freed when the filter is destroyed.
*/
ttkMergeTreeTemporalReductionEncoding::ttkMergeTreeTemporalReductionEncoding() {
ttkMergeTreeTemporalReduction::ttkMergeTreeTemporalReduction() {
this->SetNumberOfInputPorts(1);
this->SetNumberOfOutputPorts(2);
}

ttkMergeTreeTemporalReductionEncoding::~ttkMergeTreeTemporalReductionEncoding()
= default;
ttkMergeTreeTemporalReduction::~ttkMergeTreeTemporalReduction() = default;

/**
* This method specifies the required input object data types of the
* filter by adding the vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE() key to
* the port information.
*/
int ttkMergeTreeTemporalReductionEncoding::FillInputPortInformation(
int ttkMergeTreeTemporalReduction::FillInputPortInformation(
int port, vtkInformation *info) {
if(port == 0) {
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkMultiBlockDataSet");
Expand All @@ -67,7 +66,7 @@ int ttkMergeTreeTemporalReductionEncoding::FillInputPortInformation(
* Note: prior to the execution of the RequestData method the pipeline will
* initialize empty output data objects based on this information.
*/
int ttkMergeTreeTemporalReductionEncoding::FillOutputPortInformation(
int ttkMergeTreeTemporalReduction::FillOutputPortInformation(
int port, vtkInformation *info) {
if(port == 0) {
info->Set(vtkDataObject::DATA_TYPE_NAME(), "vtkMultiBlockDataSet");
Expand All @@ -89,7 +88,7 @@ int ttkMergeTreeTemporalReductionEncoding::FillOutputPortInformation(
* 2) The output objects are already initialized based on the information
* provided by the FillOutputPortInformation method.
*/
int ttkMergeTreeTemporalReductionEncoding::RequestData(
int ttkMergeTreeTemporalReduction::RequestData(
vtkInformation *ttkNotUsed(request),
vtkInformationVector **inputVector,
vtkInformationVector *outputVector) {
Expand All @@ -116,7 +115,7 @@ int ttkMergeTreeTemporalReductionEncoding::RequestData(
}

template <class dataType>
int ttkMergeTreeTemporalReductionEncoding::run(
int ttkMergeTreeTemporalReduction::run(
vtkInformationVector *outputVector,
std::vector<vtkSmartPointer<vtkMultiBlockDataSet>> &inputTrees) {
if(not isDataVisualizationFilled())
Expand Down Expand Up @@ -153,7 +152,7 @@ static std::vector<vtkSmartPointer<vtkDataSet>>
}

template <class dataType>
int ttkMergeTreeTemporalReductionEncoding::runCompute(
int ttkMergeTreeTemporalReduction::runCompute(
std::vector<vtkSmartPointer<vtkMultiBlockDataSet>> &inputTrees) {
// ------------------------------------------------------------------------------------
// --- Construct trees
Expand Down Expand Up @@ -221,7 +220,7 @@ int ttkMergeTreeTemporalReductionEncoding::runCompute(
}

template <class dataType>
int ttkMergeTreeTemporalReductionEncoding::runOutput(
int ttkMergeTreeTemporalReduction::runOutput(
vtkInformationVector *outputVector,
std::vector<vtkSmartPointer<vtkMultiBlockDataSet>> &inputTrees) {
bool const OutputSegmentation = (inputTrees[0]->GetNumberOfBlocks() == 3);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/// \ingroup vtk
/// \class ttkMergeTreeTemporalReductionEncoding
/// \class ttkMergeTreeTemporalReduction
/// \author Mathieu Pont (mathieu.pont@lip6.fr)
/// \date 2021.
///
/// \brief TTK VTK-filter that wraps the ttk::MergeTreeTemporalReductionEncoding
/// \brief TTK VTK-filter that wraps the ttk::MergeTreeTemporalReduction
/// module.
///
/// This VTK filter uses the ttk::MergeTreeTemporalReductionEncoding module to
/// This VTK filter uses the ttk::MergeTreeTemporalReduction module to
/// compute a temporal reduction of a sequence of merge trees.
///
/// \param Input vtkMultiBlockDataSet Input trees
Expand All @@ -19,7 +19,7 @@
/// See the related ParaView example state files for usage examples within a
/// VTK pipeline.
///
/// \sa ttk::MergeTreeTemporalReductionEncoding
/// \sa ttk::MergeTreeTemporalReduction
/// \sa ttkAlgorithm
///
/// \b Related \b publication \n
Expand All @@ -36,7 +36,7 @@
#pragma once

// VTK Module
#include <ttkMergeTreeTemporalReductionEncodingModule.h>
#include <ttkMergeTreeTemporalReductionModule.h>

// VTK Includes
#include <ttkAlgorithm.h>
Expand All @@ -45,14 +45,13 @@
#include <vtkUnstructuredGrid.h>

// TTK Base Includes
#include <MergeTreeTemporalReductionEncoding.h>
#include <MergeTreeTemporalReduction.h>

class TTKMERGETREETEMPORALREDUCTIONENCODING_EXPORT
ttkMergeTreeTemporalReductionEncoding
class TTKMERGETREETEMPORALREDUCTION_EXPORT ttkMergeTreeTemporalReduction
: public ttkAlgorithm // we inherit from the generic ttkAlgorithm class
,
protected ttk::MergeTreeTemporalReductionEncoding // and we inherit from the
// base class
protected ttk::MergeTreeTemporalReduction // and we inherit from the
// base class
{
private:
// Execution options
Expand Down Expand Up @@ -213,16 +212,16 @@ class TTKMERGETREETEMPORALREDUCTIONENCODING_EXPORT
* This static method and the macro below are VTK conventions on how to
* instantiate VTK objects. You don't have to modify this.
*/
static ttkMergeTreeTemporalReductionEncoding *New();
vtkTypeMacro(ttkMergeTreeTemporalReductionEncoding, ttkAlgorithm);
static ttkMergeTreeTemporalReduction *New();
vtkTypeMacro(ttkMergeTreeTemporalReduction, ttkAlgorithm);

protected:
/**
* Implement the filter constructor and destructor
* (see cpp file)
*/
ttkMergeTreeTemporalReductionEncoding();
~ttkMergeTreeTemporalReductionEncoding() override;
ttkMergeTreeTemporalReduction();
~ttkMergeTreeTemporalReduction() override;

/**
* Specify the input data type of each input port
Expand Down
4 changes: 4 additions & 0 deletions core/vtk/ttkMergeTreeTemporalReduction/vtk.module
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NAME
ttkMergeTreeTemporalReduction
DEPENDS
ttkAlgorithm
11 changes: 0 additions & 11 deletions core/vtk/ttkMergeTreeTemporalReductionEncoding/ttk.module

This file was deleted.

4 changes: 0 additions & 4 deletions core/vtk/ttkMergeTreeTemporalReductionEncoding/vtk.module

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<!-- Good resources are: IcoSphere.xml, PersistenceDiagram.xml, and ArrayEditor.xml -->
<ServerManagerConfiguration>
<ProxyGroup name="filters">
<SourceProxy name="ttkMergeTreeTemporalReductionEncoding" class="ttkMergeTreeTemporalReductionEncoding" label="TTK MergeTreeTemporalReductionEncoding">
<Documentation long_help="MergeTreeTemporalReductionEncoding Long" short_help="MergeTreeTemporalReductionEncoding Short">
<SourceProxy name="ttkMergeTreeTemporalReduction" class="ttkMergeTreeTemporalReduction" label="TTK MergeTreeTemporalReduction">
<Documentation long_help="MergeTreeTemporalReduction Long" short_help="MergeTreeTemporalReduction Short">
This filter allows to compute a temporal reduction of a sequence of merge trees.

It greedily removes trees in the sequence that can be accurately reconstructed with the geodesic computation. This iterated removal reveals key frames in the sequence (the trees that are not removed and used to reconstruct the removed trees).
Expand Down
Loading