33class QXmlStreamWriter;
34class QXmlStreamReader;
36#include "ControlList.h"
38#include "GuiCameraList.h"
41#include "TargetBody.h"
42#include "TemplateList.h"
45 class BundleSolutionInfo;
49 class CorrelationMatrix;
333 QString
name()
const;
344 void writeSettings(
FileName projName)
const;
346 void readProjectXml(QXmlStreamReader *xmlReader);
360 QList<ImageList *>
images();
364 QList<ShapeList *>
shapes();
403 void save(
FileName projectPath,
bool verifyPathDoesntExist =
true);
407 template<
typename Data>
void warn(QString text, Data relevantData);
409 void warn(QString text);
536 void discardActiveControlEdits();
574 ControlList *createOrRetrieveControlList(QString
name, QString path =
"");
575 ImageList *createOrRetrieveImageList(QString
name, QString path =
"");
576 ShapeList *createOrRetrieveShapeList(QString
name, QString path =
"");
578 void writeSettings();
581 QString nextImageListGroupName();
588 void storeWarning(QString text);
589 void storeWarning(QString text,
const ImageList &relevantData);
593 static const int m_maxRecentProjects = 5;
595 QString m_newProjectRoot;
597 QDir m_currentCnetFolder;
598 QPointer<Directory> m_directory;
599 QList<ImageList *> *m_images;
600 QList<ControlList *> *m_controls;
601 QList<ShapeList *> *m_shapes;
603 QList<TemplateList *> *m_mapTemplates;
604 QList<TemplateList *> *m_regTemplates;
606 QList<BundleSolutionInfo *> *m_bundleSolutionInfo;
608 QPointer<Control> m_activeControl;
609 QPointer<ImageList> m_activeImageList;
624 QMap<QString, Image *> *m_idToImageMap;
625 QMap<QString, Shape *> *m_idToShapeMap;
626 QMap<QString, BundleSolutionInfo *> *m_idToBundleSolutionInfoMap;
627 QMap<QString, TargetBody *> *m_idToTargetBodyMap;
628 QMap<QString, GuiCamera *> *m_idToGuiCameraMap;
632 QList< QPointer<WorkOrder> > *m_workOrderHistory;
634 QPointer<ImageReader> m_imageReader;
636 bool m_isTemporaryProject;
643 QMutex *m_workOrderMutex;
644 QMutex *m_imageReadingMutex;
646 int m_numShapesCurrentlyReading;
647 QMutex *m_shapeMutex;
648 QPointer<ShapeReader> m_shapeReader;
649 QMutex *m_shapeReadingMutex;
651 QUndoStack m_undoStack;
654 QList<ImageList *> m_imageLists;
655 QList<ShapeList *> m_shapeLists;
656 QList<BundleSolutionInfo *> m_bundleSolutionInfos;
657 QList<TemplateList *> m_mapTemplateLists;
658 QList<TemplateList *> m_regTemplateLists;
Container class for BundleAdjustment settings.
Container class for BundleAdjustment results.
This represents an ISIS control net in a project-based GUI interface.
Maintains a list of Controls so that control nets can easily be copied from one Project to another,...
File name manipulation and expansion.
List of GuiCameras saved as QSharedPointers.
This represents a cube in a project-based GUI interface.
Internalizes a list of images and allows for operations on the entire list.
The main project for ipce.
void activeControlSet(bool boolean)
Emitted when an active control is set.
void setActiveImageList(QString displayName)
Set the Active ImageList from the displayName which is saved in project.xml.
void imageListDeleted(QObject *imageList)
An image list is being deleted from the project.
void addBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Add the given BundleSolutionInfo to the current project.
void checkActiveControlAndImageList()
Checks if both an active control and active image list have been set.
void activeImageListSet()
Emitted when an active image list is set.
Shape * shape(QString id)
Return a shape given its id.
QString targetBodyRoot() const
Accessor for the root directory of the target body data.
QMutex * mutex()
Return mutex used for Naif calls.
ImageList * imageList(QString name)
Return an imagelist given its name.
void workOrderStarting(WorkOrder *)
Emitted when work order starts.
QList< TemplateList * > templates()
Return all template FileNames.
bool isTemporaryProject() const
Returns if the project is a temp project or not.
void bundleSolutionInfoAdded(BundleSolutionInfo *bundleSolutionInfo)
Emitted when new BundleSolutionInfo available from jigsaw receivers: ProjectTreeWidget (TODO: should ...
void imagesReady(ImageList)
Prepare new images for opening.
void targetBodyClosed(QObject *targetBodyObj)
A target body is being deleted from the project.
void setName(QString newName)
Change the project's name (GUI only, doesn't affect location on disk).
void imageClosed(QObject *image)
An image is being deleted from the project.
void imagesAdded(ImageList *images)
Emitted when new images are available.
void projectSaved(Project *)
Emitted when project is saved.
QDir addCnetFolder(QString prefix)
Create and return the name of a folder for placing control networks.
void controlListAdded(ControlList *controls)
apparently not used?
void addControl(Control *control)
Add the given Control's to the current project.
WorkOrder * lastNotUndoneWorkOrder()
Return the last not undone workorder.
QDir addTemplateFolder(QString prefix)
Create and navigate to the appropriate template type folder in the project directory.
void allControlsRemoved()
Emitted when all controls have been removed from the Project.
QString bundleSolutionInfoRoot() const
Accessor for the root directory of the results data.
void projectRelocated(Project *)
Emitted when project location moved receivers: Control, BundleSolutionInfo, Image,...
void shapeListDeleted(QObject *shapeList)
A shape model list is being deleted from the project.
void deleteAllProjectFiles()
Delete all of the files, that this project stores, from disk.
QString newProjectRoot() const
Get the top-level folder of the new project.
void setActiveControl(QString displayName)
Set the Active Control (control network)
QDir addBundleSolutionInfoFolder(QString folder)
Create and return the name of a folder for placing BundleSolutionInfo.
void controlClosed(QObject *control)
A control is being deleted from the project.
QList< TemplateList * > regTemplates()
Return registration template FileNames.
void projectLoaded(Project *)
Emitted when project loaded receivers: IpceMainWindow, Directory, HistoryTreeWidget.
QString templateRoot() const
Accessor for the root directory of the template data.
QUndoStack * undoStack()
Returns the Projects stack of QUndoCommands.
void workOrderFinished(WorkOrder *)
Emitted when work order ends.
bool hasCamera(QString id)
This method checks for the existence of a camera based on InstrumentId.
QList< WorkOrder * > workOrderHistory()
Get the entire list of work orders that have executed.
QString resultsRoot() const
Accessor for the root directory of the results data.
void addImagesToIdMap(ImageList images)
Add images to the id map which are not under the projects main data area, the Images node on the proj...
bool m_isClean
used to determine whether a project is currently open
void waitForShapeReaderFinished()
Locks program if another spot in code is still running and called this function.
TargetBodyList targetBodies()
Return TargetBodyList in Project.
void waitForImageReaderFinished()
Locks program if another spot in code is still running and called this function.
ShapeList * shapeList(QString name)
Return a shapelist given its name.
BundleSettings * bundleSettings()
Return BundleSettings objects in Project.
bool hasTarget(QString id)
This method checks for the existence of a target based on TargetName.
void controlAdded(Control *control)
Emitted when new Control added to Project receivers: ProjectTreeWidget.
void shapeClosed(QObject *shape)
A shape model is being deleted from the project.
QList< ShapeList * > shapes()
Return the projects shapelist.
QMutex * workOrderMutex()
This function returns a QMutex.
~Project()
Clean up the project.
QList< QAction * > userPreferenceActions()
Get a list of configuration/settings actions related to reading images into this Project.
void saveHistory(QXmlStreamWriter &stream) const
Serialize the work orders into the given XML.
void clear()
Function to clear out all values in a project essentially making it a new project object.
void addToProject(WorkOrder *)
This executes the WorkOrder and stores it in the project.
void activeControlAndImageListSet()
Emitted when both an active control and active image list have been set.
void activeControlModified()
Emmited in cnetModified() when the actice control is modified.
void addTarget(Target *target)
Adds a new target to the project.
QList< TemplateList * > mapTemplates()
Return map template FileNames.
Control * control(QString id)
Accessor for if the project is clearing or not.
void createFolders()
This creates the project root, image root, and control net root directories.
void cnetModified()
When a cnet is modified, set the project state to not clean.
void guiCamerasAdded(GuiCameraList *targets)
Emitted when new GuiCamera objects added to project receivers: Directory.
QString imageDataRoot() const
Accessor for the root directory of the image data.
void bundleSolutionInfoClosed(QObject *bundleSolutionInfo)
A BundleSolutionInfo object is being deleted from the project.
void shapesAdded(ShapeList *shapes)
Emitted when new shape model images are available.
void cnetSaved(bool value)
Emmited in save() when the project is being saved Connected to Directory so that ControlPointEditWidg...
QString cnetRoot() const
Get where control networks ought to be stored inside the project.
void checkControlsAndImagesAvailable()
Checks if at least one control and image have been added to the project.
QList< ControlList * > controls()
Return controls in project.
QMap< QString, Control * > * m_idToControlMap
This variable will probably go away when we add the bundle results object because it will be under: B...
bool m_clearing
used to determine whether a project's changes are unsaved
Directory * directory() const
Returns the directory associated with this Project.
int m_numImagesCurrentlyReading
used to negate segfaults happening in post undos when clearning project
void targetsAdded(TargetBodyList *targets)
Emitted when new TargetBody objects added to project receivers: Directory.
bool isClean()
Accessor to determine whether the current project is Unsaved.
void open(QString)
Open the project at the given path.
ImageList * activeImageList()
Returns the active ImageList.
QList< BundleSolutionInfo * > bundleSolutionInfo()
Return BundleSolutionInfo objects in Project.
QString projectRoot() const
Get the top-level folder of the project.
QString name() const
Get the project's GUI name.
void setClean(bool value)
Function to change the clean state of the project.
Control * activeControl()
Return the Active Control (control network)
void loadBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Loads bundle solution info into project.
void addCamera(Camera *camera)
Adds a new camera to the project.
QDir addImageFolder(QString prefix)
Create and return the name of a folder for placing images.
void nameChanged(QString newName)
Emitted when project name is changed receivers: ProjectTreeWidget.
void saveWarnings(QXmlStreamWriter &stream) const
Serialize the warnings into the given XML.
void relocateProjectRoot(QString newRoot)
This is called when the project is moved.
void imageListAdded(ImageList *images)
Emitted when new ImageList added to Project receivers: ProjectTreeWidget.
static int maxRecentProjects()
Return max number of recent projects to be displayed.
void controlListDeleted(QObject *controlList)
An control list is being deleted from the project.
QString shapeDataRoot() const
Accessor for the root directory of the shape model data.
bool isOpen()
Accessor to determine whether a current project is Open.
QList< ImageList * > images()
Return projects imagelist.
void controlsAndImagesAvailable()
Emitted when at least one cnet and image have been added to the project.
Image * image(QString id)
Return an image given its id.
void addTemplates(TemplateList *templateFiles)
Add new templates to m_mapTemplates or m_regTemplates and update project item model.
void addShapes(QStringList shapeFiles)
Read the given shape model cube file names as Images and add them to the project.
Project(Directory &directory, QObject *parent=0)
Create a new Project.
void addImages(QStringList imageFiles)
Read the given cube file names as Images and add them to the project.
bool save()
Generic save method to save the state of the project.
QDir addShapeFolder(QString prefix)
Create and return the name of a folder for placing shape models.
ControlList * controlList(QString name)
Return controlslist matching name in Project.
This represents a shape in a project-based GUI interface.
Internalizes a list of shapes and allows for operations on the entire list.
List for holding TargetBodies.
This class is used to create and store valid Isis targets.
Provide Undo/redo abilities, serialization, and history for an operation.
This is free and unencumbered software released into the public domain.