connect( ui.maxThresholdLineEdit, SIGNAL(textChanged( const QString&)), this, SLOT(thresholdTextChanged( const QString&)));
#include "MomentSettingsWidgetRadio.qo.h"
#include <imageanalysis/ImageAnalysis/ImageMoments.h>
#include <display/Display/DisplayCoordinateSystem.h>
#include <display/QtPlotter/ProfileTaskMonitor.h>
#include <display/QtPlotter/ThresholdingBinPlotDialog.qo.h>
#include <display/QtPlotter/conversion/Converter.h>
#include <display/QtPlotter/Util.h>
#include <imageanalysis/Regions/CasacRegionManager.h>
#include <ms/MSOper/MS1ToMS2Converter.h>
#include <display/Display/Options.h>
#include <casa/Logging.h>
#include <QTemporaryFile>
using namespace casacore;
MomentCollapseThreadRadio::MomentCollapseThreadRadio( ImageMoments<Float>* imageAnalysis ):
analysis( imageAnalysis ), stepSize( 10 ), collapseError(false) {
imageAnalysis->setProgressMonitor( this );
CollapseResult::CollapseResult( const String& outputName, bool tmp, std::shared_ptr<ImageInterface<Float>> img ):
outputFileName(outputName),
bool MomentCollapseThreadRadio::isSuccess() const {
if ( collapseResults.size() > 0 && !collapseError ) {
void MomentCollapseThreadRadio::setStepCount( int count ) {
const int STEP_LIMIT = 100;
stepSize = count / STEP_LIMIT;
const int BASE_STEP = 10;
if ( stepSize < BASE_STEP ) {
int adjustedCount = count / stepSize + 1;
emit stepCountChanged( adjustedCount );
void MomentCollapseThreadRadio::halt() {
void MomentCollapseThreadRadio::setStepsCompleted( int count ) {
if ( count % stepSize == 0 ) {
int adjustedCount = count / stepSize;
emit stepsCompletedChanged( adjustedCount );
void MomentCollapseThreadRadio::done() {
String MomentCollapseThreadRadio::getErrorMessage() const {