Isis 3 Programmer Reference
Isis::ImageList Class Reference

Internalizes a list of images and allows for operations on the entire list. More...

#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
 This class is used to read an images.xml file into an image list. More...
 

Signals

void countChanged (int newCount)
 

Public Member Functions

 ImageList (QString name, QString path, QObject *parent=NULL)
 Creates an image list from an image list name and path (does not read Images). More...
 
 ImageList (QObject *parent=NULL)
 Creates a blank image list. More...
 
 ImageList (QList< Image *>, QObject *parent=NULL)
 Creates an image list from a list of images. More...
 
 ImageList (Project *project, XmlStackedHandlerReader *xmlReader, QObject *parent=NULL)
 Creates an image list from XML. More...
 
 ImageList (QStringList &)
 Creates an image list from a list of cube file names. More...
 
 ImageList (const ImageList &)
 Copy constructor. More...
 
 ~ImageList ()
 Destructor. More...
 
SerialNumberListserialNumberList ()
 Creates a SerialNumberList from the image list. More...
 
void append (Image *const &value)
 Appends an image to the image list. More...
 
void append (const QList< Image *> &value)
 Appends a list of images to the image list. More...
 
void clear ()
 Clears the image list. More...
 
iterator erase (iterator pos)
 Erases a single image from the image list. More...
 
iterator erase (iterator begin, iterator end)
 Erases a range of images from the image list. More...
 
void insert (int i, Image *const &value)
 Inserts an image into the image list at an index. More...
 
iterator insert (iterator before, Image *const &value)
 Inserts an image into the image list after an iterator. More...
 
void prepend (Image *const &value)
 Inserts an image at the beginning of the image list. More...
 
void push_back (Image *const &value)
 Appends an image to the end of the image list. More...
 
void push_front (Image *const &value)
 Prepends an image to the beginning of the image list. More...
 
int removeAll (Image *const &value)
 Removes all occurances of an image. More...
 
void removeAt (int i)
 Removes the image at an index. More...
 
void removeFirst ()
 Removes the image at the front of the image list. More...
 
void removeLast ()
 Removes the image at the end of the image list. More...
 
bool removeOne (Image *const &value)
 Removes the first occurance of an image. More...
 
void swap (QList< Image *> &other)
 Swaps the image list with another list of images. More...
 
ImagetakeAt (int i)
 Removes the image at an index and returns it. More...
 
ImagetakeFirst ()
 Removes and returns the first image. More...
 
ImagetakeLast ()
 Removes and returns the last image. More...
 
ImageListoperator+= (const QList< Image *> &other)
 Appends a list of images to the end of the image list. More...
 
ImageListoperator+= (Image *const &other)
 Appends a single image to the end of the image list. More...
 
ImageListoperator<< (const QList< Image *> &other)
 Appends a list of images to the end of the image list. More...
 
ImageListoperator<< (Image *const &other)
 Appends a single image to the end of the image list. More...
 
ImageListoperator= (const QList< Image *> &rhs)
 Assigns another list of images to the image list. More...
 
ImageListoperator= (const ImageList &rhs)
 Assignment operator. More...
 
QList< QAction * > supportedActions (Project *project=NULL)
 Gets a list of pre-connected actions that have to do with display. More...
 
bool allSupport (ImageDisplayProperties::Property prop)
 Check if all images in the image list support a display property. More...
 
void setName (QString newName)
 Set the human-readable name of this image list. More...
 
void setPath (QString newPath)
 Set the relative path (from the project root) to this image list's folder. More...
 
QString name () const
 Get the human-readable name of this image list. More...
 
QString path () const
 Get the path to the images in the image list (relative to project root). More...
 
void deleteFromDisk (Project *project)
 Delete all of the contained Images from disk. More...
 
void save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
 Convert this image list into XML format for saving/restoring capabilities. More...
 

Private Slots

void askAndUpdateAlpha ()
 Prompt the user for a new alpha value. More...
 
void askAndUpdateColor ()
 Prompt the user for a new color. More...
 
void showRandomColor ()
 This applies a new semi-random color to every image's display property for every image in this image list. More...
 
