A.I.M.S algorithms


scalespace.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 #ifndef AIMS_PRIMALSKETCH_SCALESPACE_H
36 #define AIMS_PRIMALSKETCH_SCALESPACE_H
37 
38 #include <cstdlib>
42 #include <aims/mesh/surface.h>
43 #include <aims/mesh/texture.h>
44 #include <aims/data/data.h>
45 #include <set>
46 #include <map>
47 #include <utility>
48 #include <iostream>
49 #include <string>
50 
51 namespace aims
52 {
53 
55  public:
57  virtual ~BaseScaleSpace() {}
58 
59  virtual float dt() = 0;
60 
61  protected:
62  int get_timediff(float t1, float t2)
63  {
64  float t = t2 - t1;
65  double nbFloat;
66  double dt = double(this->dt());
67  if (dt) nbFloat = double(t) / dt;
68  else nbFloat = int(rint(t));
69 
70  if ((rint(nbFloat) - nbFloat) > 0.001 )
71  {
72  std::cerr << "diffusionSmoother::doSmoothing : t (="
73  << t << ") must be a multiple of dt (=" << dt
74  << ")" << std::endl;
75  exit(EXIT_FAILURE);
76  }
77  return int(rint(nbFloat));
78  }
79  };
80 
81  // Scalespace Is Templated With Respect To A Geometry And A Texture
82  // Same Mechanism Than Textureddata And Extractgreylevelblobs
83 
84 
85  // General ScaleSpace
86 
87  template<typename Geom, typename Text>
88  class ScaleSpace : public BaseScaleSpace {
89 
90  protected:
91  float dt() { return _smoother->dt(); };
92 
93  std::map<float, ScaleLevel<Geom, Text>*> scales;
95 
96  public:
97 
99 
100  virtual ~ScaleSpace() { delete _smoother; }
101 
103 
105  {
106  if (scales.find(t) != scales.end()) return scales[t];
107  else { AddScale(t); return scales[t]; }
108  }
109 
110  Text & GetScaleImage(float t) {return Scale(t)->Level();}
111 
112  Text & GetOriginalImage() {return Scale(0.0)->Level();}
113 
114  std::map<float, ScaleLevel<Geom, Text>*> GetScaleLevels() {return scales;}
115 
116  void AddScale(float t);
117  void RemoveScale(float t);
118 
119  void GenerateDefaultScaleSpace(float tmax)
120  { float t; for (t=1; t<=tmax; t=t*2) { std::cout << "Adding scale " << t << std::endl; AddScale(t); } }
121 
122  std::set<float> GetScaleList();
123 
124  void WriteScale(float t, std::string name);
125 
126  void WriteScaleSpace(std::string name);
127  };
128 
129 
130  // Image Partial Specialisation
131 
132  template<typename T>
133  class ScaleSpace<AimsData<T>, AimsData<T> > : public BaseScaleSpace {
134 
135  protected:
136 
137  float dt() { return _smoother->dt(); };
138  std::map<float, ScaleLevel<AimsData<T>, AimsData<T> >*> scales;
140 
141  public:
142 
144 
145  ScaleSpace(AimsData<T> * originalImage, Smoother<AimsData<T>,AimsData<T> > *smoother)
146  { PutSmoother(smoother); PutOriginalImage(originalImage); }
147 
148  virtual ~ScaleSpace() { }
149 
151  { _smoother = smoother; }
152 
153  void PutOriginalImage ( AimsData<T> *originalImage ) {
155  level = new ScaleLevel<AimsData<T>, AimsData<T> > ( 0.0f, *originalImage );
156  scales.insert(std::pair<float, ScaleLevel<AimsData<T>, AimsData<T> >*> ( 0.0f, level ) );
157  }
158 
160  if (scales.find(t) != scales.end()) return scales[t];
161  else { AddScale(t); return scales[t];}
162  }
163 
164  AimsData<T> & GetScaleImage ( float t ) { return Scale(t)->Level(); }
165 
166  AimsData<T> & GetOriginalImage() { return Scale(0.0)->Level(); }
167 
169 
170  std::set<float> GetScaleList();
171 
172  std::map<float, ScaleLevel<AimsData<T>, AimsData<T> >*> GetScaleLevels()
173  { return scales; }
174 
175  void AddScale ( float t );
176  void AddScale ( float t, AimsData<float> ima );
177 
178  void RemoveScale(float t) {if (scales.find(t) != scales.end()) { ScaleLevel<AimsData<T>, AimsData<T> >* lev=scales[t]; scales.erase(t); delete lev;}}
179 
180  void GenerateDefaultScaleSpace( float tmax ) {
181  float t;
182  for ( t = 1 ; t <= tmax ; t = t*2 ) {
183  std::cout << "Adding scale " << t << std::endl;
184  AddScale(t);
185  }
186  std::cout << "Adding scale" << tmax << std::endl;
187  AddScale(tmax);
188  }
189 
190  void WriteScale(float t, std::string name);
191 
192  void Write(std::string name);
193 
195  float t = 1.0;
196  for ( uint i = 0 ; i < scale_space.dimT() ; i++ ) {
197  std::cout << "Adding scale " << t << std::flush;
198  AimsData<float> scale ( scale_space.dimX(), scale_space.dimY(), scale_space.dimZ(), 1.0 );
199  for ( uint x = 0 ; x < scale_space.dimX() ; x++ )
200  for ( uint y = 0 ; y < scale_space.dimY() ; y++ )
201  for ( uint z = 0 ; z < scale_space.dimZ() ; z++ )
202  scale( x, y, z, 0 ) = scale_space( x, y, z, i );
203  AddScale( t, scale );
204  t = t * 2;
205  std::cout << " OK" << std::endl;
206  }
207  }
208  };
209 
210 
211  // Surface+Texture Partial Specialisation
212 
213  template<int D, typename T>
214  class ScaleSpace<AimsSurface<D, Void>, Texture<T> > : public BaseScaleSpace {
215 
216  protected:
217  float dt() { return _smoother->dt(); };
218  AimsSurface<D, Void> *_mesh;
220 
221  std::vector<Point3df> *_coordinates;
223  std::map<float, ScaleLevel<AimsSurface<D, Void>, Texture<T> >*> scales;
224 
225  public:
226 
228  _smoother=NULL; _auxmesh=NULL; _coordinates=NULL;
229  }
230 
231  ScaleSpace ( AimsSurface<D, Void> *mesh, Texture<T> *originalTexture,
232  Smoother<AimsSurface<D, Void>, Texture<T> > *smoother ) {
233  _auxmesh=NULL;
234  _coordinates=NULL;
235  PutSmoother(smoother);
236  PutMesh(mesh);
237  PutOriginalImage(originalTexture);
238  }
239 
240 
241  virtual ~ScaleSpace() { }
242 
243 
245  float t = 1.0;
246  for ( uint i = 1 ; i < tex.size() ; i++ ) {
247  std::cout << "Adding scale " << t << std::flush;
248  AddScale(t, tex[i]);
249  t = t * 2;
250  std::cout << " OK" << std::endl;
251  }
252  }
253 
255  _smoother=smoother;
256  }
257  void PutMesh(AimsSurface<D, Void> *mesh) {_mesh=mesh;}
258  void PutAuxMesh(AimsSurfaceTriangle *auxmesh) {_auxmesh=auxmesh;}
259  void PutCoordinates(std::vector<Point3df> *coord){_coordinates = coord;}
260  void PutOriginalImage ( Texture<T> *originalTexture )
261  {
263  level = new ScaleLevel<AimsSurface<D, Void>, Texture<T> > ( 0.0f, *originalTexture, _mesh, _coordinates ) ;
264  scales.insert ( std::pair<float, ScaleLevel<AimsSurface<D, Void>, Texture<T> >*>(0.0f, level) );
265  }
266 
267  AimsSurface<D, Void> *Mesh() {return _mesh;}
268  AimsSurfaceTriangle *AuxMesh() { return _auxmesh; }
269 
271  {
272  if (scales.find(t) != scales.end()) return scales[t];
273  else { AddScale(t); return scales[t];}
274  }
275  Texture<T> & GetScaleImage(float t) {return Scale(t)->Level();}
276 
277  Texture<T> & GetOriginalImage() {return Scale(0.0)->Level();}
278 
279  std::set<float> GetScaleList();
280 
281  std::map<float, ScaleLevel<AimsSurface<D, Void>, Texture<T> >*> GetScaleLevels() {return scales;}
282 
284 
285  void AddScale(float t);
286  void AddScale(float t, Texture<float> tex);
287  void RemoveScale(float t) {if (scales.find(t) != scales.end()) {ScaleLevel<AimsSurface<D, Void>, Texture<T> >* lev=scales[t]; scales.erase(t); delete lev;} }
288 
289  void GenerateDefaultScaleSpace(float tmax)
290  {
291  float t;
292  for (t=1; t<=tmax; t=t*2)
293  {
294  std::cout << "Adding scale " << t << std::endl;
295  AddScale(t);
296  }
297  std::cout << "Checking last scale level : " << tmax << std::endl;
298  AddScale(tmax);
299  }
300 
301  void WriteScale(float t, std::string name);
302  TimeTexture<T> getScaleSpaceTexture( );
303 
304  void Write(std::string name);
305  };
306 
307 
308  //------------------------------------------------------------------------
309  //-----------------DEFINITIONS--------------------------------------------
310  //------------------------------------------------------------------------
311 
312  template<typename T> void ScaleSpace<AimsData<T>, AimsData<T> >::AddScale(
313  float t, AimsData<float> ima)
314  {
315  if (scales.find(t) == scales.end())
316  {
317  ScaleLevel<AimsData<T>, AimsData<T> > *lisseLevel;
318 // AimsData<float> aux(tex.nItem());
319 // for (uint i=0;i<tex.nItem();i++)
320 // aux.item(i) = tex.item(i);
321  lisseLevel = new ScaleLevel<AimsData<T>, AimsData<T> >(t, ima, &GetOriginalImage());
322  scales.insert(std::pair<float, ScaleLevel<AimsData<T>, AimsData<T> >*>(t, lisseLevel));
323  }
324  else
325  {
326  std::cout << "Scale " << t << " already computed... " << std::endl;
327  }
328  return ;
329  }
330 
331  template<int D, typename T> void ScaleSpace<AimsSurface<D, Void>, Texture<T> >::AddScale(
332  float t, Texture<float> tex)
333  {
334  if (scales.find(t) == scales.end())
335  {
337 // Texture<float> aux(tex.nItem());
338 // for (uint i=0;i<tex.nItem();i++)
339 // aux.item(i) = tex.item(i);
340  lisseLevel = new ScaleLevel<AimsSurface<D, Void>, Texture<T> >(t, tex, _mesh, _coordinates, &GetOriginalImage());
341  scales.insert(std::pair<float, ScaleLevel<AimsSurface<D>, Texture<T> >*>(t, lisseLevel));
342  }
343  else
344  {
345  std::cout << "Scale " << t << " already computed... " << std::endl;
346  }
347  return ;
348  }
349 
350  template<typename T> void ScaleSpace<AimsData<T>, AimsData<T> >::AddScale(float t)
351  {
352  if (scales.find(t) == scales.end())
353  {
354  if (!(_smoother->optimal()))
355  {
356  std::cout << "Smoothing from original image" << std::endl;
357  int time = this->get_timediff(0, t);
358  AimsData<T> lisse=_smoother->doSmoothing(GetOriginalImage(), time);
359 
360  ScaleLevel<AimsData<T>, AimsData<T> > *lisseLevel;
361  lisseLevel=new ScaleLevel<AimsData<T>, AimsData<T> >(t,lisse,&GetOriginalImage());
362  scales.insert(std::pair<float, ScaleLevel<AimsData<T>, AimsData<T> >*>(t, lisseLevel));
363  }
364  else
365  {
366  std::cout << "Smoothing from previous scale " << std::flush;
367 
368  float tlow, tmax;
369  AimsData<T> imageLow;
370  typename std::map<float, ScaleLevel<AimsData<T>, AimsData<T> >*>::const_iterator itS = scales.begin();
371 
372  for ( ; itS!=scales.end(); ++itS)
373  tmax=itS->first;
374 
375  if (t<=0)
376  return;
377  else if (t>tmax)
378  {
379  typename std::map<float, ScaleLevel<AimsData<T>, AimsData<T> >*>::const_iterator itscales = scales.begin();
380  typename std::map<float, ScaleLevel<AimsData<T>, AimsData<T> >*>::const_iterator itLow;
381  float tmax=-1;
382  for ( ; itscales != scales.end(); ++itscales)
383  {
384  if ((*itscales).first >= tmax)
385  itLow=itscales;
386  }
387  tlow=(*itLow).first;
388  ScaleLevel<AimsData<T>, AimsData<T> > *nivEch=(*itLow).second;
389  imageLow=nivEch->Level();
390  }
391  else
392  {
393  typename std::map<float, ScaleLevel<AimsData<T>, AimsData<T> >*>::const_iterator itscales = scales.begin();
394  typename std::map<float, ScaleLevel<AimsData<T>, AimsData<T> >*>::const_iterator itnext = itscales;
395 
396  for ( ; itnext != scales.end(); ++itscales)
397  {
398  itnext=itscales;
399  ++itnext;
400  if (((*itscales).first < t) && ((*itnext).first > t))
401  {
402  tlow=(*itscales).first;
403  ScaleLevel<AimsData<T>, AimsData<T> > *nivEch=(*itscales).second;
404  imageLow=nivEch->Level();
405  itnext=scales.end();
406  }
407  }
408  }
409  std::cout << "t=" << tlow << ", image: " << imageLow.dimX() << "x" << imageLow.dimY() << "x" << imageLow.dimZ() << "x" << imageLow.dimT() << std::endl;
410 
411  int time = this->get_timediff(tlow, t);
412  AimsData<T> lisse=_smoother->doSmoothing(imageLow, time);
413  ScaleLevel<AimsData<T>, AimsData<T> > *lisseLevel;
414  lisseLevel=new ScaleLevel<AimsData<T>, AimsData<T> >(t,lisse,&GetOriginalImage());
415  scales.insert(std::pair<float, ScaleLevel<AimsData<T>, AimsData<T> >*>(t, lisseLevel));
416  }
417  }
418 
419  return;
420  }
421 
422  //----------------------------
423 
424  template<int D, typename T> void ScaleSpace<AimsSurface<D>, Texture<T> >::AddScale(float t)
425  {
426 
427  if (scales.find(t) == scales.end())
428  {
429  if (!(_smoother->optimal()))
430  {
431  std::cout << "Smoothing from original image" << std::endl;
432  int time = this->get_timediff(0, t);
433  Texture<T> lisse=_smoother->doSmoothing(GetOriginalImage(), time);
435  lisseLevel=new ScaleLevel<AimsSurface<D, Void>, Texture<T> >(t, lisse, _mesh,_coordinates, &GetOriginalImage());
436  scales.insert(std::pair<float, ScaleLevel<AimsSurface<D>, Texture<T> >*>(t, lisseLevel));
437  }
438  else
439  {
440  std::cout << "Smoothing from previous scale " << std::flush;
441 
442  float tlow, tmax;
443  Texture<T> imageLow;
444  typename std::map<float, ScaleLevel<AimsSurface<D>, Texture<T> >*>::const_iterator itS = scales.begin();
445  for ( ; itS!=scales.end(); ++itS)
446  tmax=(*itS).first;
447 
448  if (t<=0)
449  return;
450  else if (t>tmax)
451  {
452  typename std::map<float, ScaleLevel<AimsSurface<D>, Texture<T> >*>::const_iterator
453  itscales = scales.begin();
454  typename std::map<float, ScaleLevel<AimsSurface<D>, Texture<T> >*>::const_iterator itLow;
455  float tmax=-1;
456  for ( ; itscales != scales.end(); ++itscales)
457  {
458  if ((*itscales).first >= tmax)
459  itLow=itscales;
460  }
461 
462 
463  tlow=(*itLow).first;
464  ScaleLevel<AimsSurface<D>, Texture<T> > *nivEch=(*itLow).second;
465  imageLow=nivEch->Level();
466  }
467  else
468  {
469  typename std::map<float, ScaleLevel<AimsSurface<D>, Texture<T> >*>::const_iterator
470  itscales = scales.begin();
471  typename std::map<float, ScaleLevel<AimsSurface<D>, Texture<T> >*>::const_iterator
472  itnext = itscales;
473 
474  for ( ; itnext != scales.end(); ++itscales)
475  {
476  itnext=itscales;
477  ++itnext;
478 
479  if (((*itscales).first < t) && ((*itnext).first > t))
480  {
481  tlow=(*itscales).first;
482  ScaleLevel<AimsSurface<D>, Texture<T> > *nivEch=(*itscales).second;
483  imageLow=nivEch->Level();
484  itnext=scales.end();
485  }
486  }
487  }
488  std::cout << "t = " << tlow << std::endl;
489 
490  int time = this->get_timediff(tlow, t);
491 
492  Texture<T> lisse = _smoother->doSmoothing(imageLow, time);
494  lisseLevel = new ScaleLevel<AimsSurface<D, Void>, Texture<T> >( t, lisse, _mesh, _coordinates, &GetOriginalImage() );
495  scales.insert(std::pair<float, ScaleLevel<AimsSurface<D>, Texture<T> >*>(t, lisseLevel));
496 
497  }
498  }
499  else
500  {
501  std::cout << "Scale " << t << " already computed... " << std::endl;
502  }
503 
504  return;
505  }
506 
507  //----------------------------
508 
509 
510  template<typename T> void ScaleSpace<AimsData<T>, AimsData<T> >::WriteScale(float t, std::string name)
511  {
512  typename std::map<float, ScaleLevel<AimsData<T>, AimsData<T> >*>::iterator itscales;
513  if ((itscales=scales.find(t)) != scales.end())
514  {
515  Writer<AimsData<T> > dataW(name);
516  dataW.write(((*itscales).second)->Level());
517  }
518  else
519  {
520  std::cout << "Can't write scale " << t << " that does not exist..." << std::endl;
521  }
522  }
523 
524  //----------------------------
525 
526  template<int D, typename T> void ScaleSpace<AimsSurface<D, Void>, Texture<T> >::WriteScale(float t, std::string name)
527  {
528  typename std::map<float, ScaleLevel<AimsSurface<D, Void>, Texture<T> > >::iterator itscales;
529  if ((itscales=scales.find(t)) != scales.end())
530  {
531  Writer<TimeTexture<T> > dataW(name);
532  TimeTexture<T> textW; textW[0]=((*itscales).second)->Level();
533  dataW.write(textW);
534  }
535  else
536  {
537  std::cout << "Can't write scale " << t << " that does not exist..." << std::endl;
538  }
539  }
540 
541  //----------------------------
542 
543  template<typename T> void ScaleSpace<AimsData<T>, AimsData<T> >::Write(std::string name)
544  {
545  typename std::map<float, ScaleLevel<AimsData<T>, AimsData<T> >*>::iterator itscales=scales.begin();
546  int nbScales=scales.size();
547  int sx=GetOriginalImage().dimX(), sy=GetOriginalImage().dimY(), sz=GetOriginalImage().dimZ(), x, y, z;
548  float dx=GetOriginalImage().sizeX(),dy=GetOriginalImage().sizeY(),dz=GetOriginalImage().sizeZ();
549  AimsData<T> multiEch(sx, sy, sz, nbScales), tmpIma;
550 
551  int t=0;
552  for ( ; itscales!=scales.end(); ++itscales)
553  {
554  tmpIma=((*itscales).second)->Level();
555  for (z=0; z<sz; ++z)
556  {
557  for (y=0; y<sy; ++y)
558  {
559  for (x=0; x<sx; ++x)
560  {
561  multiEch(x,y,z,t)=tmpIma(x,y,z);
562  }
563  }
564  }
565  t++;
566  }
567 
568  multiEch.setSizeXYZT(dx, dy, dz, 1.0);
569  Writer<AimsData<T> > dataW(name);
570  dataW.write(multiEch);
571  }
572 
573  //----------------------------
574 
575  template<int D, typename T> TimeTexture<T> ScaleSpace<AimsSurface<D, Void>, Texture<T> >::getScaleSpaceTexture()
576  {
577  typename std::map<float, ScaleLevel<AimsSurface<D, Void>, Texture<T> >*>::iterator itscales=scales.begin();
578  TimeTexture<T> multiEch ;
579  int t=0;
580  for ( ; itscales!=scales.end(); ++itscales)
581  {
582  multiEch[t]=((*itscales).second)->Level();
583  t++;
584  }
585 
586  return multiEch;
587  }
588 
589  template<int D, typename T> void ScaleSpace<AimsSurface<D, Void>, Texture<T> >::Write(std::string name)
590  {
591  typename std::map<float, ScaleLevel<AimsSurface<D, Void>, Texture<T> >*>::iterator itscales=scales.begin();
592  TimeTexture<T> multiEch = getScaleSpaceTexture();
593  Writer<TimeTexture<T> > dataW(name);
594  dataW.write(multiEch);
595  }
596 
597  //----------------------------
598 
599  template<int D, typename T> std::set<float> ScaleSpace<AimsSurface<D, Void>, Texture<T> >::GetScaleList()
600  {
601  typename std::map<float, ScaleLevel<AimsSurface<D, Void>, Texture<T> >*>::iterator itscales=scales.begin();
602  std::set<float> setScales;
603  for ( ; itscales!=scales.end(); ++itscales)
604  {
605  setScales.insert((*itscales).first);
606  }
607  return setScales;
608  }
609 
610  //----------------------------
611 
612  template<typename T> std::set<float> ScaleSpace<AimsData<T>, AimsData<T> >::GetScaleList()
613  {
614  typename std::map<float, ScaleLevel<AimsData<T>, AimsData<T> >*>::iterator itscales=scales.begin();
615  std::set<float> setScales;
616  for ( ; itscales!=scales.end(); ++itscales)
617  {
618  setScales.insert((*itscales).first);
619  }
620  return setScales;
621  }
622 
623 }
624 
625 #endif
std::map< float, ScaleLevel< AimsSurface< D, Void >, Texture< T > > * > GetScaleLevels()
Definition: scalespace.h:281
ScaleSpace(AimsSurface< D, Void > *mesh, Texture< T > *originalTexture, Smoother< AimsSurface< D, Void >, Texture< T > > *smoother)
Definition: scalespace.h:231
void WriteScale(float t, std::string name)
std::map< float, ScaleLevel< Geom, Text > * > GetScaleLevels()
Definition: scalespace.h:114
int dimX() const
AIMSDATA_API AimsTimeSurface< 3, Void > AimsSurfaceTriangle
Smoother< AimsData< T >, AimsData< T > > * smoother()
Definition: scalespace.h:168
Smoother< AimsSurface< D, Void >, Texture< T > > * _smoother
Definition: scalespace.h:222
iterator begin()
Smoother< AimsData< T >, AimsData< T > > * _smoother
Definition: scalespace.h:139
virtual ~BaseScaleSpace()
Definition: scalespace.h:57
void PutAuxMesh(AimsSurfaceTriangle *auxmesh)
Definition: scalespace.h:258
int dimT() const
std::map< float, ScaleLevel< AimsSurface< D, Void >, Texture< T > > * > scales
Definition: scalespace.h:223
void PutCoordinates(std::vector< Point3df > *coord)
Definition: scalespace.h:259
Smoother< AimsSurface< D, Void >, Texture< T > > * smoother()
Definition: scalespace.h:283
ScaleSpace(AimsData< T > *originalImage, Smoother< AimsData< T >, AimsData< T > > *smoother)
Definition: scalespace.h:145
Smoother< Geom, Text > * _smoother
Definition: scalespace.h:94
virtual float dt()=0
std::set< float > GetScaleList()
void AddScale(float t)
Definition: scalespace.h:424
ScaleLevel< AimsSurface< D, Void >, Texture< T > > * Scale(float t)
Definition: scalespace.h:270
ScaleLevel< Geom, Text > * Scale(float t)
Definition: scalespace.h:104
void PutSmoother(Smoother< AimsData< T >, AimsData< T > > *smoother)
Definition: scalespace.h:150
ScaleLevel< AimsData< T >, AimsData< T > > * Scale(float t)
Definition: scalespace.h:159
void PutMesh(AimsSurface< D, Void > *mesh)
Definition: scalespace.h:257
void GenerateDefaultScaleSpace(float tmax)
Definition: scalespace.h:119
void PutSmoother(Smoother< AimsSurface< D, Void >, Texture< T > > *smoother)
Definition: scalespace.h:254
virtual bool write(const T &obj, bool ascii=false, const std::string *format=0)
std::map< float, ScaleLevel< AimsData< T >, AimsData< T > > * > GetScaleLevels()
Definition: scalespace.h:172
void PutOriginalImage(AimsData< T > *originalImage)
Definition: scalespace.h:153
std::map< float, ScaleLevel< Geom, Text > * > scales
Definition: scalespace.h:91
void PutOriginalImage(Texture< T > *originalTexture)
Definition: scalespace.h:260
void WriteScaleSpace(std::string name)
void uploadPreviouslyComputedScaleSpace(AimsData< float > &scale_space)
Definition: scalespace.h:194
Text & GetOriginalImage()
Definition: scalespace.h:112
int get_timediff(float t1, float t2)
Definition: scalespace.h:62
unsigned int uint
Text & GetScaleImage(float t)
Definition: scalespace.h:110
void PutSmoother(Smoother< Geom, Text > *blur)
Definition: scalespace.h:102
int dimZ() const
void RemoveScale(float t)
int dimY() const
void uploadPreviouslyComputedScaleSpace(TimeTexture< float > &tex)
Definition: scalespace.h:244
virtual ~ScaleSpace()
Definition: scalespace.h:100