Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
PossiblePano Class Reference

#include <FindPanoDialog.h>

Public Types

enum  NamingConvention { NAMING_PANO =0 , NAMING_FIRST_LAST =1 , NAMING_FOLDER =2 , NAMING_TEMPLATE =3 }
 enumeration for different naming conventions, must be match combobox in ressource More...
 

Public Member Functions

 PossiblePano ()
 constructor, init values
 
 ~PossiblePano ()
 destructor, cleans up used variables
 
bool BelongsTo (HuginBase::SrcPanoImage *img, const wxTimeSpan max_time_diff)
 return true, if the image could belong to the given PossiblePano, it checks camera maker and model, focal length, image size and date/time
 
void AddSrcPanoImage (HuginBase::SrcPanoImage *img)
 adds the given SrcPanoImage to this pano-group
 
const unsigned int GetImageCount () const
 returns number of images in this group
 
const wxString GetItemString (const wxString BasePath) const
 returns a string which contains description of this pano
 
const wxString GetFilestring (const wxString BasePath, const bool stripExtension=false) const
 returns a string with the filename of the first and last file
 
wxString GeneratePanorama (NamingConvention nc, bool createLinks, HuginBase::PanoramaOptions::BlendingMechanism defaultBlender)
 generates the panorama file from this set of images
 
wxString GetCameraName ()
 returns the camera name
 
wxString GetLensName ()
 returns the lens name
 
wxString GetFocalLength ()
 returns the focal length as string
 
wxString GetStartString ()
 return the start date/time as string
 
wxString GetDuration ()
 returns the duration as string
 
void PopulateListCtrl (wxListCtrl *list, wxImageList *thumbs, wxArrayString &tooltips)
 add all images to wxListCtrl
 
void RemoveImage (const unsigned int index)
 removes the image at given index
 
PossiblePanoSplitPano (const unsigned int index)
 split pano into 2 subpanos, index is used as first image of second pano
 

Private Member Functions

const wxDateTime GetDateTime (const HuginBase::SrcPanoImage *img)
 does some reformating date/time format
 
bool GetNewProjectFilename (NamingConvention nc, const wxString basePath, wxFileName &projectFile)
 returns a given filename, which does not already exists
 
void UpdateDateTimes ()
 updates the internal date/time representations
 

Private Attributes

std::string m_make
 
std::string m_camera
 
std::string m_lens
 
wxDateTime m_dt_start
 
wxDateTime m_dt_end
 
double m_focallength
 
double m_cropfactor
 
vigra::Size2D m_size
 
ImageSet m_images
 

Detailed Description

Definition at line 117 of file FindPanoDialog.h.

Member Enumeration Documentation

◆ NamingConvention

enumeration for different naming conventions, must be match combobox in ressource

Enumerator
NAMING_PANO 
NAMING_FIRST_LAST 
NAMING_FOLDER 
NAMING_TEMPLATE 

Definition at line 121 of file FindPanoDialog.h.

Constructor & Destructor Documentation

◆ PossiblePano()

PossiblePano::PossiblePano ( )
inline

constructor, init values

Definition at line 129 of file FindPanoDialog.h.

Referenced by SplitPano().

◆ ~PossiblePano()

PossiblePano::~PossiblePano ( )

destructor, cleans up used variables

Definition at line 547 of file FindPanoDialog.cpp.

References m_images, and threshold().

Member Function Documentation

◆ AddSrcPanoImage()

void PossiblePano::AddSrcPanoImage ( HuginBase::SrcPanoImage img)

adds the given SrcPanoImage to this pano-group

Definition at line 605 of file FindPanoDialog.cpp.

References GetDateTime(), m_camera, m_cropfactor, m_dt_end, m_dt_start, m_focallength, m_images, m_lens, m_make, m_size, and threshold().

Referenced by FindPanoDialog::SearchInDir(), and SplitPano().

◆ BelongsTo()

bool PossiblePano::BelongsTo ( HuginBase::SrcPanoImage img,
const wxTimeSpan  max_time_diff 
)

return true, if the image could belong to the given PossiblePano, it checks camera maker and model, focal length, image size and date/time