QStringList saveAndToggleShowDNs ()
 Changes the visibility of the DNs of the first image in the image list and synchronizes the visibility of the DNs of every other image with the visibility of the DNs of the first image. More...
 
QStringList saveAndToggleShowFill ()
 Changes the visibility of the fill area of the first image in the image list and synchronizes the visibility of the fill areas of every other image with the visibility of fill area of the first image. More...
 
QStringList saveAndToggleShowLabel ()
 Changes the visibility of the display name of the first image in the image list and synchronizes the visibility of the display names of every other image with the visibility of the display name of the first image. More...
 
QStringList saveAndToggleShowOutline ()
 Changes the visibility of the outline of the first image in the image list and synchronizes the visibility of the outlines of every other image with the visibility of the outline of the first image. More...
 

Private Member Functions

QActioncreateWorkOrder (Project *project, ImageListActionWorkOrder::Action action)
 Creates an ImageListActionWorkOrder and sets the image list as the data for the work order. More...
 
void applyAlphas (QStringList alphaValues)
 Sets the alpha values of the images based on a list of values. More...
 
void applyColors (QStringList colorValues, int column=0)
 Sets the colors values of the images based on a list of values. More...
 
void applyShowLabel (QStringList showLabelValues)
 Sets the visibility of the display names of the images in the image list based on a list of values. More...
 
void applyShowFill (QStringList showFillValues)
 Sets the visibility of the fill areas of the images in the image list based on a list of values. More...
 
void applyShowDNs (QStringList showDNsValues)
 Sets the visibility of the DNs of the images in the image list based on a list of values. More...
 
void applyShowOutline (QStringList showOutlineValues)
 Sets the visibility of the outlines of the images in the image list based on a list of values. More...
 
bool askAlpha (int *alphaResult) const
 Prompts the user for an alpha value. More...
 
bool askNewColor (QColor *colorResult) const
 Prompts the user for color values. More...
 
QStringList saveAndApplyAlpha (int newAlpha)
 Sets the alpha value of every image in the image list to a specificed value. More...
 
QStringList saveAndApplyColor (QColor newColor)
 Sets the color values of every image to a specificed set of values. More...
 
QStringList saveAndApplyRandomColor ()
 Sets the color values of every image to a random color. More...
 

Private Attributes

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

Friends

class ImageListActionWorkOrder
 

Detailed Description

Internalizes a list of images and allows for operations on the entire list.

This class reads a list of images from an images.xml file and internalizes them as aQList of images. It also allows for modifications to the entire list of images and storing the image list as an images.xml file.

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.

2014-06-13 Tracie Sucharski - Added serialNumberList method.

2016-06-08 Jesse Mapel - Updated documentation and merged from IPCE to ISIS branch. Fixes #3961.

2016-09-19 Tracie Sucharski - Changed serialNumberList method to return a shared pointer. TODO: Currently, serialNumberList created the list on the fly. For speed, this needs to change so that when the ImageList changes, update the serial number list.

2017-06-08 Makayla Shepherd - Modified ImageList(QStringList &) to close the image cubes after adding them to the list. Fixes #4908.

2017-11-01 Ian Humphrey, Tracie Sucharski - Add dataRoot parameter to the XmlHandler, during serialization check if images are in results/bundle area and set the dataRoot appropriately. Changed project name to new project root in serialization method because the project name is not changed to new project until it is re-opened. Fixes #4849.

2017-12-08 Tracie Sucharski - Changed save to only copy images if project is saved to a new location.

2018-01-04 Tracie Sucharski - Changed all serialization to save relative paths so that projects can be moved to new locations. Fixes #5276.

Definition at line 55 of file ImageList.h.

Constructor & Destructor Documentation

◆ ImageList() [1/6]

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

Creates 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 54 of file ImageList.cpp.

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

◆ ImageList() [2/6]

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

Creates a blank image list.

Parameters
parentThe Qt-relationship parent.

Definition at line 65 of file ImageList.cpp.

◆ ImageList() [3/6]

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

Creates an image list from a list of images.

Parameters
imagesThe list of images.
parentThe Qt-relationship parent.

Definition at line 75 of file ImageList.cpp.

References append().

◆ ImageList() [4/6]

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

Creates 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 87 of file ImageList.cpp.

