Commit d51c598b authored by hrchilds's avatar hrchilds

Update from June 29, 2005

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@491 18c085ea-50e0-402c-830e-de6fd14e8384
parent 6143bdd0
......@@ -281,7 +281,9 @@ skipList="scalable,parallel:tests/databases/boxlib.py \
scalable,parallel:tests/hybrid/locus.py \
dlb:tests/databases/global_node_ids.py \
dlb:tests/queries/pick.py \
optimized:tests/plots/tensor.py"
optimized:tests/plots/tensor.py \
optimized:tests/hybrid/lineout.py \
optimized:tests/queries/database.py"
# run the test(s)
error=0
......
......@@ -28,6 +28,7 @@ public:
Text2D,
Text3D,
TimeSlider,
Line2D,
Arrow2D,
Arrow3D,
Box,
......
......@@ -4,6 +4,7 @@
Text2D
Text3D
TimeSlider
Line2D
Arrow2D
Arrow3D
Box
......
......@@ -5,8 +5,10 @@
#include <DebugStream.h>
#include <avtAnnotationColleague.h>
#include <avtTimeSliderColleague.h>
#include <avtImageColleague.h>
#include <avtLine2DColleague.h>
#include <avtText2DColleague.h>
#include <avtTimeSliderColleague.h>
// ****************************************************************************
// Method: VisWinAnnotations::VisWinAnnotations
......@@ -180,7 +182,9 @@ VisWinAnnotations::SetFrameAndState(int nFrames,
// Creation: Tue Dec 2 15:41:51 PST 2003
//
// Modifications:
//
// Brad Whitlock, Tue Jun 28 11:56:28 PDT 2005
// Added John Anderson's objects.
//
// ****************************************************************************
bool
......@@ -198,6 +202,12 @@ VisWinAnnotations::AddAnnotationObject(int annotType)
case 2: // Time slider
annot = new avtTimeSliderColleague(mediator);
break;
case 3: // Line 2D
annot = new avtLine2DColleague(mediator);
break;
case 7: // Image
annot = new avtImageColleague(mediator);
break;
default:
debug1 << "VisWinAnnotations:AddAnnotationObject: Annotation type "
<< annotType << " is not yet supported." << endl;
......
This diff is collapsed.
#ifndef AVT_IMAGE_COLLEAGUE_H
#define AVT_IMAGE_COLLEAGUE_H
#include <string>
#include <ColorAttribute.h>
#include <avtAnnotationColleague.h>
#include <viswindow_exports.h>
class vtkActor2D;
class vtkImageData;
class vtkImageMapper;
class vtkImageReader2;
class vtkImageResample;
// ****************************************************************************
// Class: avtImageColleague
//
// Purpose:
// This colleague is a image that can be shown in the vis window.
//
// Notes:
//
// Programmer: John C. Anderson
// Creation: Thu Jul 15 08:04:46 PDT 2004
//
// Modifications:
//
// ****************************************************************************
class VISWINDOW_API avtImageColleague : public avtAnnotationColleague
{
public:
avtImageColleague(VisWindowColleagueProxy &);
virtual ~avtImageColleague();
virtual void AddToRenderer();
virtual void RemoveFromRenderer();
virtual void Hide();
// Methods to set and get the annotation's properties.
virtual void SetOptions(const AnnotationObject &annot);
virtual void GetOptions(AnnotationObject &annot);
// Methods that are called in response to vis window events.
virtual void HasPlots(void);
virtual void NoPlots(void);
protected:
void CreateActorAndMapper();
bool UpdateImage(std::string);
vtkActor2D *actor;
vtkImageMapper *mapper;
vtkImageResample *resample;
std::string currentImage;
vtkImageData *iData;
int width, height;
bool useOpacityColor;
ColorAttribute opacityColor;
bool maintainAspectRatio;
bool addedToRenderer;
bool ShouldBeAddedToRenderer() const;
};
#endif
This diff is collapsed.
#ifndef AVT_LINE2D_COLLEAGUE_H
#define AVT_LINE2D_COLLEAGUE_H
#include <ColorAttribute.h>
#include <avtAnnotationColleague.h>
#include <viswindow_exports.h>
class vtkActor2D;
class vtkAppendPolyData;
class vtkPoints;
class vtkPolyData;
class vtkPolyDataMapper2D;
// ****************************************************************************
// Class: avtLine2DColleague
//
// Purpose:
// This colleague is a line that can be shown in the vis window.
//
// Notes:
//
// Programmer: John C. Anderson
// Creation: Mon Jul 12 15:48:58 PDT 2004
//
// Modifications:
// Brad Whitlock, Tue Jun 28 15:39:27 PST 2005
// Changed so it does not use a cone source.
//
// ****************************************************************************
class VISWINDOW_API avtLine2DColleague : public avtAnnotationColleague
{
public:
avtLine2DColleague(VisWindowColleagueProxy &);
virtual ~avtLine2DColleague();
virtual void AddToRenderer();
virtual void RemoveFromRenderer();
virtual void Hide();
// Methods to set and get the annotation's properties.
virtual void SetOptions(const AnnotationObject &annot);
virtual void GetOptions(AnnotationObject &annot);
// Methods that are called in response to vis window events.
virtual void HasPlots(void);
virtual void NoPlots(void);
protected:
vtkActor2D *actor;
vtkPolyDataMapper2D *mapper;
vtkAppendPolyData *allData;
vtkPolyData *lineData;
vtkPolyData *beginArrowSolid;
vtkPolyData *endArrowSolid;
vtkPolyData *beginArrowLine;
vtkPolyData *endArrowLine;
int beginArrowStyle;
int endArrowStyle;
bool addedToRenderer;
bool ShouldBeAddedToRenderer() const;
void makeArrows(vtkPolyData *, vtkPolyData *, bool);
void updateArrows(vtkPolyData *, vtkPolyData *, float *, float *);
};
#endif
......@@ -113,6 +113,9 @@
# Brad Whitlock, Fri Apr 29 11:35:19 PDT 2005
# I made it be ser/par for parallel build on MacOS X.
#
# Brad Whitlock, Tue Jun 28 11:57:19 PDT 2005
# I made it use John Anderson's new annotation objects.
#
##############################################################################
@SET_MAKE@
......@@ -140,6 +143,8 @@ Colleagues_src= \
Colleagues/VisWinUserInfo.C \
Colleagues/VisWinView.C \
Colleagues/avtAnnotationColleague.C \
Colleagues/avtImageColleague.C \
Colleagues/avtLine2DColleague.C \
Colleagues/avtText2DColleague.C \
Colleagues/avtTimeSliderColleague.C
Interactors_src= \
......
......@@ -864,6 +864,9 @@ avtSiloFileFormat::PopulateDatabaseMetaData(avtDatabaseMetaData *md)
// Jeremy Meredith, Tue Jun 7 08:32:46 PDT 2005
// Added support for "EMPTY" domains in multi-objects.
//
// Mark C. Miller, Wed Jun 29 08:49:14 PDT 2005
// Made it NOT throw an exception if first non-empty mesh is invalid
//
// ****************************************************************************
void
......@@ -1064,20 +1067,22 @@ avtSiloFileFormat::ReadDir(DBfile *dbfile, const char *dirname,
// Find the first non-empty mesh
int meshnum = 0;
int silo_mt = -1;
bool valid_var = true;
while (string(mm->meshnames[meshnum]) == "EMPTY")
{
meshnum++;
if (meshnum >= mm->nblocks)
{
EXCEPTION1(InvalidVariableException, multimesh_names[i]);
valid_var = false;
break;
}
}
int silo_mt;
bool valid_var = true;
TRY
{
silo_mt = GetMeshtype(dbfile, mm->meshnames[meshnum]);
if (valid_var)
silo_mt = GetMeshtype(dbfile, mm->meshnames[meshnum]);
}
CATCH(SiloException)
{
......@@ -1245,17 +1250,20 @@ avtSiloFileFormat::ReadDir(DBfile *dbfile, const char *dirname,
// Store off the important info about this multimesh
// so we can match other multi-objects to it later
actualMeshName.push_back(name_w_dir);
firstSubMesh.push_back(mm->meshnames[meshnum]);
blocksForMesh.push_back(mm->nblocks);
allSubMeshDirs.push_back(vector<string>());
for (int j=0; j<mm->nblocks; j++)
if (valid_var)
{
string dir,var;
SplitDirVarName(mm->meshnames[j], dirname, dir,var);
if (j==0)
firstSubMeshVarName.push_back(var);
allSubMeshDirs[i].push_back(dir);
actualMeshName.push_back(name_w_dir);
firstSubMesh.push_back(mm->meshnames[meshnum]);
blocksForMesh.push_back(mm->nblocks);
allSubMeshDirs.push_back(vector<string>());
for (int j=0; j<mm->nblocks; j++)
{
string dir,var;
SplitDirVarName(mm->meshnames[j], dirname, dir,var);
if (j==0)
firstSubMeshVarName.push_back(var);
allSubMeshDirs[i].push_back(dir);
}
}
delete [] name_w_dir;
......
......@@ -308,6 +308,10 @@
# Hank Childs, Tue May 24 17:11:00 PDT 2005
# Added QvisExportDBWindow.
#
# Brad Whitlock, Tue Jun 28 11:43:16 PDT 2005
# Added John Anderson's QvisImageAnnotationInterface and
# QvisLine2DInterface.
#
##############################################################################
##
......@@ -368,11 +372,13 @@ HDRMOC = \
QvisGUIApplication.h \
QvisHelpWindow.h \
QvisHostProfileWindow.h \
QvisImageAnnotationInterface.h \
QvisInteractorWindow.h \
QvisInterpreter.h \
QvisKeyframeWindow.h \
QvisLightingWidget.h \
QvisLightingWindow.h \
QvisLine2DInterface.h \
QvisLineStyleWidget.h \
QvisLineWidthWidget.h \
QvisMainWindow.h \
......
#include <QvisAnnotationObjectInterfaceFactory.h>
#include <QvisImageAnnotationInterface.h>
#include <QvisLine2DInterface.h>
#include <QvisText2DInterface.h>
#include <QvisTimeSliderInterface.h>
......@@ -48,13 +50,15 @@ QvisAnnotationObjectInterfaceFactory::~QvisAnnotationObjectInterfaceFactory()
// Creation: Fri Oct 31 09:31:50 PDT 2003
//
// Modifications:
//
// Brad Whitlock, Tue Jun 28 13:32:58 PST 2005
// Made it return 8.
//
// ****************************************************************************
int
QvisAnnotationObjectInterfaceFactory::GetMaxInterfaces() const
{
return 7;
return 8;
}
// ****************************************************************************
......@@ -75,7 +79,9 @@ QvisAnnotationObjectInterfaceFactory::GetMaxInterfaces() const
// Creation: Fri Oct 31 09:32:56 PDT 2003
//
// Modifications:
//
// Brad Whitlock, Tue Jun 28 12:09:55 PDT 2005
// Added John Anderson's image and line2d annotation interfaces.
//
// ****************************************************************************
QvisAnnotationObjectInterface *
......@@ -91,6 +97,15 @@ QvisAnnotationObjectInterfaceFactory::CreateInterface(int i, QWidget *parent) co
case 2: // TimeSlider;
retval = new QvisTimeSliderInterface(parent, "timeSliderInterface");
break;
case 3: // Line2D
retval = new QvisLine2DInterface(parent, "line2DInterface");
break;
// Arrow2D
// Arrow3D
// Box
case 7: // Image
retval = new QvisImageAnnotationInterface(parent, "imageAnnotationInterface");
break;
default:
debug1 << "QvisAnnotationObjectInterfaceFactory::CreateInterface:"
<< " invalid index=" << i << endl;
......
This diff is collapsed.
#ifndef QVIS_IMAGE_ANNOTATION_INTERFACE_H
#define QVIS_IMAGE_ANNOTATION_INTERFACE_H
#include <QvisAnnotationObjectInterface.h>
#include <qstring.h>
class QCheckBox;
class QComboBox;
class QLineEdit;
class QSpinBox;
class QvisColorButton;
class QvisOpacitySlider;
class QvisScreenPositionEdit;
// ****************************************************************************
// Class: QvisImageAnnotationInterface
//
// Purpose:
// This class lets you set attributes for a line annotation.
//
// Notes:
//
// Programmer: Brad Whitlock
// Creation: Fri Oct 31 12:47:34 PDT 2003
//
// Modifications:
//
// ****************************************************************************
class GUI_API QvisImageAnnotationInterface:
public QvisAnnotationObjectInterface
{
Q_OBJECT
public:
QvisImageAnnotationInterface(QWidget *parent, const char *name = 0);
virtual ~QvisImageAnnotationInterface();
virtual QString GetName() const { return "Image"; }
virtual QString GetMenuText(const AnnotationObject &) const;
virtual void GetCurrentValues(int which);
protected:
virtual void UpdateControls();
private slots:
void imageSourceChanged(const QString &);
void imageSourceEdit();
void positionStartChanged(float, float);
void widthChanged(int);
void heightChanged(int);
void maintainAspectRatio(bool);
void toggleOpacityColor(bool);
void opacityColorChanged(const QColor &);
void opacityChanged(int);
void visibilityToggled(bool);
private:
QString initialDir;
QLineEdit *imageSource;
QvisScreenPositionEdit *positionStartEdit;
QSpinBox *widthSpinBox;
QSpinBox *heightSpinBox;
QCheckBox *opacityCheck;
QvisColorButton *opacityColorButton;
QvisOpacitySlider *opacitySlider;
QCheckBox *visibleCheckBox;
QCheckBox *linkedWH;
};
#endif
This diff is collapsed.
#ifndef QVIS_LINE2D_INTERFACE_H
#define QVIS_LINE2D_INTERFACE_H
#include <QvisAnnotationObjectInterface.h>
class QCheckBox;
class QComboBox;
class QSpinBox;
class QvisColorButton;
class QvisOpacitySlider;
class QvisScreenPositionEdit;
// ****************************************************************************
// Class: QvisLine2DInterface
//
// Purpose:
// This class lets you set attributes for a line annotation.
//
// Notes:
//
// Programmer: Brad Whitlock
// Creation: Fri Oct 31 12:47:34 PDT 2003
//
// Modifications:
//
// ****************************************************************************
class GUI_API QvisLine2DInterface : public QvisAnnotationObjectInterface
{
Q_OBJECT
public:
QvisLine2DInterface(QWidget *parent, const char *name = 0);
virtual ~QvisLine2DInterface();
virtual QString GetName() const { return "2D Line"; }
virtual QString GetMenuText(const AnnotationObject &) const;
virtual void GetCurrentValues(int which);
protected:
virtual void UpdateControls();
private slots:
void positionStartChanged(float, float);
void positionEndChanged(float, float);
void beginArrowChanged(int);
void endArrowChanged(int);
void widthChanged(int);
void colorChanged(const QColor &);
void opacityChanged(int);
void visibilityToggled(bool);
private:
QvisScreenPositionEdit *positionStartEdit;
QvisScreenPositionEdit *positionEndEdit;
QComboBox *beginArrowComboBox;
QComboBox *endArrowComboBox;
QSpinBox *widthSpinBox;
QvisColorButton *colorButton;
QvisOpacitySlider *opacitySlider;
QCheckBox *visibleCheckBox;
};
#endif
......@@ -25,6 +25,9 @@ class QTimer;
// Brad Whitlock, Thu Nov 13 10:01:21 PDT 2003
// I added the internal pixmapWidth method.
//
// Brad Whitlock, Tue Jun 28 12:11:36 PDT 2005
// I made setGradientColor be a slot.
//
// ****************************************************************************
class GUI_API QvisOpacitySlider : public QWidget, public QRangeControl
......@@ -51,8 +54,6 @@ public:
virtual void setTickInterval(int);
int tickInterval() const { return tickInt; }
void setGradientColor(const QColor &color);
int minValue() const;
int maxValue() const;
void setMinValue(int);
......@@ -68,6 +69,7 @@ public slots:
virtual void setEnabled(bool);
void addStep();
void subtractStep();
void setGradientColor(const QColor &color);
signals:
void valueChanged(int value);
......
......@@ -21,6 +21,8 @@ enhancements and bug-fixes that were added to this release.</p>
<li>It is now possible to export variables, materials, and meshes from your active database to a file using the new <b>Export database</b> window. The <b>Export database</b> window is available in the <b>File</b> menu. The new window allows you to pick the output name, directory, format, of the exported database as wells as the list of variables, meshes, or materials that will be exported. The list of available formats for exporting databases is determined by those database reader plugins that can write out data in their native file format.</li>
<li>VisIt now provides an option to read all cycles and times from collections of single time-step databases <i>(like Silo)</i>. This option allows VisIt to display the cycles and times in the selected files list in the <b>Main</b> window and it also allows VisIt to create meaningful cycle or time-based database correlations for these types of databases. Database correlations are used to relate multiple time-varying databases on a common time scale, with a common time slider. Since VisIt can now create accurate cycle and time database correlations for collections of single time-step databases, it is now possible to more easily compare two or more simulations using a common time scale. Since it can be expensive to read in the extra time metadata for some types of files, this option is not enabled by default but VisIt will ask if you want to read in the extra data when it needs it. You can make VisIt always read in cycles and times by choosing <b>Try harder to get accurate cycles/times</b> in the <b>Preferences</b> window. If you want this option to take effect by default, be sure to save your settings after changing the setting in the <b>Preferences</b> window.</li>
<li>VisIt's CLI now has embedded documentation for most of its functions, making it easy to see the argument list and usage information for each function.</li>
<li>VisIt now supports image annotation objects, which allow you to place logos or other graphics in your visualizations. To add an image annotation, open the <b>Annotations</b> window, click on the <b>Objects</b> tab, and click on the <b>Image</b> button. Clicking on the <b>Image</b> button will tell VisIt to create an empty image annotation object. Once you select an image file using the <b>Image</b> annotation object's controls in the <b>Annotations</b> window and click the <b>Apply</b> button, VisIt will load your image and insert it into your visualization.</li>
<li>VisIt now supports 2D line annotation objects, which allow you to point to objects within your visualization. The lines have optional arrow endpoints that can be used to indicate direction.To add a 2D line annotation, open the <b>Annotations</b> window, click on the <b>Objects</b> tab, and click on the <b>2D line</b> button.</li>
<li>VisIt's Image database reader plugin has been improved in a number of ways. For example, only processor 0 will read the image header now. Caching has been re-enabled and the reader can now generate ghost data.</li>
<li>VisIt now supports multimeshes, multivars, multimaterials, and multispecies where some domains have no data. This means that in the multi-object definition, which usually points to the name of another file's variable for a particular domain, you can now provide "EMPTY" to indicate that the domain has no data.</li>
<li>VisIt now has <i>Moment of Inertia</i> and <i>Centroid</i> queries.</li>
......
......@@ -2713,7 +2713,7 @@ ViewerSubject::Close()
//
clientMethod->SetMethodName("Quit");
clientMethod->ClearArgs();
HandleClientMethod();
BroadcastToAllClients((void *)this, clientMethod);
//
// Break out of the application loop.
......@@ -7377,10 +7377,21 @@ ViewerSubject::HandleSync()
void
ViewerSubject::HandleClientMethod()
{
debug1 << "Broadcasting client method: "
<< clientMethod->GetMethodName().c_str() << " to all "
<< clients.size() << " client(s)." << endl;
BroadcastToAllClients((void *)this, clientMethod);
if(clientMethod->GetMethodName() == "_QueryClientInformation")
{
debug1 << "One of the clients is coded such that it sends the"
" _QueryClientInformation method back to the viewer. "
"We're preventing that situation because it causes an "
"infinite loop." << endl;
}
else
{
debug1 << "Broadcasting client method: "
<< clientMethod->GetMethodName().c_str() << " to all "
<< clients.size() << " client(s)." << endl;
BroadcastToAllClients((void *)this, clientMethod);
}
}
// ****************************************************************************
......@@ -7407,15 +7418,15 @@ ViewerSubject::HandleClientInformation()
for(int i = 0; i < clientInformationList->GetNumClientInformations(); ++i)
{
const ClientInformation &client = clientInformationList->operator[](i);
debug5 << "client["<< i << "] = " << client.GetClientName().c_str()
debug3 << "client["<< i << "] = " << client.GetClientName().c_str()
<< endl;
debug5 << "methods:" << endl;
debug3 << "methods:" << endl;
for(int j = 0; j < client.GetMethodNames().size(); ++j)
{
debug5 << "\t" << client.GetMethod(j).c_str() << "("
debug3 << "\t" << client.GetMethod(j).c_str() << "("
<< client.GetMethodPrototype(j).c_str() << ")" << endl;
}
debug5 << endl;
debug3 << endl;
}
BroadcastToAllClients((void *)this, clientInformationList);
......@@ -7446,7 +7457,7 @@ ViewerSubject::DiscoverClientInformation()
// Ask the current set of clients to tell us about themselves.
clientMethod->SetMethodName("_QueryClientInformation");
clientMethod->ClearArgs();
HandleClientMethod();
BroadcastToAllClients((void *)this, clientMethod);
}
// ****************************************************************************
......
......@@ -106,6 +106,9 @@
# Hank Childs, Mon Jun 13 11:25:47 PDT 2005
# Added PyMethodDoc.
#
# Brad Whitlock, Tue Jun 28 11:46:49 PDT 2005
# Added John Anderson's PyLineObject and PyImageObject.
#
##############################################################################
##
......@@ -123,9 +126,11 @@ SRC= \
PyGlobalAttributes.C \
PyGlobalLineoutAttributes.C \
PyHostProfile.C \
PyImageObject.C \
PyInteractorAttributes.C \
PyKeyframeAttributes.C \
PyLightAttributes.C \
PyLineObject.C \
PyMaterialAttributes.C \
PyMethodDoc.C \
PyPickAttributes.C \
......@@ -150,9 +155,11 @@ HDR= \
PyGlobalAttributes.h \
PyGlobalLineoutAttributes.h \
PyHostProfile.h \
PyImageObject.h \
PyInteractorAttributes.h \
PyKeyframeAttributes.h \
PyLightAttributes.h \
PyLineObject.h \
PyMaterialAttributes.h \
PyMethodDoc.h \
PyPickAttributes.h \
......
This diff is collapsed.
#ifndef PY_IMAGEOBJECT_H
#define PY_IMAGEOBJECT_H
/* CUSTOM - Renamed ImageObject to AnnotationObject everywhere. */
#include <Python.h>
#include <AnnotationObject.h>
//
// Functions exposed to the VisIt module.
//
void PyImageObject_StartUp(AnnotationObject *subj, FILE *logFile);
void PyImageObject_CloseDown();
PyMethodDef *PyImageObject_GetMethodTable(int *nMethods);
bool PyImageObject_Check(PyObject *obj);
AnnotationObject *PyImageObject_FromPyObject(PyObject *obj);
PyObject *PyImageObject_NewPyObject();
PyObject *PyImageObject_WrapPyObject(const AnnotationObject *attr);
void PyImageObject_SetLogging(bool val);
void PyImageObject_SetDefaults(const AnnotationObject *atts);
PyObject *PyImageObject_StringRepresentation(const AnnotationObject *atts);
#endif
This diff is collapsed.
#ifndef PY_LINEOBJECT_H
#define PY_LINEOBJECT_H
/* CUSTOM - Renamed LineObject to AnnotationObject everywhere. */
#include <Python.h>
#include <AnnotationObject.h>
//
// Functions exposed to the VisIt module.
//
void PyLineObject_StartUp(AnnotationObject *subj, FILE *logFile);
void PyLineObject_CloseDown();
PyMethodDef *PyLineObject_GetMethodTable(int *nMethods);
bool PyLineObject_Check(PyObject *obj);
AnnotationObject *PyLineObject_FromPyObject(PyObject *obj);
PyObject *PyLineObject_NewPyObject();
PyObject *PyLineObject_WrapPyObject(const AnnotationObject *attr);
void PyLineObject_SetLogging(bool val);
void PyLineObject_SetDefaults(const AnnotationObject *atts);
PyObject *PyLineObject_StringRepresentation(const AnnotationObject *atts);
#endif
......@@ -81,8 +81,10 @@
#include <PyGlobalAttributes.h>
#include <PyGlobalLineoutAttributes.h>
#include <PyHostProfile.h>
#include <PyImageObject.h>
#include <PyInteractorAttributes.h>
#include <PyKeyframeAttributes.h>
#include <PyLineObject.h>