Commit a3e0468c authored by hrchilds's avatar hrchilds

Update from March 4, 2005

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@424 18c085ea-50e0-402c-830e-de6fd14e8384
parent 4cd9bd52
......@@ -938,10 +938,15 @@ class MakeMovie:
# Brad Whitlock, Wed Dec 15 11:25:27 PDT 2004
# Added support for PNG files.
#
# Hank Childs, Fri Mar 4 15:04:29 PST 2005
# Save a tiled window if the session has tiled windows.
#
###########################################################################
def SaveImage(self, index, ext):
s = SaveWindowAttributes()
old_sw = GetSaveWindowAttributes()
s.saveTiled = old_sw.saveTiled
s.fileName = "%s%s%s%04d.%s" % (self.tmpDir, self.slash, self.frameBase, index, ext)
s.family = 0
if(self.outputFormat == self.OUTPUT_PPM):
......
......@@ -148,7 +148,7 @@ class MISC_API VisItException
#define TRY try {
#define CATCH(T) } catch(T) { VisItException::LogCatch(#T, __FILE__, __LINE__);
#define CATCH2(T, A) } catch(T A) { VisItException::LogCatch(#T, __FILE__, __LINE__);
#define CATCH2(T, A) } catch(T &A) { VisItException::LogCatch(#T, __FILE__, __LINE__);
#define CATCHALL(T) } catch(...) { VisItException::LogCatch(#T, __FILE__, __LINE__);
#define ENDTRY }
#define RETHROW throw
......
// ********************************************************************** //
// avtVariableSkewFilter.C //
// ********************************************************************** //
#include <avtVariableSkewFilter.h>
#include <vtkDataArray.h>
#include <ExpressionException.h>
// ****************************************************************************
// Method: avtVariableSkewFilter constructor
//
// Purpose:
// Defines the constructor. Note: this should not be inlined in the
// header because it causes problems for certain compilers.
//
// Programmer: Kathleen Bonnell
// Creation: March 2, 2050
//
// ****************************************************************************
avtVariableSkewFilter::avtVariableSkewFilter()
{
;
}
// ****************************************************************************
// Method: avtVariableSkewFilter destructor
//
// Purpose:
// Defines the destructor. Note: this should not be inlined in the header
// because it causes problems for certain compilers.
//
// Programmer: Kathleen Bonnell
// Creation: March 2, 2005
//
// ****************************************************************************
avtVariableSkewFilter::~avtVariableSkewFilter()
{
;
}
// ****************************************************************************
// Method: avtVariableSkewFilter::DoOperation
//
// Purpose:
// Performs the skew operation on each component,tuple of a data array.
//
// Arguments:
// in1 The first input data array.
// in2 The second data array.
// out The output data array.
// ncomponents The number of components ('1' for scalar, '2' or '3' for
// vectors, etc.)
// ntuples The number of tuples (ie 'npoints' or 'ncells')
//
// Programmer: Kathleen Bonnell
// Creation: March 5, 2005
//
// Modifications:
//
// ****************************************************************************
void
avtVariableSkewFilter::DoOperation(vtkDataArray *in1, vtkDataArray *in2,
vtkDataArray *out, int ncomponents,
int ntuples)
{
int in1ncomps = in1->GetNumberOfComponents();
int in2ncomps = in2->GetNumberOfComponents();
if (in1ncomps == 1 && in2ncomps == 1)
{
float *r = in1->GetRange();
for (int i = 0 ; i < ntuples ; i++)
{
float val1 = in1->GetComponent(i, 0);
float val2 = in2->GetComponent(i, 0);
float f = SkewTheValue(val1, r[0], r[1], val2);
out->SetComponent(i, 0, f);
}
}
else
{
EXCEPTION1(ExpressionException, "Skew can only be used on scalar "
"variables.");
}
}
// ****************************************************************************
// Method: avtVariableSkewFilter::SkewTheValue
//
// Purpose:
// Performs the skew operation on each component,tuple of a data array.
//
// Returns: The skewed value.
//
// Arguments:
// val The value to be skewed.
// min The minimum of all data values.
// max The maximum of all data values.
// factor The skew factor.
//
// Programmer: Kathleen Bonnell
// Creation: March 5, 2005
//
// Modifications:
//
// ****************************************************************************
float
avtVariableSkewFilter::SkewTheValue(float val, float min, float max,
float factor)
{
if (factor <= 0 || factor == 1. || min == max)
return val;
float range = max - min;
float rangeInverse = 1. / range;
float logSkew = log(factor);
float k = range / (factor -1.);
float v2 = (val - min) * rangeInverse;
float temp = k * (exp(v2 * logSkew) -1.) + min;
return temp;
}
// ************************************************************************* //
// avtVariableSkewFilter.h //
// ************************************************************************* //
#ifndef AVT_VARIALE_SKEW_FILTER_H
#define AVT_VARIALE_SKEW_FILTER_H
#include <avtBinaryMathFilter.h>
class vtkDataArray;
// ****************************************************************************
// Class: avtVariableSkewFilter
//
// Purpose:
// A filter that calculates the skewed value of its input.
//
// Programmer: Kathleen Bonnell
// Creation: March 2, 2005
//
// Modifications:
//
// ****************************************************************************
class EXPRESSION_API avtVariableSkewFilter : public avtBinaryMathFilter
{
public:
avtVariableSkewFilter();
virtual ~avtVariableSkewFilter();
virtual const char *GetType(void) { return "avtVariableSkewFilter"; };
virtual const char *GetDescription(void)
{ return "Calculating skew"; };
protected:
virtual void DoOperation(vtkDataArray *in1, vtkDataArray *in2,
vtkDataArray *out, int ncomponents, int ntuples);
private:
float SkewTheValue(float val, float min, float max, float factor);
};
#endif
......@@ -95,6 +95,9 @@
# Hank Childs, Thu Jan 20 15:47:25 PST 2005
# Added avtSideVolume, avtResradFilter.
#
# Kathleen Bonnell, Thu Mar 3 11:13:22 PST 2005
# Added avtVariableSkewFilter.
#
##############################################################################
@SET_MAKE@
......@@ -151,6 +154,7 @@ General_src= \
General/avtRandomFilter.C \
General/avtRecenterFilter.C \
General/avtSpecMFFilter.C \
General/avtVariableSkewFilter.C \
General/avtVectorComposeFilter.C \
General/avtVectorDecomposeFilter.C
......
......@@ -48,6 +48,7 @@
#include <avtSquareRootFilter.h>
#include <avtSquareFilter.h>
#include <avtPolarCoordinatesFilter.h>
#include <avtVariableSkewFilter.h>
#include <avtVectorComposeFilter.h>
#include <avtVectorDecomposeFilter.h>
#include <avtVectorCrossProductFilter.h>
......@@ -195,7 +196,6 @@ avtIndexExpr::CreateFilters(ExprPipelineState *state)
{
dynamic_cast<avtExprNode*>(expr)->CreateFilters(state);
//avtVectorDecomposeFilter *f = new avtVectorDecomposeFilter(ind);
avtVectorDecomposeFilter *f = new avtVectorDecomposeFilter(ind);
// Set the variable the function should process.
......@@ -308,6 +308,9 @@ avtVectorExpr::CreateFilters(ExprPipelineState *state)
// Hank Childs, Thu Jan 20 15:51:16 PST 2005
// Added side volume, resrad.
//
// Kathleen Bonnell, Thu Mar 3 11:13:22 PST 2005
// Added var_skew.
//
// ****************************************************************************
void
avtFunctionExpr::CreateFilters(ExprPipelineState *state)
......@@ -400,6 +403,8 @@ avtFunctionExpr::CreateFilters(ExprPipelineState *state)
f = new avtMagnitudeFilter();
else if (functionName == "relative_difference")
f = new avtRelativeDifferenceFilter();
else if (functionName == "var_skew")
f = new avtVariableSkewFilter();
else if (functionName == "if")
f = new avtConditionalFilter();
else if (functionName == "and")
......
......@@ -43,6 +43,9 @@ static int FormatLine(char *line);
// Allow for the format not to be broken up into bricklets. Also add
// support for byte data.
//
// Hank Childs, Fri Mar 4 16:02:03 PST 2005
// Do not read in the entire TOC in this file any more.
//
// ****************************************************************************
avtBOVFileFormat::avtBOVFileFormat(const char *fname)
......@@ -103,45 +106,7 @@ avtBOVFileFormat::avtBOVFileFormat(const char *fname)
nodalCentering = true;
byteData = true;
ReadTOC();
if (file_pattern == NULL)
{
debug1 << "Did not parse file pattern (\"DATA_FILE\")." << endl;
EXCEPTION1(InvalidFilesException, fname);
}
if (full_size[0] <= 0 || full_size[1] <= 0 || full_size[2] <= 0)
{
debug1 << "Was not able to determine \"DATA_SIZE\"" << endl;
EXCEPTION1(InvalidFilesException, fname);
}
if (bricklet_size[0] <= 0 || bricklet_size[1] <= 0 || bricklet_size[2] <= 0)
{
bricklet_size[0] = full_size[0];
bricklet_size[1] = full_size[1];
bricklet_size[2] = full_size[2];
}
if (dimensions[0] <= 0. || dimensions[1] <= 0. || dimensions[2] <= 0.)
{
debug1 << "Invalid dimensions \"BRICK_SIZE\"" << endl;
EXCEPTION1(InvalidFilesException, fname);
}
if ((full_size[0] % bricklet_size[0]) != 0)
{
debug1 << "Full size must be a multiple of bricklet size" << endl;
EXCEPTION1(InvalidFilesException, fname);
}
if ((full_size[1] % bricklet_size[1]) != 0)
{
debug1 << "Full size must be a multiple of bricklet size" << endl;
EXCEPTION1(InvalidFilesException, fname);
}
if ((full_size[2] % bricklet_size[2]) != 0)
{
debug1 << "Full size must be a multiple of bricklet size" << endl;
EXCEPTION1(InvalidFilesException, fname);
}
haveReadTOC = false;
}
......@@ -183,6 +148,26 @@ avtBOVFileFormat::~avtBOVFileFormat()
}
// ****************************************************************************
// Method: avtBOVFileFormat::ActivateTimestep
//
// Purpose:
// Activates the current timestep, prompting the header to be read.
//
// Programmer: Hank Childs
// Creation: March 4, 2005
//
// ****************************************************************************
void
avtBOVFileFormat::ActivateTimestep(void)
{
ReadTOC();
if (metadata != NULL)
metadata->SetCycle(timestep, cycle);
}
// ****************************************************************************
// Method: avtBOVFileFormat::GetMesh
//
......@@ -640,11 +625,15 @@ avtBOVFileFormat::GetAuxiliaryData(const char *var, int domain,
// Have domain boundary information reflect the differing mesh sizes that
// come with different centerings.
//
// Hank Childs, Fri Mar 4 16:02:03 PST 2005
// Make sure we read the table of contents first.
//
// ****************************************************************************
void
avtBOVFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
{
ReadTOC();
int nx = full_size[0] / bricklet_size[0];
int ny = full_size[1] / bricklet_size[1];
int nz = full_size[2] / bricklet_size[2];
......@@ -696,6 +685,7 @@ avtBOVFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
cache->CacheVoidRef("any_mesh",
AUXILIARY_DATA_DOMAIN_BOUNDARY_INFORMATION, -1, -1, vr);
}
md->SetCycle(timestep, cycle);
}
......@@ -717,11 +707,18 @@ avtBOVFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
// Add support for byte data. Also interpret palette min/max as variable
// min/max as well.
//
// Hank Childs, Fri Mar 4 16:02:03 PST 2005
// Do not re-read the TOC for each call to this method. Also added error
// checking previously in the constructor.
//
// ****************************************************************************
void
avtBOVFileFormat::ReadTOC(void)
{
if (haveReadTOC)
return;
haveReadTOC = true;
const char *fname = filenames[0];
ifstream ifile(fname);
......@@ -883,6 +880,44 @@ avtBOVFileFormat::ReadTOC(void)
nodalCentering = false;
}
}
if (file_pattern == NULL)
{
debug1 << "Did not parse file pattern (\"DATA_FILE\")." << endl;
EXCEPTION1(InvalidFilesException, fname);
}
if (full_size[0] <= 0 || full_size[1] <= 0 || full_size[2] <= 0)
{
debug1 << "Was not able to determine \"DATA_SIZE\"" << endl;
EXCEPTION1(InvalidFilesException, fname);
}
if (bricklet_size[0] <= 0 || bricklet_size[1] <= 0 || bricklet_size[2] <= 0)
{
bricklet_size[0] = full_size[0];
bricklet_size[1] = full_size[1];
bricklet_size[2] = full_size[2];
}
if (dimensions[0] <= 0. || dimensions[1] <= 0. || dimensions[2] <= 0.)
{
debug1 << "Invalid dimensions \"BRICK_SIZE\"" << endl;
EXCEPTION1(InvalidFilesException, fname);
}
if ((full_size[0] % bricklet_size[0]) != 0)
{
debug1 << "Full size must be a multiple of bricklet size" << endl;
EXCEPTION1(InvalidFilesException, fname);
}
if ((full_size[1] % bricklet_size[1]) != 0)
{
debug1 << "Full size must be a multiple of bricklet size" << endl;
EXCEPTION1(InvalidFilesException, fname);
}
if ((full_size[2] % bricklet_size[2]) != 0)
{
debug1 << "Full size must be a multiple of bricklet size" << endl;
EXCEPTION1(InvalidFilesException, fname);
}
}
......
......@@ -17,6 +17,11 @@
// Programmer: Hank Childs
// Creation: May 12, 2003
//
// Modifications:
//
// Hank Childs, Fri Mar 4 16:02:03 PST 2005
// Added support for deferring reading in all of the TOC.
//
// ****************************************************************************
class avtBOVFileFormat : public avtSTMDFileFormat
......@@ -36,10 +41,13 @@ class avtBOVFileFormat : public avtSTMDFileFormat
virtual void PopulateDatabaseMetaData(avtDatabaseMetaData *);
virtual int GetCycle(void) { return cycle; };
virtual bool ReturnsValidCycle(void) { return haveReadTOC; };
void ActivateTimestep(void);
protected:
void ReadTOC(void);
bool haveReadTOC;
char *path;
char *file_pattern;
int cycle;
......
......@@ -4986,7 +4986,8 @@ QvisGUIApplication::updateVisItCompleted(const QString &program)
debug1 << "User chose save session and start up again in the new VisIt."
<< endl;
QString fileName(GetUserVisItDirectory() + "update_version");
QString visitDir(GetUserVisItDirectory().c_str());
QString fileName(visitDir + "update_version");
#if defined(_WIN32)
fileName += ".vses";
#else
......
......@@ -11,7 +11,7 @@
// Note: Autogenerated by xml2python. Do not modify by hand!
//
// Programmer: xml2python
// Creation: Wed Dec 15 09:18:37 PDT 2004
// Creation: Thu Mar 3 09:29:52 PDT 2005
//
// ****************************************************************************
......@@ -616,6 +616,63 @@ VolumeAttributes_GetNum3DSlices(PyObject *self, PyObject *args)
return retval;
}
static PyObject *
VolumeAttributes_SetScaling(PyObject *self, PyObject *args)
{
VolumeAttributesObject *obj = (VolumeAttributesObject *)self;
int ival;
if(!PyArg_ParseTuple(args, "i", &ival))
return NULL;
// Set the scaling in the object.
if(ival >= 0 && ival < 3)
obj->data->SetScaling(VolumeAttributes::Scaling(ival));
else
{
fprintf(stderr, "An invalid scaling value was given. "
"Valid values are in the range of [0,2]. "
"You can also use the following names: "
"Linear, Log10, Skew.");
return NULL;
}
Py_INCREF(Py_None);
return Py_None;
}
static PyObject *
VolumeAttributes_GetScaling(PyObject *self, PyObject *args)
{
VolumeAttributesObject *obj = (VolumeAttributesObject *)self;
PyObject *retval = PyInt_FromLong(long(obj->data->GetScaling()));
return retval;
}
static PyObject *
VolumeAttributes_SetSkewFactor(PyObject *self, PyObject *args)
{
VolumeAttributesObject *obj = (VolumeAttributesObject *)self;
double dval;
if(!PyArg_ParseTuple(args, "d", &dval))
return NULL;
// Set the skewFactor in the object.
obj->data->SetSkewFactor(dval);
Py_INCREF(Py_None);
return Py_None;
}
static PyObject *
VolumeAttributes_GetSkewFactor(PyObject *self, PyObject *args)
{
VolumeAttributesObject *obj = (VolumeAttributesObject *)self;
PyObject *retval = PyFloat_FromDouble(obj->data->GetSkewFactor());
return retval;
}
static struct PyMethodDef VolumeAttributes_methods[] = {
......@@ -664,6 +721,10 @@ static struct PyMethodDef VolumeAttributes_methods[] = {
{"GetGradientType", VolumeAttributes_GetGradientType, METH_VARARGS},
{"SetNum3DSlices", VolumeAttributes_SetNum3DSlices, METH_VARARGS},
{"GetNum3DSlices", VolumeAttributes_GetNum3DSlices, METH_VARARGS},
{"SetScaling", VolumeAttributes_SetScaling, METH_VARARGS},
{"GetScaling", VolumeAttributes_GetScaling, METH_VARARGS},
{"SetSkewFactor", VolumeAttributes_SetSkewFactor, METH_VARARGS},
{"GetSkewFactor", VolumeAttributes_GetSkewFactor, METH_VARARGS},
{NULL, NULL}
};
......@@ -742,6 +803,17 @@ VolumeAttributes_getattr(PyObject *self, char *name)
if(strcmp(name, "num3DSlices") == 0)
return VolumeAttributes_GetNum3DSlices(self, NULL);
if(strcmp(name, "scaling") == 0)
return VolumeAttributes_GetScaling(self, NULL);
if(strcmp(name, "Linear") == 0)
return PyInt_FromLong(long(VolumeAttributes::Linear));
else if(strcmp(name, "Log10") == 0)
return PyInt_FromLong(long(VolumeAttributes::Log10));
else if(strcmp(name, "Skew") == 0)
return PyInt_FromLong(long(VolumeAttributes::Skew));
if(strcmp(name, "skewFactor") == 0)
return VolumeAttributes_GetSkewFactor(self, NULL);
return Py_FindMethod(VolumeAttributes_methods, self, name);
}
......@@ -796,6 +868,10 @@ VolumeAttributes_setattr(PyObject *self, char *name, PyObject *args)
retval = (VolumeAttributes_SetGradientType(self, tuple) != NULL);
else if(strcmp(name, "num3DSlices") == 0)
retval = (VolumeAttributes_SetNum3DSlices(self, tuple) != NULL);
else if(strcmp(name, "scaling") == 0)
retval = (VolumeAttributes_SetScaling(self, tuple) != NULL);
else if(strcmp(name, "skewFactor") == 0)
retval = (VolumeAttributes_SetSkewFactor(self, tuple) != NULL);
Py_DECREF(tuple);
return retval ? 0 : -1;
......@@ -874,6 +950,15 @@ VolumeAttributes_print(PyObject *v, FILE *fp, int flags)
fprintf(fp, "gradientType = SobelOperator # %s\n", gradientType_names);
fprintf(fp, "num3DSlices = %d\n", obj->data->GetNum3DSlices());
const char *scaling_names = "Linear, Log10, Skew";
if(obj->data->GetScaling() == VolumeAttributes::Linear)
fprintf(fp, "scaling = Linear # %s\n", scaling_names);
else if(obj->data->GetScaling() == VolumeAttributes::Log10)
fprintf(fp, "scaling = Log10 # %s\n", scaling_names);
else
fprintf(fp, "scaling = Skew # %s\n", scaling_names);
fprintf(fp, "skewFactor = %g\n", obj->data->GetSkewFactor());
return 0;
}
......@@ -896,12 +981,12 @@ PyVolumeAttributes_StringRepresentation(const VolumeAttributes *atts)
SNPRINTF(tmpStr, 1000, "lightingFlag = 0\n");
str += tmpStr;
#if 0
// Ifdef this code out until all attributes have Python StringRepresentation methods
{ // new scope
PyObject *obj = PyColorControlPointList_StringRepresentation(atts->GetColorControlPoints());
str += "colorControlPoints = {";
if(obj != 0) str += PyString_AS_STRING(obj);
str += "}\n";
}
#endif
SNPRINTF(tmpStr, 1000, "opacityAttenuation = %g\n", atts->GetOpacityAttenuation());
......@@ -912,12 +997,12 @@ PyVolumeAttributes_StringRepresentation(const VolumeAttributes *atts)
SNPRINTF(tmpStr, 1000, "freeformFlag = 0\n");
str += tmpStr;
#if 0
// Ifdef this code out until all attributes have Python StringRepresentation methods
{ // new scope
PyObject *obj = PyGaussianControlPointList_StringRepresentation(atts->GetOpacityControlPoints());
str += "opacityControlPoints = {";
if(obj != 0) str += PyString_AS_STRING(obj);
str += "}\n";
}
#endif
SNPRINTF(tmpStr, 1000, "resampleTarget = %d\n", atts->GetResampleTarget());
......@@ -1006,6 +1091,25 @@ PyVolumeAttributes_StringRepresentation(const VolumeAttributes *atts)
SNPRINTF(tmpStr, 1000, "num3DSlices = %d\n", atts->GetNum3DSlices());
str += tmpStr;
const char *scaling_names = "Linear, Log10, Skew";
if(atts->GetScaling() == VolumeAttributes::Linear)
{
SNPRINTF(tmpStr, 1000, "scaling = Linear # %s\n", scaling_names);
str += tmpStr;
}
else if(atts->GetScaling() == VolumeAttributes::Log10)
{
SNPRINTF(tmpStr, 1000, "scaling = Log10 # %s\n", scaling_names);
str += tmpStr;
}
else
{
SNPRINTF(tmpStr, 1000, "scaling = Skew # %s\n", scaling_names);
str += tmpStr;
}
SNPRINTF(tmpStr, 1000, "skewFactor = %g\n", atts->GetSkewFactor());
str += tmpStr;
return PyString_FromString(str.c_str());
}
......
......@@ -20,6 +20,7 @@
#include <QvisGaussianOpacityBar.h>
#include <QvisScribbleOpacityBar.h>
#include <QvisVariableButton.h>
#include <QNarrowLineEdit.h>
#include <VolumeAttributes.h>
#include <ColorControlPoint.h>
......@@ -117,6 +118,9 @@ static const char * white_xpm[] = {
// Brad Whitlock, Thu Feb 14 13:50:54 PST 2002
// Initialized parentless widgets.
//
// Kathleen Bonnell, Thu Mar 3 11:01:22 PST 2005
// Initialized scalingButtons.
//
// ****************************************************************************
QvisVolumePlotWindow::QvisVolumePlotWindow(const int type,
......@@ -131,6 +135,7 @@ QvisVolumePlotWindow::QvisVolumePlotWindow(const int type,
// Initialize parentless widgets.
modeButtonGroup = 0;
scalingButtons = 0;
}
// ****************************************************************************
......@@ -146,6 +151,9 @@ QvisVolumePlotWindow::QvisVolumePlotWindow(const int type,
// Brad Whitlock, Thu Feb 14 13:01:20 PST 2002
// Added deletion of parentless widgets.
//
// Kathleen Bonnell, Thu Mar 3 11:01:22 PST 2005
// Delete scalingButtons.
//
// ****************************************************************************
QvisVolumePlotWindow::~QvisVolumePlotWindow()
......@@ -154,6 +162,7 @@ QvisVolumePlotWindow::~QvisVolumePlotWindow()
// Delete parentless widgets.
delete modeButtonGroup;
delete scalingButtons;
}
// ****************************************************************************
......@@ -193,6 +202,9 @@ QvisVolumePlotWindow::~QvisVolumePlotWindow()
// Removed "raytrace" button and added RayCasting to a new combobox that
// is used to set the rendering methods.
//
// Kathleen Bonnell, Thu Mar 3 11:01:22 PST 2005
// Added scalingButtons and skewLineEdit.
//
// ****************************************************************************
void
......@@ -284,7 +296,47 @@ QvisVolumePlotWindow::CreateWindowContents()
this, SLOT(colorMaxProcessText()));
colorMinMaxLayout->addWidget(colorMax);
// Add the group box that will contain the color-related widgets.
//
// Create the scale radio buttons
//
QHBoxLayout *scaleLayout = new QHBoxLayout(innerColorLayout);
scaleLayout->setSpacing(5);
scaleLayout->setMargin(5);
QLabel *scaleLabel = new QLabel("Scale", colorWidgetGroup, "scaleLabel");
scaleLabel->setAlignment(AlignHCenter | AlignVCenter);
scaleLayout->addWidget(scaleLabel);
// Create the scaling button group
scalingButtons = new QButtonGroup(0, "scaleRadioGroup" );
connect(scalingButtons, SIGNAL(clicked(int)),
this, SLOT(scaleClicked(int)));
QRadioButton *rb = new QRadioButton("Linear", colorWidgetGroup);
rb->setChecked( TRUE );
scalingButtons->insert(rb, 0);
scaleLayout->addWidget(rb);
rb = new QRadioButton("Log10", colorWidgetGroup);
scalingButtons->insert(rb, 1);
scaleLayout->addWidget(rb);
rb = new QRadioButton("Skew", colorWidgetGroup);
scalingButtons->insert(rb, 2);
scaleLayout->addWidget(rb);
QHBoxLayout *skewLayout = new QHBoxLayout(innerColorLayout);
skewLayout->setSpacing(5);
skewLayout->setMargin(5);