References Isis::XmlStackedHandlerReader::pushContentHandler().

◆ ImageList() [5/6]

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

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

This is slow (serial) and not recommended.

Parameters
fileNamesThe list of cube fileNames.

Definition at line 110 of file ImageList.cpp.

References append(), and Isis::Image::closeCube().

◆ ImageList() [6/6]

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

Copy constructor.

Parameters
otherThe image list to copy.

Definition at line 98 of file ImageList.cpp.

References m_name, and m_path.

◆ ~ImageList()

Isis::ImageList::~ImageList ( )

Destructor.

This does not free the Images from memory.

Definition at line 126 of file ImageList.cpp.

Member Function Documentation

◆ allSupport()

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

Check if all images in the image list support a display property.

Parameters
propThe property we're testing for support for
Returns
bool True if all images in the Image List support the property. Otherwise, false.

Definition at line 684 of file ImageList.cpp.

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

Referenced by supportedActions().

◆ append() [1/2]

◆ append() [2/2]

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

Appends a list of images to the image list.

Parameters
valuethe list of images to be appened.
See also
QList<Image *>::append().

Definition at line 166 of file ImageList.cpp.

◆ applyAlphas()

void Isis::ImageList::applyAlphas ( QStringList  alphaValues)
private

Sets the alpha values of the images based on a list of values.

The alpha value of the first image in the image list will be set to the first value in alphaValues, the alpha value of the second image will be set to the second value, etc.

Parameters
alphaValuesThe list of alpha values to be applied.

Definition at line 950 of file ImageList.cpp.

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

Referenced by Isis::ImageListActionWorkOrder::undoExecution().

◆ applyColors()

void Isis::ImageList::applyColors ( QStringList  colorValues,
int  column = 0 
)
private

Sets the colors values of the images based on a list of values.

The color values of the first image in the image list will be set to the values in the first element of colorValues, the color values of the second image will be set to the values in the second element, etc.

Parameters
colorValuesThe list of color values to be applies. Color values should be formated as RGBA with each value separated by " ".
columnThe number of entries in each color value. Usually 4, R G B A.

Definition at line 971 of file ImageList.cpp.

References Isis::Color::fromRGBAString().

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

◆ applyShowDNs()

void Isis::ImageList::applyShowDNs ( QStringList  showDNsValues)
private

Sets the visibility of the DNs of the images in the image list based on a list of values.

The visibility of the DNs of the first image in the image list will be set based on the first value in showDNsValues, the visibility of the DNs of the second image will be set based on the second value, etc.

Parameters
showDNsValuesThe list of values to determine which image DNs will be shown. If a value in showDNsValues is "shown", then the fill area of the associated image will be shown. Otherwise it will not be shown.

Definition at line 1030 of file ImageList.cpp.

References Isis::ImageDisplayProperties::setShowDNs().

Referenced by Isis::ImageListActionWorkOrder::undoExecution().

◆ applyShowFill()

void Isis::ImageList::applyShowFill ( QStringList  showFillValues)
private

Sets the visibility of the fill areas of the images in the image list based on a list of values.

The visibility of the fill area of the first image in the image list will be set based on the first value in showFillValues, the visibility of the fill area of the second image will be set based on the second value, etc.

Parameters
showFillValuesThe list of values to determine which image fill areas will be shown. If a value in showFillValues is "shown", then the fill area of the associated image will be shown. Otherwise it will not be shown.

Definition at line 1011 of file ImageList.cpp.

References Isis::ImageDisplayProperties::setShowFill().

Referenced by Isis::ImageListActionWorkOrder::undoExecution().

◆ applyShowLabel()

void Isis::ImageList::applyShowLabel ( QStringList  showLabelValues)
private

Sets the visibility of the display names of the images in the image list based on a list of values.

The visibility of the display name of the first image in the image list will be set based on the first value in showLabelValues, The visibility of the display name of the second image will be set based on the second value, etc.

Parameters
showLabelValuesThe list of values to determine which image display names will be shown. If a value in showLabelValues is "shown", then the display name of the associated image will be shown. Otherwise it will not be shown.

Definition at line 991 of file ImageList.cpp.

References Isis::ImageDisplayProperties::setShowLabel().