Definition at line 558 of file FindPanoDialog.cpp.

References GetDateTime(), m_camera, m_cropfactor, m_dt_end, m_dt_start, m_focallength, m_lens, m_make, m_size, and threshold().

◆ GeneratePanorama()

wxString PossiblePano::GeneratePanorama ( NamingConvention  nc,
bool  createLinks,
HuginBase::PanoramaOptions::BlendingMechanism  defaultBlender 
)

generates the panorama file from this set of images

Returns
the generated project file, or wxEmptyString if generation failed

Definition at line 730 of file FindPanoDialog.cpp.

References HuginBase::Panorama::addImage(), HuginBase::PanoramaOptions::blendMode, HuginBase::PanoramaOptions::enblendOptions, HuginBase::PanoramaOptions::enfuseOptions, HuginBase::Panorama::getImage(), GetNewProjectFilename(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), HuginBase::Panorama::hasPossibleStacks(), HuginBase::PanoramaOptions::HDRMERGE_AVERAGE, HuginBase::PanoramaOptions::hdrMergeMode, HuginBase::PanoramaOptions::hdrmergeOptions, HUGIN_CONV_FILENAME, HUGIN_ENBLEND_ARGS, HUGIN_ENFUSE_ARGS, HUGIN_HDRMERGE_ARGS, HUGIN_JPEG_QUALITY, HUGIN_LDR_OUTPUT_FORMAT, HUGIN_NONA_CROPPEDIMAGES, HUGIN_NONA_INTERPOLATOR, HUGIN_TIFF_COMPRESSION, HuginBase::PanoramaOptions::interpolator, HuginBase::Panorama::linkPossibleStacks(), m_images, HuginBase::OPT_EXPOSURE, HuginBase::OPT_POSITION, HuginBase::OPT_RESPONSE, HuginBase::OPT_VIGNETTING, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputFormat, HuginBase::PanoramaOptions::outputImageType, HuginBase::PanoramaOptions::outputImageTypeCompression, HuginBase::PanoramaOptions::quality, HuginBase::Panorama::setOptimizerSwitch(), HuginBase::Panorama::setOptions(), HuginBase::Panorama::setPhotometricOptimizerSwitch(), HuginBase::ImageVariableGroup::switchParts(), threshold(), HuginBase::PanoramaOptions::TIFF_m, HuginBase::PanoramaOptions::tiff_saveROI, HuginBase::PanoramaOptions::tiffCompression, HuginBase::PanoramaOptions::verdandiOptions, and HuginBase::Panorama::WritePTOFile().

◆ GetCameraName()

wxString PossiblePano::GetCameraName ( )

returns the camera name

Definition at line 843 of file FindPanoDialog.cpp.

References m_camera, and threshold().

◆ GetDateTime()

const wxDateTime PossiblePano::GetDateTime ( const HuginBase::SrcPanoImage img)
private

does some reformating date/time format

Definition at line 591 of file FindPanoDialog.cpp.

References HuginBase::SrcPanoImage::getExifDateTime(), HUGIN_CONV_FILENAME, and threshold().

Referenced by AddSrcPanoImage(), BelongsTo(), and UpdateDateTimes().

◆ GetDuration()

wxString PossiblePano::GetDuration ( )

returns the duration as string

Definition at line 867 of file FindPanoDialog.cpp.

References hugin_utils::GetFormattedTimeSpan(), m_dt_end, and m_dt_start.

◆ GetFilestring()

const wxString PossiblePano::GetFilestring ( const wxString  BasePath,
const bool  stripExtension = false 
) const

returns a string with the filename of the first and last file

Definition at line 634 of file FindPanoDialog.cpp.

References HUGIN_CONV_FILENAME, m_images, and threshold().

Referenced by GetItemString(), and GetNewProjectFilename().

◆ GetFocalLength()

wxString PossiblePano::GetFocalLength ( )

returns the focal length as string

Definition at line 853 of file FindPanoDialog.cpp.

References FormatString::GetFocalLength(), m_focallength, and m_images.

