USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::ImageList Class Reference

#include <ImageList.h>

Inheritance diagram for Isis::ImageList:
Inheritance graph
Collaboration diagram for Isis::ImageList:
Collaboration graph

Classes

class  CopyImageDataFunctor
 This functor is used for copying the images between two projects quickly. More...
 
class  XmlHandler
 

Signals

void countChanged (int newCount)
 

Public Member Functions

 ImageList (QString name, QString path, QObject *parent=NULL)
 Create an image list from an image list name and path (does not read Images).
 
 ImageList (QObject *parent=NULL)
 Create a blank image list.
 
 ImageList (QList< Image * >, QObject *parent=NULL)
 Create an image list from a list of images.
 
 ImageList (Project *project, XmlStackedHandlerReader *xmlReader, QObject *parent=NULL)
 Create an image list from XML.
 
 ImageList (QStringList &)
 Create an image list from a list of cube file names.
 
 ImageList (const ImageList &)
 Copy constructor.
 
 ~ImageList ()
 Destructor.
 
void append (Image *const &value)
 
void append (const QList< Image * > &value)
 
void clear ()
 
iterator erase (iterator pos)
 
iterator erase (iterator begin, iterator end)
 
void insert (int i, Image *const &value)
 
iterator insert (iterator before, Image *const &value)
 
void prepend (Image *const &value)
 
void push_back (Image *const &value)
 
void push_front (Image *const &value)
 
int removeAll (Image *const &value)
 
void removeAt (int i)
 
void removeFirst ()
 
void removeLast ()
 
bool removeOne (Image *const &value)
 
void swap (QList< Image * > &other)
 
ImagetakeAt (int i)
 
ImagetakeFirst ()
 
ImagetakeLast ()
 
ImageListoperator+= (const QList< Image * > &other)
 
ImageListoperator+= (Image *const &other)
 
ImageListoperator<< (const QList< Image * > &other)
 
ImageListoperator<< (Image *const &other)
 
ImageListoperator= (const QList< Image * > &rhs)
 
ImageListoperator= (const ImageList &rhs)
 Assignment operator.
 
QList< QAction * > supportedActions (Project *project=NULL)
 Gets a list of pre-connected actions that have to do with display, such as color, alpha, outline, fill, etc.
 
bool allSupport (ImageDisplayProperties::Property prop)
 Returns true if all of the given displays support the property.
 
void setName (QString newName)
 Set the human-readable name of this image list.
 
void setPath (QString newPath)
 Set the relative path (from the project root) to this image list's folder.
 
QString name () const
 Get the human-readable name of this image list.
 
QString path () const
 Get the path to these images in the image list (relative to project root).
 
void deleteFromDisk (Project *project)
 Delete all of the contained Images from disk (see Image::deleteFromDisk())
 
void save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
 Convert this image list into XML format for saving/restoring capabilities.
 

Private Slots

void askAndUpdateAlpha ()
 Prompt the user for a new alpha value.
 
void askAndUpdateColor ()
 Prompt the user for a new color.
 
void showRandomColor ()
 This applies a new semi-random color to every image's display property for every image in this image list.
 
QStringList saveAndToggleShowDNs ()
 Change the visibility of DNs.
 
QStringList saveAndToggleShowFill ()
 Change the visibility of the fill area.
 
QStringList saveAndToggleShowLabel ()
 Change the visibility of the display name.
 
QStringList saveAndToggleShowOutline ()
 Change the visibility of the outline.
 

Private Member Functions

QActioncreateWorkOrder (Project *project, ImageListActionWorkOrder::Action action)
 
void applyAlphas (QStringList alphaValues)
 
void applyColors (QStringList colorValues, int column=0)
 
void applyShowLabel (QStringList showLabelValues)
 
void applyShowFill (QStringList showFillValues)
 
void applyShowDNs (QStringList showDNsValues)
 
void applyShowOutline (QStringList showOutlineValues)
 
