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