Commit fb5f7234 authored by Ken Martin's avatar Ken Martin
Browse files

merges for volume rendergin fixes

parent 13525126
......@@ -83,7 +83,7 @@
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPVData);
vtkCxxRevisionMacro(vtkPVData, "1.292");
vtkCxxRevisionMacro(vtkPVData, "1.292.2.1");
int vtkPVDataCommand(ClientData cd, Tcl_Interp *interp,
int argc, char *argv[]);
......@@ -103,10 +103,12 @@ vtkPVData::vtkPVData()
this->CubeAxes = NULL;
this->EditColorMapVisible = 1;
this->MapScalarsVisible = 1;
this->EditColorMapButtonVisible = 1;
this->MapScalarsCheckVisible = 1;
this->ColorButtonVisible = 1;
this->ScalarBarVisible = 1;
this->ScalarBarCheckVisible = 1;
this->InterpolateColorsCheckVisible = 1;
this->CurrentColorAttributeIsFromCellData = 0;
// Create a unique id for creating tcl names.
++instanceCount;
......@@ -660,6 +662,7 @@ void vtkPVData::CreateProperties()
this->ColorButton->GetWidgetName(),
col_1_padx, button_pady);
this->ColorButtonVisible = 0;
this->InterpolateColorsCheckVisible = 0;
this->Script("grid %s %s -sticky wns",
this->InterpolateColorsCheck->GetWidgetName(),
......@@ -667,8 +670,8 @@ void vtkPVData::CreateProperties()
this->Script("grid %s -sticky news -padx %d -pady %d",
this->EditColorMapButton->GetWidgetName(),
col_1_padx, button_pady);
this->MapScalarsVisible = 0;
this->EditColorMapVisible = 0;
this->MapScalarsCheckVisible = 0;
this->EditColorMapButtonVisible = 0;
// Volume Appearance
this->SetVolumeAppearanceEditor(this->GetPVApplication()->GetMainWindow()->
......@@ -1505,7 +1508,7 @@ void vtkPVData::UpdatePropertiesInternal()
for (idx = 0; idx < num; ++idx)
{
part = this->GetPVSource()->GetPart(idx);
part->GetPartDisplay()->InitializeTransferFunctions(volRenArray);
part->GetPartDisplay()->InitializeTransferFunctions(volRenArray, dataInfo);
}
}
}
......@@ -1618,10 +1621,11 @@ void vtkPVData::ColorByPropertyInternal()
this->SetPVColorMap(NULL);
this->MapScalarsVisible = 0;
this->EditColorMapVisible = 0;
this->ScalarBarVisible = 0;
this->MapScalarsCheckVisible = 0;
this->EditColorMapButtonVisible = 0;
this->ScalarBarCheckVisible = 0;
this->InterpolateColorsCheckVisible = 0;
this->CurrentColorAttributeIsFromCellData = 0;
this->ColorButtonVisible = 1;
this->UpdateEnableState();
......@@ -1664,7 +1668,7 @@ void vtkPVData::VolumeRenderPointField(const char *name)
for (idx = 0; idx < num; ++idx)
{
part = this->GetPVSource()->GetPart(idx);
part->GetPartDisplay()->ResetTransferFunctions(arrayInfo);
part->GetPartDisplay()->ResetTransferFunctions(arrayInfo, dataInfo);
}
this->VolumeScalarsMenu->SetValue(str);
......@@ -1744,6 +1748,8 @@ void vtkPVData::ColorByPointFieldInternal(const char *name, int numComps)
part->GetPartDisplay()->ColorByArray(this->PVColorMap, VTK_POINT_DATA_FIELD);
}
this->ColorButtonVisible = 0;
this->InterpolateColorsCheckVisible = 1;
this->CurrentColorAttributeIsFromCellData = 0;
this->UpdateMapScalarsCheck(
this->PVSource->GetDataInformation()->GetPointDataInformation(),
name);
......@@ -1809,6 +1815,14 @@ void vtkPVData::ColorByCellFieldInternal(const char *name, int numComps)
}
this->ColorButtonVisible = 0;
this->InterpolateColorsCheckVisible = 0;
// We have to remember that the current color attribute is from cell data.
// InterpolateColors is not applicable for cell attriubtes we have
// to know a cell attribute is current so that we do not enable the
// interpolate button when map scalars is turned on.
this->CurrentColorAttributeIsFromCellData = 1;
this->UpdateMapScalarsCheck(
this->PVSource->GetDataInformation()->GetCellDataInformation(),
name);
......@@ -1834,9 +1848,10 @@ void vtkPVData::UpdateMapScalarsCheck(vtkPVDataSetAttributesInformation* info,
arrayInfo->GetDataType() != VTK_UNSIGNED_CHAR)
{ // Direct mapping not an option.
this->MapScalarsCheck->SetState(1);
this->MapScalarsVisible = 1;
this->ScalarBarVisible = 1;
this->EditColorMapVisible = 1;
this->MapScalarsCheckVisible = 0;
this->ScalarBarCheckVisible = 1;
this->EditColorMapButtonVisible = 1;
this->UpdateEnableState();
// Tell all of the part displays to map scalars.
int num, idx;
......@@ -1853,9 +1868,10 @@ void vtkPVData::UpdateMapScalarsCheck(vtkPVDataSetAttributesInformation* info,
{ // I would like to have two as an option also ...
// One component causes more trouble than it is worth.
this->MapScalarsCheck->SetState(1);
this->MapScalarsVisible = 0;
this->ScalarBarVisible = 1;
this->EditColorMapVisible = 1;
this->MapScalarsCheckVisible = 0;
this->ScalarBarCheckVisible = 1;
this->EditColorMapButtonVisible = 1;
this->UpdateEnableState();
// Tell all of the part displays to map scalars.
int num, idx;
num = this->PVSource->GetNumberOfParts();
......@@ -1868,20 +1884,21 @@ void vtkPVData::UpdateMapScalarsCheck(vtkPVDataSetAttributesInformation* info,
}
// Direct color map is an option.
this->MapScalarsVisible = 1;
this->MapScalarsCheckVisible = 1;
// I might like to store the default in another variable.
if (this->MapScalarsCheck->GetState())
{
this->ScalarBarVisible = 1;
this->EditColorMapVisible = 1;
this->ScalarBarCheckVisible = 1;
this->EditColorMapButtonVisible = 1;
}
else
{
this->ScalarBarVisible = 0;
this->EditColorMapVisible = 0;
this->ScalarBarCheckVisible = 0;
this->EditColorMapButtonVisible = 0;
this->InterpolateColorsCheckVisible = 0;
}
this->UpdateEnableState();
}
//----------------------------------------------------------------------------
......@@ -2703,14 +2720,21 @@ void vtkPVData::SetMapScalarsFlag(int val)
if (val)
{
this->EditColorMapVisible = 1;
this->ScalarBarVisible = 1;
this->EditColorMapButtonVisible = 1;
this->ScalarBarCheckVisible = 1;
this->InterpolateColorsCheckVisible = 1;
if (this->CurrentColorAttributeIsFromCellData)
{
this->InterpolateColorsCheckVisible = 0;
}
}
else
{
this->EditColorMapVisible = 0;
this->ScalarBarVisible = 0;
this->EditColorMapButtonVisible = 0;
this->ScalarBarCheckVisible = 0;
this->InterpolateColorsCheckVisible = 0;
}
this->UpdateEnableState();
int num, idx;
num = this->PVSource->GetNumberOfParts();
......@@ -3709,7 +3733,7 @@ void vtkPVData::UpdateEnableState()
this->PropagateEnableState(this->ColorMenu);
this->PropagateEnableState(this->VolumeScalarsMenuLabel);
this->PropagateEnableState(this->VolumeScalarsMenu);
if ( this->EditColorMapVisible )
if ( this->EditColorMapButtonVisible )
{
this->PropagateEnableState(this->EditColorMapButton);
}
......@@ -3717,7 +3741,7 @@ void vtkPVData::UpdateEnableState()
{
this->EditColorMapButton->SetEnabled(0);
}
if ( this->MapScalarsVisible)
if ( this->MapScalarsCheckVisible)
{
this->PropagateEnableState(this->MapScalarsCheck);
}
......@@ -3725,6 +3749,14 @@ void vtkPVData::UpdateEnableState()
{
this->MapScalarsCheck->SetEnabled(0);
}
if ( this->InterpolateColorsCheckVisible)
{
this->PropagateEnableState(this->InterpolateColorsCheck);
}
else
{
this->InterpolateColorsCheck->SetEnabled(0);
}
if ( this->PVColorMap || !this->ColorButtonVisible )
{
this->ColorButton->SetEnabled(0);
......@@ -3736,7 +3768,7 @@ void vtkPVData::UpdateEnableState()
this->PropagateEnableState(this->RepresentationMenuLabel);
this->PropagateEnableState(this->RepresentationMenu);
this->PropagateEnableState(this->VisibilityCheck);
if ( this->ScalarBarVisible )
if ( this->ScalarBarCheckVisible )
{
this->PropagateEnableState(this->ScalarBarCheck);
}
......
......@@ -438,10 +438,17 @@ protected:
int VolumeRenderMode;
int MapScalarsVisible;
int EditColorMapVisible;
// Keep widget enabled state so they can be disabled globally
int MapScalarsCheckVisible;
int InterpolateColorsCheckVisible;
int EditColorMapButtonVisible;
int ColorButtonVisible;
int ScalarBarVisible;
int ScalarBarCheckVisible;
// We have to remember when the current color attribute is from cell data.
// InterpolateColors is not applicable for cell attriubtes we have
// to know a cell attribute is current so that we do not enable the
// interpolate button when map scalars is turned on.
int CurrentColorAttributeIsFromCellData;
vtkPVColorMap *PVColorMap;
......
......@@ -38,17 +38,17 @@
#include "vtkTimerLog.h"
#include "vtkToolkits.h"
#include "vtkPVRenderView.h"
#include "vtkVolume.h"
#include "vtkVolumeProperty.h"
#include "vtkPiecewiseFunction.h"
#include "vtkColorTransferFunction.h"
#include "vtkUnstructuredGridVolumeRayCastMapper.h"
#include "vtkPVArrayInformation.h"
#include "vtkPVDataInformation.h"
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPVPartDisplay);
vtkCxxRevisionMacro(vtkPVPartDisplay, "1.40");
vtkCxxRevisionMacro(vtkPVPartDisplay, "1.40.2.1");
//----------------------------------------------------------------------------
......@@ -689,7 +689,8 @@ void vtkPVPartDisplay::VolumeRenderModeOff()
//----------------------------------------------------------------------------
void vtkPVPartDisplay::InitializeTransferFunctions(vtkPVArrayInformation *info)
void vtkPVPartDisplay::InitializeTransferFunctions(vtkPVArrayInformation *arrayInfo,
vtkPVDataInformation *dataInfo )
{
vtkPVApplication *pvApp = this->GetPVApplication();
vtkPVProcessModule* pm = pvApp->GetProcessModule();
......@@ -701,17 +702,29 @@ void vtkPVPartDisplay::InitializeTransferFunctions(vtkPVArrayInformation *info)
// need to initialize only if there are no points in the function
if ( opacityFunc->GetSize() == 0 )
{
this->ResetTransferFunctions(info);
this->ResetTransferFunctions(arrayInfo, dataInfo);
}
}
//----------------------------------------------------------------------------
void vtkPVPartDisplay::ResetTransferFunctions(vtkPVArrayInformation *info)
void vtkPVPartDisplay::ResetTransferFunctions(vtkPVArrayInformation *arrayInfo,
vtkPVDataInformation *dataInfo)
{
double range[2];
arrayInfo->GetComponentRange(0, range);
double bounds[6];
dataInfo->GetBounds(bounds);
double diameter =
sqrt( (bounds[1] - bounds[0]) * (bounds[1] - bounds[0]) +
(bounds[3] - bounds[2]) * (bounds[3] - bounds[2]) +
(bounds[5] - bounds[4]) * (bounds[5] - bounds[4]) );
info->GetComponentRange(0, range);
int numCells = dataInfo->GetNumberOfCells();
double linearNumCells = pow( (double) numCells, (1.0/3.0) );
double unitDistance = diameter / linearNumCells;
vtkPVApplication *pvApp = this->GetPVApplication();
vtkPVProcessModule* pm = pvApp->GetProcessModule();
......@@ -724,6 +737,8 @@ void vtkPVPartDisplay::ResetTransferFunctions(vtkPVArrayInformation *info)
stream << vtkClientServerStream::Invoke << this->VolumeOpacityID
<< "AddPoint" << range[1] << 1.0 << vtkClientServerStream::End;
stream << vtkClientServerStream::Invoke << this->VolumeColorID
<< "RemoveAllPoints" << vtkClientServerStream::End;
stream << vtkClientServerStream::Invoke << this->VolumeColorID
<< "AddHSVPoint" << range[0] << 0.0 << 1.0 << 1.0
<< vtkClientServerStream::End;
......@@ -733,6 +748,9 @@ void vtkPVPartDisplay::ResetTransferFunctions(vtkPVArrayInformation *info)
stream << vtkClientServerStream::Invoke << this->VolumeColorID
<< "SetColorSpaceToHSVNoWrap" << vtkClientServerStream::End;
stream << vtkClientServerStream::Invoke << this->VolumePropertyID
<< "SetScalarOpacityUnitDistance" << unitDistance << vtkClientServerStream::End;
pm->SendStream(vtkProcessModule::CLIENT|vtkProcessModule::RENDER_SERVER);
}
......
......@@ -134,6 +134,10 @@ public:
// Return the id of the volume color tfun (on the server side)
vtkGetMacro(VolumeColorID, vtkClientServerID);
// Description:
// Return the id of the volume property (on the server side)
vtkGetMacro(VolumePropertyID, vtkClientServerID);
//BTX
// Description:
// Return the vtkVolume
......@@ -167,8 +171,10 @@ public:
// Description:
// Initialize the transfer functions based on the scalar range
void ResetTransferFunctions(vtkPVArrayInformation *info);
void InitializeTransferFunctions(vtkPVArrayInformation *info);
void ResetTransferFunctions(vtkPVArrayInformation *arrayInfo,
vtkPVDataInformation *dataInfo);
void InitializeTransferFunctions(vtkPVArrayInformation *arrayInfo,
vtkPVDataInformation *dataInfo);
protected:
vtkPVPartDisplay();
......
......@@ -36,10 +36,12 @@
#include "vtkKWChangeColorButton.h"
#include "vtkColorTransferFunction.h"
#include "vtkKWWidget.h"
#include "vtkPVDataInformation.h"
#include "vtkVolumeProperty.h"
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkPVVolumeAppearanceEditor);
vtkCxxRevisionMacro(vtkPVVolumeAppearanceEditor, "1.9");
vtkCxxRevisionMacro(vtkPVVolumeAppearanceEditor, "1.9.2.1");
int vtkPVVolumeAppearanceEditorCommand(ClientData cd, Tcl_Interp *interp,
int argc, char *argv[]);
......@@ -63,6 +65,8 @@ vtkPVVolumeAppearanceEditor::vtkPVVolumeAppearanceEditor()
this->ScalarOpacityStartValueScale = NULL;
this->ScalarOpacityEndValueLabel = NULL;
this->ScalarOpacityEndValueScale = NULL;
this->ScalarOpacityUnitDistanceLabel = NULL;
this->ScalarOpacityUnitDistanceScale = NULL;
this->ColorRampLabel = NULL;
this->ColorRampRange = NULL;
......@@ -137,6 +141,18 @@ vtkPVVolumeAppearanceEditor::~vtkPVVolumeAppearanceEditor()
this->ScalarOpacityEndValueScale = NULL;
}
if ( this->ScalarOpacityUnitDistanceLabel )
{
this->ScalarOpacityUnitDistanceLabel->Delete();
this->ScalarOpacityUnitDistanceLabel = NULL;
}
if ( this->ScalarOpacityUnitDistanceScale )
{
this->ScalarOpacityUnitDistanceScale->Delete();
this->ScalarOpacityUnitDistanceScale = NULL;
}
if ( this->ColorRampLabel )
{
this->ColorRampLabel->Delete();
......@@ -240,6 +256,7 @@ void vtkPVVolumeAppearanceEditor::Create(vtkKWApplication *app)
this->ScalarOpacityStartValueScale->DisplayEntry();
this->ScalarOpacityStartValueScale->DisplayEntryAndLabelOnTopOff();
this->ScalarOpacityStartValueScale->SetEndCommand( this, "ScalarOpacityRampChanged" );
this->ScalarOpacityStartValueScale->SetEntryCommand( this, "ScalarOpacityRampChanged" );
this->ScalarOpacityEndValueLabel = vtkKWLabel::New();
this->ScalarOpacityEndValueLabel->SetParent( this->ScalarOpacityFrame->GetFrame() );
......@@ -254,7 +271,25 @@ void vtkPVVolumeAppearanceEditor::Create(vtkKWApplication *app)
this->ScalarOpacityEndValueScale->DisplayEntry();
this->ScalarOpacityEndValueScale->DisplayEntryAndLabelOnTopOff();
this->ScalarOpacityEndValueScale->SetEndCommand( this, "ScalarOpacityRampChanged" );
this->ScalarOpacityEndValueScale->SetEntryCommand( this, "ScalarOpacityRampChanged" );
this->ScalarOpacityUnitDistanceLabel = vtkKWLabel::New();
this->ScalarOpacityUnitDistanceLabel->SetParent( this->ScalarOpacityFrame->GetFrame() );
this->ScalarOpacityUnitDistanceLabel->Create( this->GetApplication(), "" );
this->ScalarOpacityUnitDistanceLabel->SetLabel("Unit Distance");
this->ScalarOpacityUnitDistanceScale = vtkKWScale::New();
this->ScalarOpacityUnitDistanceScale->SetParent( this->ScalarOpacityFrame->GetFrame() );
this->ScalarOpacityUnitDistanceScale->Create( this->GetApplication(), "" );
this->ScalarOpacityUnitDistanceScale->SetRange( 1.0, 10.0 );
this->ScalarOpacityUnitDistanceScale->SetResolution( 0.1 );
this->ScalarOpacityUnitDistanceScale->DisplayEntry();
this->ScalarOpacityUnitDistanceScale->DisplayEntryAndLabelOnTopOff();
this->ScalarOpacityUnitDistanceScale->SetEndCommand(this,"ScalarOpacityUnitDistanceChanged");
this->ScalarOpacityUnitDistanceScale->SetEntryCommand(this,"ScalarOpacityUnitDistanceChanged");
this->ScalarOpacityUnitDistanceScale->SetBalloonHelpString(
"Set the unit distance on which the scalar opacity transfer function "
"is defined.");
this->Script("grid %s %s -sticky nsew -padx 2 -pady 2",
this->ScalarOpacityRampLabel->GetWidgetName(),
......@@ -268,6 +303,10 @@ void vtkPVVolumeAppearanceEditor::Create(vtkKWApplication *app)
this->ScalarOpacityEndValueLabel->GetWidgetName(),
this->ScalarOpacityEndValueScale->GetWidgetName() );
this->Script("grid %s %s -sticky nsew -padx 2 -pady 2",
this->ScalarOpacityUnitDistanceLabel->GetWidgetName(),
this->ScalarOpacityUnitDistanceScale->GetWidgetName() );
this->ColorRampLabel = vtkKWLabel::New();
this->ColorRampLabel->SetParent( this->ColorFrame->GetFrame() );
this->ColorRampLabel->Create( this->GetApplication(), "" );
......@@ -465,7 +504,9 @@ void vtkPVVolumeAppearanceEditor::SetPVSourceAndArrayInfo(vtkPVSource *source,
vtkPVApplication::SafeDownCast(this->GetApplication());
}
if ( this->PVSource && this->ArrayInfo && pvApp &&
vtkPVDataInformation* dataInfo = source->GetDataInformation();
if ( this->PVSource && this->ArrayInfo && pvApp && dataInfo &&
this->PVSource->GetNumberOfParts() > 0 )
{
// as a side effect, reset the GUI for the current data
......@@ -499,8 +540,8 @@ void vtkPVVolumeAppearanceEditor::SetPVSourceAndArrayInfo(vtkPVSource *source,
}
double *ptr = opacityFunc->GetDataPointer();
this->ScalarOpacityRampRange->SetRange(ptr[0], ptr[2]);
this->ScalarOpacityRampRange->SetResolution( (ptr[2]-ptr[0])/10000.0 );
this->ScalarOpacityRampRange->SetRange(ptr[0], ptr[2]);
this->ScalarOpacityStartValueScale->SetValue( ptr[1] );
this->ScalarOpacityEndValueScale->SetValue( ptr[3] );
......@@ -512,11 +553,35 @@ void vtkPVVolumeAppearanceEditor::SetPVSourceAndArrayInfo(vtkPVSource *source,
}
ptr = colorFunc->GetDataPointer();
this->ColorRampRange->SetRange(ptr[0], ptr[4]);
this->ColorRampRange->SetResolution( (ptr[4]-ptr[0])/10000.0 );
this->ColorRampRange->SetRange(ptr[0], ptr[4]);
this->ColorStartValueButton->SetColor( ptr[1], ptr[2], ptr[3] );
this->ColorEndValueButton->SetColor( ptr[5], ptr[6], ptr[7] );
double bounds[6];
dataInfo->GetBounds(bounds);
double diameter =
sqrt( (bounds[1] - bounds[0]) * (bounds[1] - bounds[0]) +
(bounds[3] - bounds[2]) * (bounds[3] - bounds[2]) +
(bounds[5] - bounds[4]) * (bounds[5] - bounds[4]) );
int numCells = dataInfo->GetNumberOfCells();
double linearNumCells = pow( (double) numCells, 1.0/3.0 );
this->ScalarOpacityUnitDistanceScale->SetResolution( diameter / (linearNumCells * 10.0) );
this->ScalarOpacityUnitDistanceScale->SetRange( diameter / (linearNumCells * 10.0),
diameter / (linearNumCells / 10.0) );
vtkVolumeProperty *volumeProperty =
vtkVolumeProperty::SafeDownCast(
pvApp->GetProcessModule()->
GetObjectFromID(part->GetPartDisplay()->
GetVolumePropertyID()));
double unitDistance = volumeProperty->GetScalarOpacityUnitDistance();
this->ScalarOpacityUnitDistanceScale->SetValue( unitDistance );
}
}
......@@ -572,6 +637,52 @@ void vtkPVVolumeAppearanceEditor::ScalarOpacityRampChangedInternal()
}
}
//----------------------------------------------------------------------------
void vtkPVVolumeAppearanceEditor::ScalarOpacityUnitDistanceChanged()
{
this->ScalarOpacityUnitDistanceChangedInternal();
this->AddTraceEntry("$kw(%s) ScalarOpacityUnitDistanceChanged", this->GetTclName());
}
//----------------------------------------------------------------------------
void vtkPVVolumeAppearanceEditor::ScalarOpacityUnitDistanceChangedInternal()
{
vtkPVApplication *pvApp = NULL;
if ( this->GetApplication() )
{
pvApp =
vtkPVApplication::SafeDownCast(this->GetApplication());
}
if ( this->PVSource && this->ArrayInfo && pvApp )
{
double unitDistance = this->ScalarOpacityUnitDistanceScale->GetValue();
int numParts = this->PVSource->GetNumberOfParts();
int i;
vtkPVPart *part;
for (i = 0; i < numParts; i++)
{
part = this->PVSource->GetPart(i);
vtkClientServerID volumePropertyID;
volumePropertyID = part->GetPartDisplay()->GetVolumePropertyID();
vtkPVProcessModule* pm = pvApp->GetProcessModule();
vtkClientServerStream& stream = pm->GetStream();
stream << vtkClientServerStream::Invoke << volumePropertyID
<< "SetScalarOpacityUnitDistance" << unitDistance << vtkClientServerStream::End;
pm->SendStream(vtkProcessModule::CLIENT|vtkProcessModule::RENDER_SERVER);
}
this->RenderView();
}
}
//----------------------------------------------------------------------------
void vtkPVVolumeAppearanceEditor::ColorButtonCallback( float vtkNotUsed(r),
float vtkNotUsed(g),
......
......@@ -85,6 +85,9 @@ public:
void ScalarOpacityRampChanged();
void ScalarOpacityRampChangedInternal();
void ScalarOpacityUnitDistanceChanged();
void ScalarOpacityUnitDistanceChangedInternal();
void ColorRampChanged();
void ColorRampChangedInternal();
......@@ -104,6 +107,8 @@ protected:
vtkKWScale *ScalarOpacityStartValueScale;
vtkKWLabel *ScalarOpacityEndValueLabel;
vtkKWScale *ScalarOpacityEndValueScale;
vtkKWLabel *ScalarOpacityUnitDistanceLabel;
vtkKWScale *ScalarOpacityUnitDistanceScale;
vtkKWLabel *ColorRampLabel;
vtkKWRange *ColorRampRange;
......
......@@ -6,13 +6,16 @@ set kw(vtkTemp43) [$kw(vtkTemp1) GetMainView]
if {[info exists argc]} {
set argcm1 [expr $argc - 1]
for {set i 0} {$i < $argcm1} {incr i} {
if {[lindex $argv $i] == "-D" && $i < $argcm1} {
set DataDir [lindex $argv [expr $i + 1]]
}
if {[lindex $argv $i] == "-UC" && $i < $argcm1} {
set rmui [$pv(vtkTemp43) GetRenderModuleUI]
catch {$rmui SetCompositeThreshold 0}
}
if {[lindex $argv $i] == "-D" && $i < $argcm1} {
set DataDir [lindex $argv [expr $i + 1]]
}
if {[lindex $argv $i] == "-UC" && $i < $argcm1} {
set rmui [$pv(vtkTemp43) GetRenderModuleUI]
catch {$rmui SetCompositeThreshold 0}
}
if {[lindex $argv $i] == "-T" && $i < $argcm1} {
set TempDir [lindex $argv [expr $i + 1]]
}
}
}
......@@ -56,19 +59,20 @@ update
#[[$Application GetMainWindow] GetMainView] ForceRender
# Save animation images
$kw(vtkTemp164) SaveImages "$DataDir/Baseline/AnimationImages" {png}
puts $TempDir/AnimationImages
$kw(vtkTemp164) SaveImages "$TempDir/AnimationImages" {png}
for {set i 1} {$i < [expr $argc - 1]} {incr i} {
if {[lindex $argv $i] == "-C"} {
source [lindex $argv [expr $i + 1]]
$Application SetExitStatus [ComparePNG "$DataDir/Baseline/AnimationImages0001"]
$Application SetExitStatus [ComparePNG "$TempDir/AnimationImages0001"]
}
}
file delete "$DataDir/Baseline/AnimationImages0000.png"
file delete "$DataDir/Baseline/AnimationImages0001.png"
file delete "$DataDir/Baseline/AnimationImages0002.png"
file delete "$DataDir/Baseline/AnimationImages0003.png"
file delete "$TempDir/AnimationImages0000.png"
file delete "$TempDir/AnimationImages0001.png"
file delete "$TempDir/AnimationImages0002.png"
file delete "$TempDir/AnimationImages0003.png"
$Application Exit
VTK @ d3a7a121
Subproject commit 9ba4f7a27fdcf8f709754fdd696f36d374386caf
Subproject commit d3a7a1211b48e78274add77513bafd56c5bc75d0
Markdown is supported
0% or