Referenced by Isis::ImageListActionWorkOrder::undoExecution().

◆ applyShowOutline()

void Isis::ImageList::applyShowOutline ( QStringList  showOutlineValues)
private

Sets the visibility of the outlines of the images in the image list based on a list of values.

The visibility of the outline of the first image in the image list will be set based on the first value in showOutlineValues, the visibility of the outline of the second image will be set based on the second value, etc.

Parameters
showOutlineValuesThe list of values to determine which image outlines will be shown. If a value in showOutlineValues is "shown", then the outline of the associated image will be shown. Otherwise it will not be shown.

Definition at line 1049 of file ImageList.cpp.

References Isis::ImageDisplayProperties::setShowOutline().

Referenced by Isis::ImageListActionWorkOrder::undoExecution().

◆ askAlpha()

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

Prompts the user for an alpha value.

If the user selects an alpha then this sets alphaResult and returns true. Does not modify the image list.

Parameters
alphaResultThe alpha value input by the user
Returns
bool True if the user input an alpha value. Otherwise false.
See also
ImageList::askAndUpdateAlpha
ImageListActionWorkOrder::execute

Definition at line 1072 of file ImageList.cpp.

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

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

◆ askAndUpdateAlpha

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 1207 of file ImageList.cpp.

References askAlpha(), and saveAndApplyAlpha().

Referenced by supportedActions().

◆ askAndUpdateColor

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 1220 of file ImageList.cpp.

References askNewColor(), and saveAndApplyColor().

Referenced by supportedActions().

◆ askNewColor()

bool Isis::ImageList::askNewColor ( QColor *  colorResult) const
private

Prompts the user for color values.

If the user selects color values then this sets colorResult and returns true. Does no modify the image list.

Parameters
colorResultThe color values input by the user
Returns
bool True if the user input a color value. Otherwise false.
See also
ImageList::askAndUpdateColor
ImageListActionWorkOrder::execute

Definition at line 1100 of file ImageList.cpp.

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

Referenced by askAndUpdateColor(), and Isis::ImageListActionWorkOrder::setupExecution().

◆ clear()

void Isis::ImageList::clear ( )

Clears the image list.

See also
QList<Image *>::clear().

Definition at line 177 of file ImageList.cpp.

◆ createWorkOrder()

QAction* Isis::ImageList::createWorkOrder ( Project project,
ImageListActionWorkOrder::Action  action 
)
inlineprivate

Creates an ImageListActionWorkOrder and sets the image list as the data for the work order.

Parameters
projectThe project the work order is for
actionThe action the work order performs
Returns
QAction * The created work order

Definition at line 200 of file ImageList.h.

References Isis::ImageListActionWorkOrder::qualifyString(), and Isis::ImageListActionWorkOrder::toString().

Referenced by supportedActions().

◆ deleteFromDisk()

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

Delete all of the contained Images from disk.

Parameters
projectThe project the images in the image list belong to.
See also
Image::deleteFromDisk()

Definition at line 747 of file ImageList.cpp.

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

Referenced by Isis::Project::deleteAllProjectFiles(), and Isis::ImportImagesWorkOrder::undoExecution().

◆ erase() [1/2]

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

Erases a single image from the image list.

Parameters
posAn iterator pointing to the image to be erased.
Returns
QList::iterator An iterator pointing to the image after the image that was removed.
See also
QList<Image *>::erase()

Definition at line 195 of file ImageList.cpp.

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

◆ erase() [2/2]

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

Erases a range of images from the image list.

Erases all images from begin up to (but not including) end.

Parameters
beginAn iterator pointing to the first image to be erased.
endAn iterator pointing to the image just after the last image to be erased. Will be invalid after the call.
Returns
QList::iterator An iterator pointing to the image end refered to before the call.
See also
QList<Image *>::erase()

Definition at line 214 of file ImageList.cpp.

◆ insert() [1/2]

void Isis::ImageList::insert ( int  i,
Image *const &  value 
)

Inserts an image into the image list at an index.

Parameters
iThe index at which to insert the image.
valuethe image to be inserted.
See also
QList<Image *>::insert()

Definition at line 229 of file ImageList.cpp.

◆ insert() [2/2]

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

