casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | List of all members
casa::ImageView Class Reference

Displays properties of an image for manipulation such as color and display type. More...

#include <ImageView.qo.h>

Inheritance diagram for casa::ImageView:

Public Types

enum  ColorCombinationMode {
  NO_COMBINATION,
  RGB,
  HUE_SATURATION
}
 

Signals

void imageSelected (ImageView *)
 Register/unregister has changed. More...
 
void displayTypeChanged (ImageView *dd)
 Raster/Contour/casacore::Vector has changed. More...
 
void showDataDisplayOptions (QtDisplayData *imageData)
 User has requested to view the display properties of this data. More...
 
void close (ImageView *imageToClose)
 Close the image. More...
 
void masterCoordinateImageSelected (ImageView *imageView)
 This imageView has become the master coordinate image. More...
 
void masterHueImageSelected (ImageView *imageView)
 This ImageView has become the master hue image. More...
 
void masterSaturationImageSelected (ImageView *imageView)
 This ImageView has become the master saturation image. More...
 
void masterCoordinateImageClear ()
 There will be no master coordinate image. More...
 
void viewImage (ImageView *imageToView)
 An image has been selected to view on the image animator. More...
 

Public Member Functions

 ImageView (QtDisplayData *data, QWidget *parent=0)
 
QString getName () const
 Accessors. More...
 
QtDisplayDatagetData () const
 
QString getDataDisplayTypeName () const
 
bool isRegistered () const
 
bool isMasterHue () const
 
bool isMasterSaturation () const
 
bool isMasterCoordinate () const
 
bool isEmpty () const
 
bool isRaster () const
 
QColor getDisplayedColor () const
 
void setRegistered (bool selected)
 Setters. More...
 
void setColorCombinationMode (ColorCombinationMode mode)
 
void setMasterCoordinateImage (bool masterImage)
 
void setMasterHueImage (bool masterImage)
 
void setMasterSaturationImage (bool masterImage)
 
void setViewedImage (bool viewed)
 Sets whether or not this is the image currently being viewed on the animator. More...
 
void setDisplayedColor (QColor color)
 
void setData (QtDisplayData *other)
 
bool isControlEligible () const
 Returns whether or not the data is eligible to set the coordinate system for the display. More...
 
virtual QSize minimumSizeHint () const
 
virtual ~ImageView ()
 

Static Public Attributes

static const QString DROP_ID
 

Protected Member Functions

virtual void mouseMoveEvent (QMouseEvent *event)
 Implemented to support drag and drop. More...
 

Private Types

enum  DisplayType {
  DISPLAY_RASTER,
  DISPLAY_CONTOUR,
  DISPLAY_VECTOR,
  DISPLAY_MARKER,
  DISPLAY_NONE
}
 
enum  RestTypes {
  REST_FREQUENCY,
  REST_WAVELENGTH,
  REST_REDSHIFT
}
 

Private Slots

void restChanged ()
 Method of specifying "rest" has changed. More...
 
void restUnitsChanged ()
 
void openCloseDisplay ()
 Minimize/maximize the display. More...
 
void imageRegistrationChanged (bool selected)
 Display data has changed register/unregister status. More...
 
void restFrequencyChanged ()
 User has changed the rest frequency. More...
 
void displayTypeChanged ()
 Change to raster/contour/vector/marker. More...
 
void rgbChanged ()
 Color this image will use in RGB mode has changed. More...
 
void showContextMenu (const QPoint &location)
 User selected color for RGB mode has changed. More...
 
void showDataOptions ()
 Show a color dialog where the user can choose a custom color. More...
 
void resetRestFrequency ()
 Reset the rest frequency back to its original value. More...
 

Private Member Functions

 ImageView (const ImageView &other)
 void _resetSpectralUnit(); More...
 
ImageView operator= (const ImageView &other)
 
void initDisplayLabels ()
 Initialization. More...
 
void initDisplayLabel (QWidget *holder, DisplayLabel *label)
 
void initColorModeSettings ()
 
void initRestSettings ()
 
void initDisplayType ()
 
void setTitle ()
 
double wavelengthFrequencyConversion (double value, QString oldUnits, QString newUnits) const
 Conversion. More...
 
bool isCategoryMatch (const QString &newUnits, const QString &oldUnits) const
 
void setBackgroundColor (QColor color)
 Background color. More...
 
QColor getBackgroundColor () const
 
void minimizeDisplay ()
 Opening/closing. More...
 
void maximizeDisplay ()
 
void saveSnapshot ()
 Snapshots. More...
 
