A.I.M.S


threshold.h
Go to the documentation of this file.
1 /* This software and supporting documentation are distributed by
2  * Institut Federatif de Recherche 49
3  * CEA/NeuroSpin, Batiment 145,
4  * 91191 Gif-sur-Yvette cedex
5  * France
6  *
7  * This software is governed by the CeCILL-B license under
8  * French law and abiding by the rules of distribution of free software.
9  * You can use, modify and/or redistribute the software under the
10  * terms of the CeCILL-B license as circulated by CEA, CNRS
11  * and INRIA at the following URL "http://www.cecill.info".
12  *
13  * As a counterpart to the access to the source code and rights to copy,
14  * modify and redistribute granted by the license, users are provided only
15  * with a limited warranty and the software's author, the holder of the
16  * economic rights, and the successive licensors have only limited
17  * liability.
18  *
19  * In this respect, the user's attention is drawn to the risks associated
20  * with loading, using, modifying and/or developing or reproducing the
21  * software by the user in light of its specific status of free software,
22  * that may mean that it is complicated to manipulate, and that also
23  * therefore means that it is reserved for developers and experienced
24  * professionals having in-depth computer knowledge. Users are therefore
25  * encouraged to load and test the software's suitability as regards their
26  * requirements in conditions enabling the security of their systems and/or
27  * data to be ensured and, more generally, to use and operate it in the
28  * same conditions as regards security.
29  *
30  * The fact that you are presently reading this means that you have had
31  * knowledge of the CeCILL-B license and that you accept its terms.
32  */
33 
34 /*
35  * Threshold operators
36  */
37 #ifndef AIMS_UTILITY_THRESHOLD_H
38 #define AIMS_UTILITY_THRESHOLD_H
39 
40 #include <iostream>
41 #include <limits>
42 
44 #include <aims/data/data.h>
45 #include <aims/data/pheader.h>
46 #include <aims/mesh/texture.h>
47 
48 
50 {
65 };
66 
92 template <class T,class U>
94 {
95 public:
103  inline AimsThreshold( threshold_t type,T level,T level2 = 0,
104  T backgd = 0,
106  || (std::numeric_limits<U>::max() >= 32767)
107  ? 32767 : std::numeric_limits<U>::max() ) );
108  virtual ~AimsThreshold() {}
109 
111  inline AimsData<T> operator () (const AimsData<T> &sqv);
114  inline AimsData<T> clip(const AimsData<T> &sqv);
116  inline AimsData<U> bin(const AimsData<T> &sqv);
117 
118 protected:
127 };
128 
129 template <class T,class U>
131 {
132 public:
139  inline AimsTexThreshold( threshold_t type,T level,T level2=0, T backgd = 0 );
140  virtual ~AimsTexThreshold() {}
141 
143  inline TimeTexture<T> operator () (const TimeTexture<T> &sqv);
145  inline TimeTexture<U> bin(const TimeTexture<T> &sqv);
146 
147 protected:
155 };
156 
157 template <class T,class U> inline
159  T backgd, U foregd )
160  : _type( type ), _level( level ), _level2( level2 ), _backgd( backgd ), _foregd( foregd )
161 {
162 }
163 
164 template <class T,class U> inline
166  T backgd )
167  : _type( type ), _level( level ), _level2( level2 ), _backgd( backgd )
168 {
169 }
170 
171 template <class T,class U> inline
173 {
174  AimsData<T> res(sqv.dimX(),sqv.dimY(),sqv.dimZ(),sqv.dimT(),
175  sqv.borderWidth());
176  res.setSizeX(sqv.sizeX());
177  res.setSizeY(sqv.sizeY());
178  res.setSizeZ(sqv.sizeZ());
179  res.setSizeT(sqv.sizeT());
180 
181  res = T( 0 );
182 
183  typename AimsData<T>::iterator it1;
184  typename AimsData<T>::const_iterator it2;
185 
186  switch (_type)
187  { case AIMS_LOWER_THAN :
188  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
189  *it1 = (*it2 < _level ? *it2 : _backgd);
190  break;
192  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
193  *it1 = (*it2 <= _level ? *it2 : _backgd);
194  break;
195  case AIMS_GREATER_THAN :
196  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
197  *it1 = (*it2 > _level ? *it2 : _backgd);
198  break;
200  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
201  *it1 = (*it2 >= _level ? *it2 : _backgd);
202  break;
203  case AIMS_EQUAL_TO :
204  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
205  *it1 = (*it2 == _level ? *it2 : _backgd);
206  break;
207  case AIMS_DIFFER :
208  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
209  *it1 = (*it2 != _level ? *it2 : _backgd);
210  break;
211  case AIMS_BETWEEN :
212  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
213  *it1 = (*it2 >= _level && *it2 <= _level2 ? *it2 : _backgd);
214  break;
216  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
217  *it1 = (*it2 > _level && *it2 <= _level2 ? *it2 : _backgd);
218  break;
220  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
221  *it1 = (*it2 >= _level && *it2 < _level2 ? *it2 : _backgd);
222  break;
224  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
225  *it1 = (*it2 > _level && *it2 < _level2 ? *it2 : _backgd);
226  break;
227  case AIMS_OUTSIDE :
228  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
229  *it1 = (*it2 < _level || *it2 > _level2 ? *it2 : _backgd);
230  break;
232  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
233  *it1 = (*it2 <= _level || *it2 > _level2 ? *it2 : _backgd);
234  break;
236  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
237  *it1 = (*it2 < _level || *it2 >= _level2 ? *it2 : _backgd);
238  break;
240  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
241  *it1 = (*it2 < _level || *it2 > _level2 ? *it2 : _backgd);
242  break;
243  }
244 
245  if( sqv.header() )
246  {
247  res.setHeader( sqv.header()->cloneHeader() );
248  aims::PythonHeader *ph
249  = dynamic_cast<aims::PythonHeader *>( res.header() );
250  if( ph && ph->hasProperty( "data_type" ) )
251  ph->removeProperty( "data_type" );
252  }
253  return(res);
254 }
255 
256 template <class T,class U> inline
258 {
259  AimsData<T> res(sqv.dimX(),sqv.dimY(),sqv.dimZ(),sqv.dimT(),
260  sqv.borderWidth());
261  res.setSizeX(sqv.sizeX());
262  res.setSizeY(sqv.sizeY());
263  res.setSizeZ(sqv.sizeZ());
264  res.setSizeT(sqv.sizeT());
265 
266  res = T( 0 );
267 
268  typename AimsData<T>::iterator it1;
269  typename AimsData<T>::const_iterator it2;
270 
271  switch (_type)
272  { case AIMS_LOWER_THAN :
273  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
274  *it1 = (*it2 < _level ? *it2 : _level);
275  break;
277  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
278  *it1 = (*it2 <= _level ? *it2 : _level);
279  break;
280  case AIMS_GREATER_THAN :
281  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
282  *it1 = (*it2 > _level ? *it2 : _level);
283  break;
285  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
286  *it1 = (*it2 >= _level ? *it2 : _level);
287  break;
288  case AIMS_BETWEEN :
289  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
290  *it1 = (*it2 >= _level ? (*it2 <= _level2 ? *it2 : _level2) : _level);
291  break;
293  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
294  *it1 = (*it2 > _level ? ( *it2 <= _level2 ? *it2 : _level2 ) : _level);
295  break;
297  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
298  *it1 = (*it2 >= _level ? ( *it2 < _level2 ? *it2 : _level2 ) : _level);
299  break;
301  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
302  *it1 = (*it2 > _level ? ( *it2 < _level2 ? *it2 : _level2 ) : _level);
303  break;
304  case AIMS_OUTSIDE :
308  case AIMS_EQUAL_TO :
309  case AIMS_DIFFER :
310  // Clipping has no real meaning in those cases, thus we do standard
311  // thresholding instead.
312  std::cerr << "Warning: AimsThreshold cannot use clipping with this mode, "
313  "using standard clipping instead." << std::endl;
314  return (*this)(sqv);
315  }
316 
317  if( sqv.header() )
318  {
319  res.setHeader( sqv.header()->cloneHeader() );
320  aims::PythonHeader *ph
321  = dynamic_cast<aims::PythonHeader *>( res.header() );
322  if( ph && ph->hasProperty( "data_type" ) )
323  ph->removeProperty( "data_type" );
324  }
325  return(res);
326 }
327 
328 template <class T,class U> inline
330 {
331 
332  unsigned i, n = sqv.nItem(), t , tm = sqv.size();
333  TimeTexture<T> res = sqv;
334 
335  switch (_type)
336  { case AIMS_LOWER_THAN :
337  for (t = 0; t < tm ; ++t)
338  for (i = 0; i < n ; ++i)
339  res.item( i ) = ( res[t].item( i ) < _level ? res[t].item( i )
340  : _backgd);
341  break;
342  case AIMS_LOWER_OR_EQUAL_TO :
343  for (t = 0; t < tm ; ++t)
344  for (i = 0; i < n ; ++i)
345  res.item( i ) = ( res[t].item( i ) <= _level ? res[t].item( i )
346  : _backgd);
347  break;
348  case AIMS_GREATER_THAN :
349  for (t = 0; t < tm ; ++t)
350  for (i = 0; i < n ; ++i)
351  res.item( i ) = ( res[t].item( i ) > _level ? res[t].item( i )
352  : _backgd);
353  break;
355  for (t = 0; t < tm ; ++t)
356  for (i = 0; i < n ; ++i)
357  res.item( i ) = ( res[t].item( i ) >= _level ? res[t].item( i )
358  : _backgd);
359  break;
360  case AIMS_EQUAL_TO :
361  for (t = 0; t < tm ; ++t)
362  for (i = 0; i < n ; ++i)
363  res.item( i ) = ( res[t].item( i ) == _level ? res[t].item( i )
364  : _backgd);
365  break;
366  case AIMS_DIFFER :
367  for (t = 0; t < tm ; ++t)
368  for (i = 0; i < n ; ++i)
369  res.item( i ) = ( res[t].item( i ) != _level ? res[t].item( i )
370  : _backgd);
371  break;
372  case AIMS_BETWEEN :
373  for (t = 0; t < tm ; ++t)
374  for (i = 0; i < n ; ++i)
375  res.item( i ) = ( res[t].item( i ) >= _level && res[t].item( i )
376  <= _level2 ? res[t].item( i ) : _backgd);
377  break;
379  for (t = 0; t < tm ; ++t)
380  for (i = 0; i < n ; ++i)
381  res.item( i ) = ( res[t].item( i ) > _level && res[t].item( i )
382  <= _level2 ? res[t].item( i ) : _backgd);
383  break;
385  for (t = 0; t < tm ; ++t)
386  for (i = 0; i < n ; ++i)
387  res.item( i ) = ( res[t].item( i ) > _level && res[t].item( i )
388  < _level2 ? res[t].item( i ) : _backgd);
389  break;
391  for (t = 0; t < tm ; ++t)
392  for (i = 0; i < n ; ++i)
393  res.item( i ) = ( res[t].item( i ) > _level && res[t].item( i )
394  < _level2 ? res[t].item( i ) : _backgd);
395  break;
396  case AIMS_OUTSIDE :
397  for (t = 0; t < tm ; ++t)
398  for (i = 0; i < n ; ++i)
399  res.item( i ) = ( res[t].item( i ) < _level || res[t].item( i )
400  > _level2 ? (U) res[t].item( i ) : _backgd);
401  break;
403  for (t = 0; t < tm ; ++t)
404  for (i = 0; i < n ; ++i)
405  res.item( i ) = ( res[t].item( i ) <= _level || res[t].item( i )
406  > _level2 ? (U) res[t].item( i ) : _backgd);
407  break;
409  for (t = 0; t < tm ; ++t)
410  for (i = 0; i < n ; ++i)
411  res.item( i ) = ( res[t].item( i ) < _level || res[t].item( i )
412  >= _level2 ? (U) res[t].item( i ) : _backgd);
413  break;
415  for (t = 0; t < tm ; ++t)
416  for (i = 0; i < n ; ++i)
417  res.item( i ) = ( res[t].item( i ) <= _level || res[t].item( i )
418  >= _level2 ? (U) res[t].item( i ) : _backgd);
419  break;
420  }
421 
422  //No header for the texture yet...
423  /*
424  if( sqv.header() )
425  {
426  res.setHeader( sqv.header()->cloneHeader() );
427  aims::PythonHeader *ph
428  = dynamic_cast<aims::PythonHeader *>( res.header() );
429  if( ph && ph->hasProperty( "data_type" ) )
430  ph->removeProperty( "data_type" );
431  }
432  */
433  return(res);
434 }
435 
436 template <class T,class U> inline
438 {
439  AimsData<U> res(sqv.dimX(),sqv.dimY(),sqv.dimZ(),sqv.dimT(),
440  sqv.borderWidth());
441  res.setSizeX(sqv.sizeX());
442  res.setSizeY(sqv.sizeY());
443  res.setSizeZ(sqv.sizeZ());
444  res.setSizeT(sqv.sizeT());
445 
446  res = U( 0 );
447 
448  typename AimsData<U>::iterator it1;
449  typename AimsData<T>::const_iterator it2;
450 
451  switch (_type)
452  { case AIMS_LOWER_THAN :
453  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
454  *it1 = (*it2 < _level ? _foregd : 0);
455  break;
456  case AIMS_LOWER_OR_EQUAL_TO :
457  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
458  *it1 = (*it2 <= _level ? _foregd : 0);
459  break;
460  case AIMS_GREATER_THAN :
461  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
462  *it1 = (*it2 > _level ? _foregd : 0);
463  break;
465  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
466  *it1 = (*it2 >= _level ? _foregd : 0);
467  break;
468  case AIMS_EQUAL_TO :
469  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
470  *it1 = (*it2 == _level ? _foregd : 0);
471  break;
472  case AIMS_DIFFER :
473  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
474  *it1 = (*it2 != _level ? _foregd : 0);
475  break;
476  case AIMS_BETWEEN :
477  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
478  *it1 = (*it2 >= _level && *it2 <= _level2 ? _foregd : 0);
479  break;
481  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
482  *it1 = (*it2 > _level && *it2 <= _level2 ? _foregd : 0);
483  break;
485  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
486  *it1 = (*it2 >= _level && *it2 < _level2 ? _foregd : 0);
487  break;
489  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
490  *it1 = (*it2 > _level && *it2 < _level2 ? _foregd : 0);
491  break;
492  case AIMS_OUTSIDE :
493  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
494  *it1 = (*it2 < _level || *it2 > _level2 ? _foregd : 0);
495  break;
497  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
498  *it1 = (*it2 <= _level || *it2 > _level2 ? _foregd : 0);
499  break;
501  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
502  *it1 = (*it2 < _level || *it2 >= _level2 ? _foregd : 0);
503  break;
505  for (it1=res.begin(),it2=sqv.begin();it2<sqv.end();it1++,it2++)
506  *it1 = (*it2 <= _level || *it2 >= _level2 ? _foregd : 0);
507  break;
508  }
509 
510  if( sqv.header() )
511  {
512  res.setHeader( sqv.header()->cloneHeader() );
513  aims::PythonHeader *ph
514  = dynamic_cast<aims::PythonHeader *>( res.header() );
515  if( ph && ph->hasProperty( "data_type" ) )
516  ph->removeProperty( "data_type" );
517  }
518  return(res);
519 }
520 
521 template <class T,class U> inline
523 {
524  unsigned i, n = sqv.nItem(), t , tm = sqv.size();
525  TimeTexture<T> temp = sqv ;
526  TimeTexture<U> res;
527 
528  switch (_type)
529  { case AIMS_LOWER_THAN :
530  for (t = 0; t < tm ; ++t)
531  for (i = 0; i < n ; ++i)
532  if ( temp[t].item( i ) < _level)
533  res[t].push_back( 1 );
534  else
535  res[t].push_back( 0 );
536 
537  break;
538  case AIMS_LOWER_OR_EQUAL_TO :
539  for (t = 0; t < tm ; ++t)
540  for (i = 0; i < n ; ++i)
541  if ( temp[t].item( i ) <= _level)
542  res[t].push_back( 1 );
543  else
544  res[t].push_back( 0 );
545  break;
546  case AIMS_GREATER_THAN :
547  for (t = 0; t < tm ; ++t)
548  for (i = 0; i < n ; ++i)
549  if ( temp[t].item( i ) > _level)
550  res[t].push_back( 1 );
551  else
552  res[t].push_back( 0 );
553  break;
555  for (t = 0; t < tm ; ++t)
556  for (i = 0; i < n ; ++i)
557  if ( temp[t].item( i ) >= _level)
558  res[t].push_back( 1 );
559  else
560  res[t].push_back( 0 );
561  break;
562  case AIMS_EQUAL_TO :
563  for (t = 0; t < tm ; ++t)
564  for (i = 0; i < n ; ++i)
565  if ( temp[t].item( i ) == _level)
566  res[t].push_back( 1 );
567  else
568  res[t].push_back( 0 );
569  break;
570  case AIMS_DIFFER :
571  for (t = 0; t < tm ; ++t)
572  for (i = 0; i < n ; ++i)
573  if ( temp[t].item( i ) != _level)
574  res[t].push_back( 1 );
575  else
576  res[t].push_back( 0 );
577  break;
578  case AIMS_BETWEEN :
579  for (t = 0; t < tm ; ++t)
580  for (i = 0; i < n ; ++i)
581  if ( temp[t].item( i ) >= _level
582  && temp[t].item( i ) <= _level2 )
583  res[t].push_back( 1 );
584  else
585  res[t].push_back( 0 );
586  break;
588  for (t = 0; t < tm ; ++t)
589  for (i = 0; i < n ; ++i)
590  if ( temp[t].item( i ) > _level
591  && temp[t].item( i ) <= _level2 )
592  res[t].push_back( 1 );
593  else
594  res[t].push_back( 0 );
595  break;
597  for (t = 0; t < tm ; ++t)
598  for (i = 0; i < n ; ++i)
599  if ( temp[t].item( i ) >= _level
600  && temp[t].item( i ) < _level2 )
601  res[t].push_back( 1 );
602  else
603  res[t].push_back( 0 );
604  break;
606  for (t = 0; t < tm ; ++t)
607  for (i = 0; i < n ; ++i)
608  if ( temp[t].item( i ) > _level
609  && temp[t].item( i ) < _level2 )
610  res[t].push_back( 1 );
611  else
612  res[t].push_back( 0 );
613  break;
614  case AIMS_OUTSIDE :
615  for (t = 0; t < tm ; ++t)
616  for (i = 0; i < n ; ++i)
617  if ( temp[t].item( i ) < _level
618  && temp[t].item( i ) > _level2 )
619  res[t].push_back( 1 );
620  else
621  res[t].push_back( 0 );
622  break;
624  for (t = 0; t < tm ; ++t)
625  for (i = 0; i < n ; ++i)
626  if ( temp[t].item( i ) <= _level
627  && temp[t].item( i ) > _level2 )
628  res[t].push_back( 1 );
629  else
630  res[t].push_back( 0 );
631  break;
633  for (t = 0; t < tm ; ++t)
634  for (i = 0; i < n ; ++i)
635  if ( temp[t].item( i ) < _level
636  && temp[t].item( i ) >= _level2 )
637  res[t].push_back( 1 );
638  else
639  res[t].push_back( 0 );
640  break;
642  for (t = 0; t < tm ; ++t)
643  for (i = 0; i < n ; ++i)
644  if ( temp[t].item( i ) <= _level
645  && temp[t].item( i ) >= _level2 )
646  res[t].push_back( 1 );
647  else
648  res[t].push_back( 0 );
649  break;
650  }
651 
652  //No header for the texture yet...
653  /*
654  if( sqv.header() )
655  {
656  res.setHeader( sqv.header()->cloneHeader() );
657  aims::PythonHeader *ph
658  = dynamic_cast<aims::PythonHeader *>( res.header() );
659  if( ph && ph->hasProperty( "data_type" ) )
660  ph->removeProperty( "data_type" );
661  }
662  */
663  return(res);
664 }
665 
666 
667 #endif
const T * const_iterator
basic constant iterator
Attributed python-like header, stores all needed information about an object, currently used for volu...
Definition: pheader.h:51
void push_back(const T &item)
Definition: texture.h:146
int dimX() const
size_t nItem() const
Definition: texture.h:139
T _level
Lower level or unique level.
Definition: threshold.h:122
float sizeY() const
virtual bool hasProperty(const std::string &) const
iterator begin()
T * iterator
basic iterator
int dimT() const
threshold_t _type
Threshold type.
Definition: threshold.h:149
virtual ~AimsThreshold()
Definition: threshold.h:108
void setSizeX(float sizex)
virtual bool removeProperty(const std::string &)
void setHeader(aims::Header *hdr)
TimeTexture< T > operator()(const TimeTexture< T > &sqv)
Return the multi-level thresholded texture.
Definition: threshold.h:329
T _level
Lower level or unique level.
Definition: threshold.h:151
virtual Header * cloneHeader(bool keepUuid=false) const =0
int borderWidth() const
Usefull offsets for A.I.M.S.
Definition: border.h:135
AimsData< T > clip(const AimsData< T > &sqv)
Return the multi-level thresholded image with clipped values (backgd ignored)
Definition: threshold.h:257
threshold_t _type
Threshold type.
Definition: threshold.h:120
AimsThreshold(threshold_t type, T level, T level2=0, T backgd=0, U foregd=(U)(!std::numeric_limits< U >::is_specialized||(std::numeric_limits< U >::max() >=32767)?32767:std::numeric_limits< U >::max()))
Volume thresholding.
Definition: threshold.h:158
AimsData< U > bin(const AimsData< T > &sqv)
Return the binary thresholded image.
Definition: threshold.h:437
T _level2
Upper level.
Definition: threshold.h:124
float sizeT() const
The template class to make thresholds.
Definition: threshold.h:93
const T & item(int n) const
Definition: texture.h:141
threshold_t
Definition: threshold.h:49
float sizeZ() const
AimsData< T > operator()(const AimsData< T > &sqv)
Return the multi-level thresholded image.
Definition: threshold.h:172
T _level2
Upper level.
Definition: threshold.h:153
virtual ~AimsTexThreshold()
Definition: threshold.h:140
float sizeX() const
int dimZ() const
AimsTexThreshold(threshold_t type, T level, T level2=0, T backgd=0)
Texture thresholding.
Definition: threshold.h:165
int dimY() const
iterator end()
const aims::Header * header() const
TimeTexture< U > bin(const TimeTexture< T > &sqv)
Return the binary thresholded texture.
Definition: threshold.h:522