medCompareViewContainer::medCompareViewContainer(QWidget * parent): medCustomViewContainer(parent), d3(new medCompareViewContainerPrivate) { split(1, 2); d3->fixedContainer = this->childContainers()[0]; d3->movingContainer = this->childContainers()[1]; connect(d3->fixedContainer,SIGNAL(imageSet(medDataIndex)), this,SIGNAL(droppedFixed(medDataIndex))); connect(d3->movingContainer,SIGNAL(imageSet(medDataIndex)), this,SIGNAL(droppedMoving(medDataIndex))); //Set cues for the user: d3->fixedContainer->setInfo(tr("Fixed")); d3->movingContainer->setInfo(tr("Moving")); }
void BHFitsImageSetIndex::Next() { ++_imageIndex; if( _imageIndex >= static_cast<class BHFitsImageSet&>(imageSet()).ImageCount() ) { _imageIndex = 0; LargeStepNext(); } }
void BHFitsImageSetIndex::Previous() { if(_imageIndex > 0) --_imageIndex; else { _imageIndex = static_cast<class BHFitsImageSet&>(imageSet()).ImageCount() - 1; LargeStepPrevious(); } }
medFilteringViewContainer::medFilteringViewContainer ( QWidget * parent ) : medCustomViewContainer ( parent ), d3 ( new medFilteringViewContainerPrivate ) { split(1, 2); setMultiLayer(false); d3->inputViewContainer = this->childContainers()[0]; d3->outputViewContainer = this->childContainers()[1]; d3->inputViewContainer->setMultiLayer(false); d3->outputViewContainer->setMultiLayer(false); //Set cues for the user: d3->inputViewContainer->setInfo ( tr ( "Input to be filtered" ) ); d3->outputViewContainer->setInfo ( tr ( "Result of filtering" ) ); d3->outputViewContainer->setAcceptDrops(false); setCurrent(d3->inputViewContainer); connect(this,SIGNAL(imageSet(medDataIndex)), this,SIGNAL(droppedInput(medDataIndex))); connect(d3->inputViewContainer, SIGNAL(viewRemoved(dtkAbstractView *)), this, SIGNAL(inputViewRemoved(dtkAbstractView*))); }
std::string BHFitsImageSetIndex::Description() const { std::ostringstream str; str << "Time range " << static_cast<BHFitsImageSet&>(imageSet()).RangeName(_imageIndex); return str.str(); }
void ForEachMSAction::Perform(ArtifactSet &artifacts, ProgressListener &progress) { unsigned taskIndex = 0; FinishAll(); for(std::vector<std::string>::const_iterator i=_filenames.begin();i!=_filenames.end();++i) { std::string filename = *i; progress.OnStartTask(*this, taskIndex, _filenames.size(), std::string("Processing measurement set ") + filename); bool skip = false; if(_skipIfAlreadyProcessed) { MeasurementSet set(filename); if(set.HasRFIConsoleHistory()) { skip = true; AOLogger::Info << "Skipping " << filename << ",\n" "because the set contains AOFlagger history and -skip-flagged was given.\n"; } } if(!skip) { std::auto_ptr<ImageSet> imageSet(ImageSet::Create(filename, _baselineIOMode, _readUVW)); bool isMS = dynamic_cast<MSImageSet*>(&*imageSet) != 0; if(isMS) { MSImageSet *msImageSet = static_cast<MSImageSet*>(&*imageSet); msImageSet->SetDataColumnName(_dataColumnName); msImageSet->SetSubtractModel(_subtractModel); } imageSet->Initialize(); if(_loadOptimizedStrategy) { rfiStrategy::DefaultStrategy::TelescopeId telescopeId; unsigned flags; double frequency, timeResolution, frequencyResolution; rfiStrategy::DefaultStrategy::DetermineSettings(*imageSet, telescopeId, flags, frequency, timeResolution, frequencyResolution); RemoveAll(); rfiStrategy::DefaultStrategy::LoadFullStrategy( *this, telescopeId, flags, frequency, timeResolution, frequencyResolution ); if(_threadCount != 0) rfiStrategy::Strategy::SetThreadCount(*this, _threadCount); } std::auto_ptr<ImageSetIndex> index(imageSet->StartIndex()); artifacts.SetImageSet(&*imageSet); artifacts.SetImageSetIndex(&*index); InitializeAll(); ActionBlock::Perform(artifacts, progress); FinishAll(); artifacts.SetNoImageSet(); index.reset(); imageSet.reset(); if(isMS) writeHistory(*i); } progress.OnEndTask(*this); ++taskIndex; } InitializeAll(); }