void restoreSnapshot ()
 
QImage * makeDragImage ()
 Drag and drop. More...
 
void makeDrag (QMouseEvent *event)
 
void _sendRestFrequencyChange (casacore::String comboStr)
 Resetting the original rest frequency. More...
 
QString updateRestUI (casacore::String &restStr)
 
void updateFreqUnitCombo ()
 
void selectRestUnits (const QString &restUnits)
 
void rgbModeChanged ()
 Custom color for RGB image combination void setButtonColor(QColor color); QColor getButtonColor() const;. More...
 
bool isViewed () const
 
bool isRGBImage () const
 

Private Attributes

QMap< DisplayType, QString > displayTypeMap
 
DisplayType storedDisplay
 
RestTypes restType
 
QString restUnits
 
QAction viewAction
 Available context menu choices. More...
 
QAction closeAction
 
QAction masterCoordinateSystemAction
 
QAction masterCoordinateSystemUndoAction
 
QAction masterHueAction
 
QAction masterSaturationAction
 
QAction rasterAction
 
QAction contourAction
 
QMenu contextMenu
 
QColor normalColor
 Regular background or master coordinate image background. More...
 
QColor masterCoordinateColor
 
QtDisplayDataimageData
 
QButtonGroup * displayGroup
 
DisplayLabeldisplayTypeLabel
 Indicators of which display properties apply to this image view. More...
 
DisplayLabelcoordinateMasterLabel
 
DisplayLabelhueMasterLabel
 
DisplayLabelsaturationMasterLabel
 
QSpacerItem * spacerFirst
 
QSpacerItem * spacerLast
 
ColorCombinationMode colorMode
 Method used to combine images using colors. More...
 
casacore::Record displayOptionsSnapshot
 
bool empty
 
QStringList frequencyUnits
 Rest frequency. More...
 
QStringList wavelengthUnits
 
const casacore::String REST_FREQUENCY_KEY
 
const casacore::String VALUE_KEY
 const casacore::String SPECTRAL_UNIT_KEY; More...
 
int minimumSize
 Opening/closing. More...
 
const int SIZE_COLLAPSED
 
const int SIZE_EXPANDED
 
casacore::String originalFreq
 Store original rest frequney value & units. More...
 
const int VIEWED_BORDER_SIZE
 casacore::String spectralUnit; More...
 
const int NOT_VIEWED_BORDER_SIZE
 
Ui::ImageViewClass ui
 

Detailed Description

Displays properties of an image for manipulation such as color and display type.

Definition at line 48 of file ImageView.qo.h.

Member Enumeration Documentation

Enumerator
NO_COMBINATION 
RGB 
HUE_SATURATION 

Definition at line 53 of file ImageView.qo.h.

Enumerator
DISPLAY_RASTER 
DISPLAY_CONTOUR 
DISPLAY_VECTOR 
DISPLAY_MARKER 
DISPLAY_NONE 

Definition at line 187 of file ImageView.qo.h.

Enumerator
REST_FREQUENCY 
REST_WAVELENGTH 
REST_REDSHIFT 

Definition at line 191 of file ImageView.qo.h.

Constructor & Destructor Documentation

casa::ImageView::ImageView ( QtDisplayData data,
QWidget *  parent = 0 
)
virtual casa::ImageView::~ImageView ( )
virtual
casa::ImageView::ImageView ( const ImageView other)
private

void _resetSpectralUnit();

Member Function Documentation

void casa::ImageView::_sendRestFrequencyChange ( casacore::String  comboStr)
private

Resetting the original rest frequency.

void casa::ImageView::close ( ImageView imageToClose)
signal

Close the image.

void casa::ImageView::displayTypeChanged ( ImageView dd)
signal

Raster/Contour/casacore::Vector has changed.

void casa::ImageView::displayTypeChanged ( )
privateslot

Change to raster/contour/vector/marker.

QColor casa::ImageView::getBackgroundColor ( ) const
private
QtDisplayData* casa::ImageView::getData ( ) const
QString casa::ImageView::getDataDisplayTypeName ( ) const
QColor casa::ImageView::getDisplayedColor ( ) const
QString casa::ImageView::getName ( ) const

Accessors.

void casa::ImageView::imageRegistrationChanged ( bool  selected)
privateslot

Display data has changed register/unregister status.

void casa::ImageView::imageSelected ( ImageView )
signal

Register/unregister has changed.

void casa::ImageView::initColorModeSettings ( )
private
void casa::ImageView::initDisplayLabel ( QWidget *  holder,
DisplayLabel label 
)
private
void casa::ImageView::initDisplayLabels ( )
private