bool askAlpha (int *alphaResult) const
 Prompt the user for a new alpha value.
 
bool askNewColor (QColor *colorResult) const
 
QStringList saveAndApplyAlpha (int newAlpha)
 
QStringList saveAndApplyColor (QColor newColor)
 
QStringList saveAndApplyRandomColor ()
 

Private Attributes

QString m_name
 
QString m_path
 This stores the directory name that contains the images in this image list.
 

Friends

class ImageListActionWorkOrder
 

Detailed Description

Author
2012-??-?? ???
History:
2014-01-08 Tracie Sucharski - Added layer re-ordering connections to all images in list instead of just the first image. Fixes #1755.

Definition at line 29 of file ImageList.h.

Constructor & Destructor Documentation

Isis::ImageList::ImageList ( QString  name,
QString  path,
QObject parent = NULL 
)

Create an image list from an image list name and path (does not read Images).

Parameters
nameThe ImageList's name (i.e. import1, import2, ...)
pathThe ImageList's folder name (i.e. import1, import2, ...)
parentThe Qt-relationship parent

Definition at line 52 of file ImageList.cpp.

References m_path, name(), and path().

Isis::ImageList::ImageList ( QObject parent = NULL)
explicit

Create a blank image list.

Parameters
parentThe Qt-relationship parent

Definition at line 63 of file ImageList.cpp.

Isis::ImageList::ImageList ( QList< Image * >  images,
QObject parent = NULL 
)
explicit

Create an image list from a list of images.

Parameters
imagesThe list of images
parentThe Qt-relationship parent

Definition at line 73 of file ImageList.cpp.

References append().

Isis::ImageList::ImageList ( Project project,
XmlStackedHandlerReader xmlReader,
QObject parent = NULL 
)
explicit

Create an image list from XML.

Parameters
projectThe project with the image list
xmlReaderThe XML reader currently at an <imageList> tag.
parentThe Qt-relationship parent

Definition at line 85 of file ImageList.cpp.

Isis::ImageList::ImageList ( QStringList fileNames)
explicit

Create an image list from a list of cube file names.

This is slow (serial) and not recommended.

Definition at line 106 of file ImageList.cpp.

References append().

Isis::ImageList::ImageList ( const ImageList other)

Copy constructor.

Parameters
otherThe ImageList to copy

Definition at line 96 of file ImageList.cpp.

References m_path.

Isis::ImageList::~ImageList ( )

Destructor.

This does not free the Images from memory.

Definition at line 121 of file ImageList.cpp.

Member Function Documentation

bool Isis::ImageList::allSupport ( ImageDisplayProperties::Property  prop)

Returns true if all of the given displays support the property.

Parameters
propThe property we're testing for support for
displaysThe displays we're doing the test on

Definition at line 527 of file ImageList.cpp.

References Isis::Image::displayProperties(), and Isis::DisplayProperties::supports().

Referenced by supportedActions().

void Isis::ImageList::append ( const QList< Image * > &  value)
See Also
QList<Image *>::append()

Definition at line 137 of file ImageList.cpp.

bool Isis::ImageList::askAlpha ( int *  alphaResult) const
private

Prompt the user for a new alpha value.

If the user selects a new alpha then this sets alphaResult and returns true.

Definition at line 785 of file ImageList.cpp.

References Isis::ImageDisplayProperties::Color, and Isis::DisplayProperties::getValue().

Referenced by askAndUpdateAlpha(), and Isis::ImageListActionWorkOrder::execute().

void Isis::ImageList::askAndUpdateAlpha ( )
privateslot

Prompt the user for a new alpha value.

If the user selects a new alpha then every image's display properties is updated.

Definition at line 884 of file ImageList.cpp.

References askAlpha().

Referenced by supportedActions().

void Isis::ImageList::askAndUpdateColor ( )
privateslot

Prompt the user for a new color.

If the user selects a new color then every image's display properties is updated.

Definition at line 898 of file ImageList.cpp.