Inserts an image into the image list after an iterator.

Parameters
beforeAn iterator pointing to the image that value will be inserted after
valueThe image to be inserted.
Returns
QList::iterator An iterator pointing to the inserted image.
See also
QList<Image *>::insert()

Definition at line 246 of file ImageList.cpp.

◆ name()

◆ operator+=() [1/2]

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

Appends a list of images to the end of the image list.

Parameters
otherThe list of images to be appended.
Returns
ImageList & A reference to the imageList.
See also
append()
QList<Image *>::operator+=()

Definition at line 439 of file ImageList.cpp.

◆ operator+=() [2/2]

ImageList & Isis::ImageList::operator+= ( Image *const &  other)

Appends a single image to the end of the image list.

Parameters
otherThe image to be appended.
Returns
ImageList & A reference to the imageList.
See also
append()
QList<Image *>::operator+=()

Definition at line 460 of file ImageList.cpp.

◆ operator<<() [1/2]

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

Appends a list of images to the end of the image list.

Parameters
otherThe list of images to be appended.
Returns
ImageList & A reference to the imageList.
See also
append()
QList<Image *>::operator<<()

Definition at line 477 of file ImageList.cpp.

References operator<<().

◆ operator<<() [2/2]

ImageList & Isis::ImageList::operator<< ( Image *const &  other)

Appends a single image to the end of the image list.

Parameters
otherThe image to be appended.
Returns
ImageList & A reference to the imageList.
See also
append()
QList<Image *>::operator<<()

Definition at line 498 of file ImageList.cpp.

References operator<<().

◆ operator=() [1/2]

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

Assigns another list of images to the image list.

Parameters
rhsThe list of images that imageList will become a copy of.
Returns
ImageList & A reference to the imageList.
See also
QList<Image *>::operator=()

Definition at line 514 of file ImageList.cpp.

◆ operator=() [2/2]

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

Assignment operator.

Parameters
rhsThe right hand side of the '=' operator
Returns
ImageList & This image list.

Definition at line 533 of file ImageList.cpp.

References m_name, and m_path.

◆ path()

QString Isis::ImageList::path ( ) const

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

This only applies to an image list from the project.

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

Definition at line 735 of file ImageList.cpp.

References m_path.

Referenced by ImageList(), Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked(), Isis::ProjectItem::setImageList(), and Isis::ImageList::XmlHandler::startElement().

◆ prepend()

void Isis::ImageList::prepend ( Image *const &  value)

Inserts an image at the beginning of the image list.

Parameters
valueThe image to be inserted.
See also
QList<Image *>::prepend()

Definition at line 260 of file ImageList.cpp.

◆ push_back()

void Isis::ImageList::push_back ( Image *const &  value)

Appends an image to the end of the image list.

Equivalent to append().

Parameters
valueThe image to be appended.
See also
QList<Image *>::push_back()

Definition at line 274 of file ImageList.cpp.

◆ push_front()

void Isis::ImageList::push_front ( Image *const &  value)

Prepends an image to the beginning of the image list.

Equivalent to prepend().

Parameters
valueThe image to be appended.
See also
QList<Image *>::push_front()

Definition at line 288 of file ImageList.cpp.

◆ removeAll()

int Isis::ImageList::removeAll ( Image *const &  value)

Removes all occurances of an image.

Parameters
valueThe image to be removed.
Returns
int The number of occurances of the image.
See also
QList<Image *>::removeAll()

Definition at line 303 of file ImageList.cpp.

Referenced by Isis::RemoveImagesWorkOrder::execute().

◆ removeAt()

void Isis::ImageList::removeAt ( int  i)

Removes the image at an index.

Parameters
iThe index of the image to be removed.
See also
QList<Image *>::removeAt()

Definition at line 321 of file ImageList.cpp.

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

◆ removeFirst()

void Isis::ImageList::removeFirst ( )

Removes the image at the front of the image list.

See also
QList<Image *>::removeFirst()

Definition at line 332 of file ImageList.cpp.

◆ removeLast()

void Isis::ImageList::removeLast ( )

Removes the image at the end of the image list.

See also
QList<Image *>::removeLast()

Definition at line 343 of file ImageList.cpp.

◆ removeOne()