◆ GetImageCount()

const unsigned int PossiblePano::GetImageCount ( ) const
inline

returns number of images in this group

Definition at line 138 of file FindPanoDialog.h.

References m_images.

◆ GetItemString()

const wxString PossiblePano::GetItemString ( const wxString  BasePath) const

returns a string which contains description of this pano

Definition at line 651 of file FindPanoDialog.cpp.

References GetFilestring(), m_images, and threshold().

◆ GetLensName()

wxString PossiblePano::GetLensName ( )

returns the lens name

Definition at line 848 of file FindPanoDialog.cpp.

References m_lens, and threshold().

◆ GetNewProjectFilename()

bool PossiblePano::GetNewProjectFilename ( NamingConvention  nc,
const wxString  basePath,
wxFileName projectFile 
)
private

returns a given filename, which does not already exists

Definition at line 656 of file FindPanoDialog.cpp.

References HuginBase::Panorama::addImage(), getDefaultProjectName(), GetFilestring(), m_images, NAMING_FIRST_LAST, NAMING_FOLDER, NAMING_PANO, NAMING_TEMPLATE, and threshold().

Referenced by GeneratePanorama().

◆ GetStartString()

wxString PossiblePano::GetStartString ( )

return the start date/time as string

Definition at line 862 of file FindPanoDialog.cpp.

References m_dt_start.

◆ PopulateListCtrl()

void PossiblePano::PopulateListCtrl ( wxListCtrl *  list,
wxImageList thumbs,
wxArrayString tooltips 
)

◆ RemoveImage()

void PossiblePano::RemoveImage ( const unsigned int  index)

removes the image at given index

Definition at line 988 of file FindPanoDialog.cpp.

References m_images, threshold(), and UpdateDateTimes().

◆ SplitPano()

PossiblePano * PossiblePano::SplitPano ( const unsigned int  index)

split pano into 2 subpanos, index is used as first image of second pano

Returns
pointer to second subpano

Definition at line 1002 of file FindPanoDialog.cpp.

References AddSrcPanoImage(), m_images, PossiblePano(), threshold(), and UpdateDateTimes().

Referenced by FindPanoDialog::OnSplitPanos().

◆ UpdateDateTimes()

void PossiblePano::UpdateDateTimes ( )
private

updates the internal date/time representations

Definition at line 1026 of file FindPanoDialog.cpp.

References GetDateTime(), m_dt_end, m_dt_start, m_images, and threshold().

Referenced by RemoveImage(), and SplitPano().

Member Data Documentation

◆ m_camera

std::string PossiblePano::m_camera
private

Definition at line 176 of file FindPanoDialog.h.

Referenced by AddSrcPanoImage(), BelongsTo(), and GetCameraName().

◆ m_cropfactor

double PossiblePano::m_cropfactor
private

Definition at line 181 of file FindPanoDialog.h.

Referenced by AddSrcPanoImage(), and BelongsTo().

◆ m_dt_end

wxDateTime PossiblePano::m_dt_end
private

Definition at line 179 of file FindPanoDialog.h.

Referenced by AddSrcPanoImage(), BelongsTo(), GetDuration(), and UpdateDateTimes().

◆ m_dt_start

wxDateTime PossiblePano::m_dt_start
private

◆ m_focallength

double PossiblePano::m_focallength
private

Definition at line 180 of file FindPanoDialog.h.

Referenced by AddSrcPanoImage(), BelongsTo(), and GetFocalLength().

◆ m_images

ImageSet PossiblePano::m_images
private

◆ m_lens

std::string PossiblePano::m_lens
private

Definition at line 177 of file FindPanoDialog.h.

Referenced by AddSrcPanoImage(), BelongsTo(), and GetLensName().

◆ m_make

std::string PossiblePano::m_make
private

Definition at line 175 of file FindPanoDialog.h.

Referenced by AddSrcPanoImage(), and BelongsTo().

◆ m_size

vigra::Size2D PossiblePano::m_size
private

Definition at line 182 of file FindPanoDialog.h.

Referenced by AddSrcPanoImage(), and BelongsTo().


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