Source
439
439
}
440
440
}
441
441
}
442
442
return whichMoments;
443
443
}
444
444
445
445
void MomentSettingsWidgetRadio::_initAnalysis(){
446
446
if ( imageAnalysis == nullptr ){
447
447
if ( taskMonitor != nullptr ){
448
448
Record region = _makeRegionRecord( );
449
-
if ( ! region.nfields() > 0 ){
449
+
if ( region.nfields() == 0 ){
450
450
String empty("");
451
451
std::shared_ptr<const ImageInterface<float> > image = taskMonitor->getImage();
452
452
if ( image ){
453
453
std::shared_ptr<const SubImage<Float> > result =
454
454
SubImageFactory<Float>::createSubImageRO(*image, region, empty, NULL);
455
455
ImageInterface<Float>* image2 = new SubImage<Float>( *result );
456
456
LogOrigin log("MomentSettingsWidgetRadio", "collapseImage", WHERE);
457
457
LogIO os(log);
458
458
imageAnalysis = new ImageMoments<Float>(*image2, os);
459
459
}