Referenced by supportedActions().

void Isis::ImageList::clear ( )
See Also
QList<Image *>::clear()

Definition at line 146 of file ImageList.cpp.

void Isis::ImageList::deleteFromDisk ( Project project)

Delete all of the contained Images from disk (see Image::deleteFromDisk())

Definition at line 586 of file ImageList.cpp.

References Isis::Image::deleteFromDisk(), Isis::Project::imageDataRoot(), and m_path.

Referenced by Isis::Project::deleteAllProjectFiles().

QList< Image * >::iterator Isis::ImageList::erase ( iterator  pos)
See Also
QList<Image *>::erase()

Definition at line 158 of file ImageList.cpp.

Referenced by Isis::MosaicController::imageClosed().

QList< Image * >::iterator Isis::ImageList::erase ( iterator  begin,
iterator  end 
)
See Also
QList<Image *>::erase()

Definition at line 168 of file ImageList.cpp.

void Isis::ImageList::insert ( int  i,
Image *const &  value 
)
See Also
QList<Image *>::insert()

Definition at line 178 of file ImageList.cpp.

QList< Image * >::iterator Isis::ImageList::insert ( iterator  before,
Image *const &  value 
)
See Also
QList<Image *>::insert()

Definition at line 188 of file ImageList.cpp.

QString Isis::ImageList::name ( ) const
ImageList & Isis::ImageList::operator+= ( const QList< Image * > &  other)
See Also
QList<Image *>::operator+=()

Definition at line 322 of file ImageList.cpp.

ImageList & Isis::ImageList::operator+= ( Image *const &  other)
See Also
QList<Image *>::operator+=()

Definition at line 336 of file ImageList.cpp.

ImageList & Isis::ImageList::operator<< ( const QList< Image * > &  other)
See Also
QList<Image *>::operator<<()

Definition at line 346 of file ImageList.cpp.

References operator<<().

ImageList & Isis::ImageList::operator<< ( Image *const &  other)
See Also
QList<Image *>::operator<<()

Definition at line 360 of file ImageList.cpp.

References operator<<().

ImageList & Isis::ImageList::operator= ( const QList< Image * > &  rhs)
See Also
QList<Image *>::operator=()

Definition at line 370 of file ImageList.cpp.

ImageList & Isis::ImageList::operator= ( const ImageList rhs)

Assignment operator.

Parameters
rhsThe right hand side of the '=' operator
Returns
*this

Definition at line 388 of file ImageList.cpp.

References m_path.

QString Isis::ImageList::path ( ) const

Get the path to these images in the image list (relative to project root).

This only applies to an image list from the project.

Returns
The path to the images in the image list (or an empty string if unknown).

Definition at line 578 of file ImageList.cpp.

References m_path.

Referenced by ImageList(), and Isis::ImageList::XmlHandler::startElement().

void Isis::ImageList::prepend ( Image *const &  value)
See Also
QList<Image *>::prepend()

Definition at line 198 of file ImageList.cpp.

void Isis::ImageList::push_back ( Image *const &  value)
See Also
QList<Image *>::push_back()

Definition at line 207 of file ImageList.cpp.

void Isis::ImageList::push_front ( Image *const &  value)
See Also
QList<Image *>::push_front()

Definition at line 216 of file ImageList.cpp.

int Isis::ImageList::removeAll ( Image *const &  value)
See Also
QList<Image *>::removeAll()

Definition at line 225 of file ImageList.cpp.

void Isis::ImageList::removeAt ( int  i)
See Also
QList<Image *>::removeAt()

Definition at line 239 of file ImageList.cpp.

Referenced by Isis::Project::imageClosed().

void Isis::ImageList::removeFirst ( )
See Also
QList<Image *>::removeFirst()

Definition at line 248 of file ImageList.cpp.

void Isis::ImageList::removeLast ( )
See Also
QList<Image *>::removeLast()

Definition at line 257 of file ImageList.cpp.