bool Isis::ImageList::removeOne ( Image *const &  value)

Removes the first occurance of an image.

Parameters
valueThe image to be removed.
Returns
bool True if successful, otherwise false.
See also
QList<Image *>::removeOne()

Definition at line 358 of file ImageList.cpp.

◆ save()

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>
Parameters
streamXmlStream to write out the document.
projectThe project the image list will be saved to.
newProjectRootThe path to the root directory for the new project.
Exceptions
iException::Io"Failed to create directory"
iException::Io"Unable to save image information because new file could not be opened for writing"

Definition at line 785 of file ImageList.cpp.

References _FILEINFO_, Isis::FileName::dir(), Isis::Project::imageDataRoot(), Isis::IException::Io, m_name, m_path, Isis::Project::newProjectRoot(), Isis::FileName::path(), and Isis::FileName::toString().

◆ saveAndApplyAlpha()

QStringList Isis::ImageList::saveAndApplyAlpha ( int  newAlpha)
private

Sets the alpha value of every image in the image list to a specificed value.

Saves and returns the old alpha values.

Parameters
newAlphaThe alpha value which every image's alpha values will be set to.
Returns
QStringList A list of all the old alpha values.

Definition at line 1123 of file ImageList.cpp.

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

Referenced by askAndUpdateAlpha().

◆ saveAndApplyColor()

QStringList Isis::ImageList::saveAndApplyColor ( QColor  newColor)
private

Sets the color values of every image to a specificed set of values.

Saves and returns the old color values for each image.

Parameters
newColorThe colro values which every image's color values will be set to.
Returns
QStringList A list of all the old color values. Every image's old color values are listed as R G B A, separated with " ".

Definition at line 1150 of file ImageList.cpp.

References Isis::ImageDisplayProperties::Color, Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::setColor(), and Isis::Color::toRGBAString().

Referenced by askAndUpdateColor().

◆ saveAndApplyRandomColor()

QStringList Isis::ImageList::saveAndApplyRandomColor ( )
private

Sets the color values of every image to a random color.

Preserves the alpha values of each individual image.

Returns
QStringList A list of all the old color values and all the new color values in rgba format.

Definition at line 1177 of file ImageList.cpp.

References Isis::ImageDisplayProperties::Color, Isis::Image::displayProperties(), Isis::DisplayProperties::getValue(), Isis::ImageDisplayProperties::randomColor(), Isis::ImageDisplayProperties::setColor(), and Isis::Color::toRGBAString().

◆ saveAndToggleShowDNs

QStringList Isis::ImageList::saveAndToggleShowDNs ( )
privateslot

Changes the visibility of the DNs of the first image in the image list and synchronizes the visibility of the DNs of every other image with the visibility of the DNs of the first image.

Returns
QStringList A list containing the original visibility of every image's DNs.

Definition at line 1245 of file ImageList.cpp.

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

Referenced by supportedActions().

◆ saveAndToggleShowFill

QStringList Isis::ImageList::saveAndToggleShowFill ( )
privateslot

Changes the visibility of the fill area of the first image in the image list and synchronizes the visibility of the fill areas of every other image with the visibility of fill area of the first image.

Returns
QStringList A list containing the original visibility of every image's fill area.

Definition at line 1273 of file ImageList.cpp.

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

Referenced by supportedActions().

◆ saveAndToggleShowLabel

QStringList Isis::ImageList::saveAndToggleShowLabel ( )
privateslot

Changes the visibility of the display name of the first image in the image list and synchronizes the visibility of the display names of every other image with the visibility of the display name of the first image.

Returns
QStringList A list containing the original visibility of every image's display name.

Definition at line 1301 of file ImageList.cpp.

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

Referenced by supportedActions().

◆ saveAndToggleShowOutline

QStringList Isis::ImageList::saveAndToggleShowOutline ( )
privateslot

Changes the visibility of the outline of the first image in the image list and synchronizes the visibility of the outlines of every other image with the visibility of the outline of the first image.

Returns
QStringList A list returning the original visibility of every image's outline.

Definition at line 1329 of file ImageList.cpp.

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

Referenced by supportedActions().

◆ serialNumberList()

SerialNumberList * Isis::ImageList::serialNumberList ( )

