#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+# Author : Maxim Glibin
PROJECT(DifferenceTimesteps)
GUI_RESOURCE_FILES DifferenceTimestepsGUI.xml
)
-INSTALL(
- TARGETS DifferenceTimesteps
+INSTALL(TARGETS DifferenceTimesteps
DESTINATION lib/paraview
)
command="SetFirstTimeStepIndex"
number_of_elements="1"
default_values="0"
- animateable="1"
+ animateable="0"
information_property="RangeIndicesTimeStepsInfo">
<IntRangeDomain name="range" default_mode="min">
<RequiredProperties>
command="SetArrayNamePrefix"
number_of_elements="1"
animateable="0"
- default_values="diff_" >
+ default_values="diff_"
+ panel_visibility="advanced" >
<Documentation>
Prefix to a new array name.
</Documentation>
</StringVectorProperty>
+ <PropertyGroup label="Timing">
+ <Property name="FirstTimeStepIndex" />
+ <Property name="SecondTimeStepIndex" />
+ </PropertyGroup>
+ <PropertyGroup label="Additional attributes">
+ <Property name="ArrayNamePrefix" />
+ </PropertyGroup>
+ <Hints>
+ <Visibility replace_input="0" />
+ </Hints>
+
</SourceProxy>
</ProxyGroup>
</ServerManagerConfiguration>
--- /dev/null
+pv_plugin(DifferenceTimesteps
+ DESCRIPTION "Compute difference between two time steps"
+ DEFAULT_ENABLED)
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Maxim Glibin
#include "vtkDifferenceTimestepsFilter.h"
// Update range of indices of the time steps
this->RangeIndicesTimeSteps[0] = 0;
this->RangeIndicesTimeSteps[1] = this->NumberTimeSteps - 1;
-
+
+ /*
+ * RNV: Temporary commented:
+ * This piece of the code removes all time steps from the output object,
+ * but this leads to the strange side effect in the ParaView: time steps also disappears
+ * from the animation scene of the input (parent) object of this filter.
+ * Seems it is a bug of the ParaView, to be investigated ...
+ *
// The output data of this filter has no time associated with it.
// It is the result of computation difference between two time steps.
// Unset the time steps
// Unset the time range
if(anOutInfo->Has(vtkStreamingDemandDrivenPipeline::TIME_RANGE()))
anOutInfo->Remove(vtkStreamingDemandDrivenPipeline::TIME_RANGE());
-
+ */
return 1;
}
anOutputArray = this->DifferenceDataArray(&anArrays[0], anArrays[0]->GetNumberOfTuples());
// Determine a field association
- if (this->GetInputFieldAssociation() == vtkDataObject::FIELD_ASSOCIATION_POINTS)
+ int aTypeFieldAssociation = this->GetInputFieldAssociation();
+ if (aTypeFieldAssociation == vtkDataObject::FIELD_ASSOCIATION_POINTS)
{
// For point data
anOutput->GetPointData()->AddArray(anOutputArray);
}
- else if (this->GetInputFieldAssociation() == vtkDataObject::FIELD_ASSOCIATION_CELLS)
+ else if (aTypeFieldAssociation == vtkDataObject::FIELD_ASSOCIATION_CELLS)
{
// For cell data
anOutput->GetCellData()->AddArray(anOutputArray);
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Maxim Glibin
-#ifndef __DifferenceTimestepsFilter_h
-#define __DifferenceTimestepsFilter_h
+#ifndef __DifferenceTimestepsFilter_h_
+#define __DifferenceTimestepsFilter_h_
#include <vtkMultiTimeStepAlgorithm.h>
bool VerifyArrays(vtkDataArray **theArrays, int theNumArrays);
};
-#endif // __DifferenceTimestepsFilter_h
+#endif // __DifferenceTimestepsFilter_h_