Exemplo n.º 1
0
bool GatherFolderImg::load( int minFrequencyMask, bool save_counter ) {
	if ( _scene->is_empty() ) return false ;
	_minFrequencyMask = minFrequencyMask ;
	computeMask( save_counter ) ;
	
	Pgm3dFactory<arma::u8> factory ;

	fs::path filePath ;
	for ( int slice = 0 ; slice < _scene->n_slices ;slice++ ) {
		if ( _scene->max() == 0 ) {
			filePath = _folderpath ;
			filePath /= QString( ANTHILL_SLICE_NAME ).arg( slice, 0, 10 ).toStdString() ;
			BillonTpl<arma::u8> *im = factory.read( QString(filePath.string().c_str()) ) ;
			im->slice(0) *= -1 ;
			_scene->slice( slice ) = (*im).slice(0) % _mask ;
			delete im ;
		} else {
			_scene->slice( slice ) = _scene->slice( slice ) % _mask ;
		}
	}

	return true ;
}
Exemplo n.º 2
0
void GaussianFilter::setSigma(float sigma)
{
	_sigma = sigma;
	computeMask();
}