Initialization.

void casa::ImageView::initDisplayType ( )
private
void casa::ImageView::initRestSettings ( )
private
bool casa::ImageView::isCategoryMatch ( const QString &  newUnits,
const QString &  oldUnits 
) const
private
bool casa::ImageView::isControlEligible ( ) const

Returns whether or not the data is eligible to set the coordinate system for the display.

bool casa::ImageView::isEmpty ( ) const
bool casa::ImageView::isMasterCoordinate ( ) const
bool casa::ImageView::isMasterHue ( ) const
bool casa::ImageView::isMasterSaturation ( ) const
bool casa::ImageView::isRaster ( ) const
bool casa::ImageView::isRegistered ( ) const
bool casa::ImageView::isRGBImage ( ) const
private
bool casa::ImageView::isViewed ( ) const
private
void casa::ImageView::makeDrag ( QMouseEvent *  event)
private
QImage* casa::ImageView::makeDragImage ( )
private

Drag and drop.

void casa::ImageView::masterCoordinateImageClear ( )
signal

There will be no master coordinate image.

void casa::ImageView::masterCoordinateImageSelected ( ImageView imageView)
signal

This imageView has become the master coordinate image.

void casa::ImageView::masterHueImageSelected ( ImageView imageView)
signal

This ImageView has become the master hue image.

void casa::ImageView::masterSaturationImageSelected ( ImageView imageView)
signal

This ImageView has become the master saturation image.

void casa::ImageView::maximizeDisplay ( )
private
void casa::ImageView::minimizeDisplay ( )
private

Opening/closing.

virtual QSize casa::ImageView::minimumSizeHint ( ) const
virtual
virtual void casa::ImageView::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

Implemented to support drag and drop.

void casa::ImageView::openCloseDisplay ( )
privateslot

Minimize/maximize the display.

ImageView casa::ImageView::operator= ( const ImageView other)
private
void casa::ImageView::resetRestFrequency ( )
privateslot

Reset the rest frequency back to its original value.

void casa::ImageView::restChanged ( )
privateslot

Method of specifying "rest" has changed.

void casa::ImageView::restFrequencyChanged ( )
privateslot

User has changed the rest frequency.

void casa::ImageView::restoreSnapshot ( )
private
void casa::ImageView::restUnitsChanged ( )
privateslot
void casa::ImageView::rgbChanged ( )
privateslot

Color this image will use in RGB mode has changed.

void casa::ImageView::rgbModeChanged ( )
private

Custom color for RGB image combination void setButtonColor(QColor color); QColor getButtonColor() const;.

void casa::ImageView::saveSnapshot ( )
private

Snapshots.

void casa::ImageView::selectRestUnits ( const QString &  restUnits)
private
void casa::ImageView::setBackgroundColor ( QColor  color)
private

Background color.

Master image used to set the coordinate system is a slightly different color

void casa::ImageView::setColorCombinationMode ( ColorCombinationMode  mode)
void casa::ImageView::setData ( QtDisplayData other)
void casa::ImageView::setDisplayedColor ( QColor  color)
void casa::ImageView::setMasterCoordinateImage ( bool  masterImage)
void casa::ImageView::setMasterHueImage ( bool  masterImage)
void casa::ImageView::setMasterSaturationImage ( bool  masterImage)
void casa::ImageView::setRegistered ( bool  selected)

Setters.

void casa::ImageView::setTitle ( )
private
void casa::ImageView::setViewedImage ( bool  viewed)

Sets whether or not this is the image currently being viewed on the animator.

void casa::ImageView::showContextMenu ( const QPoint &  location)
privateslot

User selected color for RGB mode has changed.

void otherColorChanged(); Display the context menu.

void casa::ImageView::showDataDisplayOptions ( QtDisplayData imageData)
signal

User has requested to view the display properties of this data.

void casa::ImageView::showDataOptions ( )
privateslot

Show a color dialog where the user can choose a custom color.

void showColorDialog(); Show the display options for this image view.

void casa::ImageView::updateFreqUnitCombo ( )
private
QString casa::ImageView::updateRestUI ( casacore::String restStr)
private
void casa::ImageView::viewImage ( ImageView imageToView)
signal

An image has been selected to view on the image animator.

double casa::ImageView::wavelengthFrequencyConversion ( double  value,
QString  oldUnits,
QString  newUnits 
) const
private

Conversion.

Member Data Documentation

QAction casa::ImageView::closeAction
private