bool Isis::ImageList::removeOne ( Image *const &  value)
See Also
QList<Image *>::removeOne()

Definition at line 266 of file ImageList.cpp.

void Isis::ImageList::save ( QXmlStreamWriter &  stream,
const Project project,
FileName  newProjectRoot 
) const

Convert this image list into XML format for saving/restoring capabilities.

This writes:

  <imageList name="..." path="...">

to the given xml stream, and creates an 'images.xml' inside the folder with the images. Inside the images.xml, this writes:

  <images>
    ...
  </images>

Definition at line 616 of file ImageList.cpp.

References _FILEINFO_, Isis::Project::imageDataRoot(), Isis::IException::Io, m_path, Isis::FileName::path(), and Isis::Image::save().

QStringList Isis::ImageList::saveAndToggleShowDNs ( )
privateslot

Change the visibility of DNs.

This synchronizes all of the values where at least one is guaranteed to be toggled.

Definition at line 921 of file ImageList.cpp.

References Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::setShowDNs(), and Isis::ImageDisplayProperties::ShowDNs.

Referenced by supportedActions().

QStringList Isis::ImageList::saveAndToggleShowFill ( )
privateslot

Change the visibility of the fill area.

This synchronizes all of the values where at least one is guaranteed to be toggled.

Definition at line 946 of file ImageList.cpp.

References Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::setShowFill(), and Isis::ImageDisplayProperties::ShowFill.

Referenced by supportedActions().

QStringList Isis::ImageList::saveAndToggleShowLabel ( )
privateslot

Change the visibility of the display name.

This synchronizes all of the values where at least one is guaranteed to be toggled.

Definition at line 971 of file ImageList.cpp.

References Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::setShowLabel(), and Isis::ImageDisplayProperties::ShowLabel.

Referenced by supportedActions().

QStringList Isis::ImageList::saveAndToggleShowOutline ( )
privateslot

Change the visibility of the outline.

This synchronizes all of the values where at least one is guaranteed to be toggled.

Definition at line 996 of file ImageList.cpp.

References Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::setShowOutline(), and Isis::ImageDisplayProperties::ShowOutline.

Referenced by supportedActions().

void Isis::ImageList::setName ( QString  newName)

Set the human-readable name of this image list.

This is really only useful for project image lists (not anonymous temporary ones).

Parameters
newNameThe name to give this image list

Definition at line 546 of file ImageList.cpp.

void Isis::ImageList::setPath ( QString  newPath)

Set the relative path (from the project root) to this image list's folder.

This is really only useful for project image lists (not anonymous temporary ones).

Parameters
newPathThe path to the images in this image list

Definition at line 557 of file ImageList.cpp.

References m_path.

void Isis::ImageList::showRandomColor ( )
privateslot

This applies a new semi-random color to every image's display property for every image in this image list.

Definition at line 909 of file ImageList.cpp.

References Isis::Image::displayProperties(), Isis::ImageDisplayProperties::randomColor(), and Isis::ImageDisplayProperties::setColor().

Referenced by supportedActions().

void Isis::ImageList::swap ( QList< Image * > &  other)
See Also
QList<Image *>::swap()

Definition at line 280 of file ImageList.cpp.

Image * Isis::ImageList::takeAt ( int  i)
See Also
QList<Image *>::takeAt()

Definition at line 292 of file ImageList.cpp.

Image * Isis::ImageList::takeFirst ( )
See Also
QList<Image *>::takeFirst()

Definition at line 302 of file ImageList.cpp.

Image * Isis::ImageList::takeLast ( )
See Also
QList<Image *>::takeLast()

Definition at line 312 of file ImageList.cpp.

Member Data Documentation

QString Isis::ImageList::m_path
private

This stores the directory name that contains the images in this image list.

For example: import1 or import2

This path is relative to Project::imageDataRoot()

Definition at line 196 of file ImageList.h.

Referenced by deleteFromDisk(), ImageList(), operator=(), path(), save(), and setPath().


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