Creates a SerialNumberList from the image list.

Returns
SerialNumberList The list of serial numbers for the cubes in the ImageList.

Definition at line 135 of file ImageList.cpp.

References Isis::SerialNumberList::add().

◆ setName()

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 703 of file ImageList.cpp.

References m_name.

Referenced by Isis::ProjectItemModel::setData().

◆ setPath()

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 714 of file ImageList.cpp.

References m_path.

◆ showRandomColor

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 1231 of file ImageList.cpp.

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

Referenced by supportedActions().

◆ supportedActions()

QList< QAction * > Isis::ImageList::supportedActions ( Project project = NULL)

Gets a list of pre-connected actions that have to do with display.

If any image does not support a given set of actions, then those will actions will be skipped for all images.

Parameters
projectThe project that owns the images in the imageList.
Returns
QList<QAction *> A list of connected actions. The actions are as follows: ChangeTransparency, ChangeColor, RandomColor, ToggleShowLabel, ToggleShowFilled, ToggleShowCubeData, ToggleShowOutline.
History:
2017-07-21 Marjorie Hahn - Removed unnecessary null project check around the QActions for moveToTopAct, moveToTop, moveToBottomAct, moveToBottom, and zoomFit. This allows these actions to be available in IPCE as well as qmos. Fixes #5027.

Definition at line 565 of file ImageList.cpp.

References allSupport(), askAndUpdateAlpha(), askAndUpdateColor(), Isis::ImageListActionWorkOrder::ChangeColor, Isis::ImageListActionWorkOrder::ChangeTransparency, Isis::ImageDisplayProperties::Color, createWorkOrder(), Isis::Image::displayProperties(), Isis::ImageListActionWorkOrder::MoveDownOne, Isis::ImageListActionWorkOrder::MoveToBottom, Isis::ImageListActionWorkOrder::MoveToTop, Isis::ImageListActionWorkOrder::MoveUpOne, Isis::ImageListActionWorkOrder::RandomizeColor, saveAndToggleShowDNs(), saveAndToggleShowFill(), saveAndToggleShowLabel(), saveAndToggleShowOutline(), Isis::ImageDisplayProperties::ShowDNs, Isis::ImageDisplayProperties::ShowFill, Isis::ImageDisplayProperties::ShowLabel, Isis::ImageDisplayProperties::ShowOutline, showRandomColor(), Isis::ImageListActionWorkOrder::ToggleShowCubeData, Isis::ImageListActionWorkOrder::ToggleShowFilled, Isis::ImageListActionWorkOrder::ToggleShowLabel, Isis::ImageListActionWorkOrder::ToggleShowOutline, Isis::ImageListActionWorkOrder::ZoomFit, Isis::ImageDisplayProperties::Zooming, and Isis::ImageDisplayProperties::ZOrdering.

Referenced by Isis::MosaicSceneItem::contextMenuEvent(), and Isis::MosaicSceneWidget::contextMenuEvent().

◆ swap()

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

Swaps the image list with another list of images.

Parameters
otherThe list of images to swapped with.
See also
QList<Image *>::swap()

Definition at line 376 of file ImageList.cpp.

◆ takeAt()

Image * Isis::ImageList::takeAt ( int  i)

Removes the image at an index and returns it.

Parameters
iThe index of the image to be removed and returned.
Returns
Image * The removed image.
See also
QList<Image *>::takeAt()

Definition at line 394 of file ImageList.cpp.

◆ takeFirst()

Image * Isis::ImageList::takeFirst ( )

Removes and returns the first image.

Returns
Image * The first image.
See also
QList<Image *>::takeFirst()

Definition at line 408 of file ImageList.cpp.

◆ takeLast()

Image * Isis::ImageList::takeLast ( )

Removes and returns the last image.

Returns
Image * The last image.
See also
QList<Image *>::takeLast()

Definition at line 422 of file ImageList.cpp.

Member Data Documentation

◆ m_name

QString Isis::ImageList::m_name
private

This stores the image list's name.

Definition at line 242 of file ImageList.h.

Referenced by ImageList(), name(), operator=(), save(), and setName().

◆ m_path

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 254 of file ImageList.h.

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


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