Definition at line 197 of file ImageView.qo.h.

ColorCombinationMode casa::ImageView::colorMode
private

Method used to combine images using colors.

Definition at line 222 of file ImageView.qo.h.

QMenu casa::ImageView::contextMenu
private

Definition at line 204 of file ImageView.qo.h.

QAction casa::ImageView::contourAction
private

Definition at line 203 of file ImageView.qo.h.

DisplayLabel* casa::ImageView::coordinateMasterLabel
private

Definition at line 215 of file ImageView.qo.h.

QButtonGroup* casa::ImageView::displayGroup
private

Definition at line 211 of file ImageView.qo.h.

casacore::Record casa::ImageView::displayOptionsSnapshot
private

Definition at line 223 of file ImageView.qo.h.

DisplayLabel* casa::ImageView::displayTypeLabel
private

Indicators of which display properties apply to this image view.

Definition at line 214 of file ImageView.qo.h.

QMap<DisplayType,QString> casa::ImageView::displayTypeMap
private

Definition at line 188 of file ImageView.qo.h.

const QString casa::ImageView::DROP_ID
static

Definition at line 85 of file ImageView.qo.h.

bool casa::ImageView::empty
private

Definition at line 224 of file ImageView.qo.h.

QStringList casa::ImageView::frequencyUnits
private

Rest frequency.

Definition at line 227 of file ImageView.qo.h.

DisplayLabel* casa::ImageView::hueMasterLabel
private

Definition at line 216 of file ImageView.qo.h.

QtDisplayData* casa::ImageView::imageData
private

Definition at line 210 of file ImageView.qo.h.

QColor casa::ImageView::masterCoordinateColor
private

Definition at line 208 of file ImageView.qo.h.

QAction casa::ImageView::masterCoordinateSystemAction
private

Definition at line 198 of file ImageView.qo.h.

QAction casa::ImageView::masterCoordinateSystemUndoAction
private

Definition at line 199 of file ImageView.qo.h.

QAction casa::ImageView::masterHueAction
private

Definition at line 200 of file ImageView.qo.h.

QAction casa::ImageView::masterSaturationAction
private

Definition at line 201 of file ImageView.qo.h.

int casa::ImageView::minimumSize
private

Opening/closing.

Definition at line 234 of file ImageView.qo.h.

QColor casa::ImageView::normalColor
private

Regular background or master coordinate image background.

Definition at line 207 of file ImageView.qo.h.

const int casa::ImageView::NOT_VIEWED_BORDER_SIZE
private

Definition at line 243 of file ImageView.qo.h.

casacore::String casa::ImageView::originalFreq
private

Store original rest frequney value & units.

Definition at line 239 of file ImageView.qo.h.

QAction casa::ImageView::rasterAction
private

Definition at line 202 of file ImageView.qo.h.

const casacore::String casa::ImageView::REST_FREQUENCY_KEY
private

Definition at line 229 of file ImageView.qo.h.

RestTypes casa::ImageView::restType
private

Definition at line 192 of file ImageView.qo.h.

QString casa::ImageView::restUnits
private

Definition at line 193 of file ImageView.qo.h.

DisplayLabel* casa::ImageView::saturationMasterLabel
private

Definition at line 217 of file ImageView.qo.h.

const int casa::ImageView::SIZE_COLLAPSED
private

Definition at line 235 of file ImageView.qo.h.

const int casa::ImageView::SIZE_EXPANDED
private

Definition at line 236 of file ImageView.qo.h.

QSpacerItem* casa::ImageView::spacerFirst
private

Definition at line 218 of file ImageView.qo.h.

QSpacerItem* casa::ImageView::spacerLast
private

Definition at line 219 of file ImageView.qo.h.

DisplayType casa::ImageView::storedDisplay
private

Definition at line 189 of file ImageView.qo.h.

Ui::ImageViewClass casa::ImageView::ui
private

Definition at line 246 of file ImageView.qo.h.

const casacore::String casa::ImageView::VALUE_KEY
private

const casacore::String SPECTRAL_UNIT_KEY;

Definition at line 231 of file ImageView.qo.h.

QAction casa::ImageView::viewAction
private

Available context menu choices.

Definition at line 196 of file ImageView.qo.h.

const int casa::ImageView::VIEWED_BORDER_SIZE
private

casacore::String spectralUnit;

Definition at line 242 of file ImageView.qo.h.

QStringList casa::ImageView::wavelengthUnits
private

Definition at line 228 of file ImageView.qo.h.


The documentation for this class was generated from the following file: