SMIL  0.9.1
DMorphoArrow.hpp
1 /*
2  * Copyright (c) 2011-2016, Matthieu FAESSEL and ARMINES
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of Matthieu FAESSEL, or ARMINES nor the
14  * names of its contributors may be used to endorse or promote products
15  * derived from this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY
18  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
21  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 
30 #ifndef _D_MORPHO_ARROW_HPP
31 #define _D_MORPHO_ARROW_HPP
32 
33 #include "DMorphImageOperations.hpp"
34 #include "DMorphoHierarQ.hpp"
35 
36 namespace smil
37 {
45  template <class T_in, class lineFunction_T, class T_out=T_in>
46  class unaryMorphArrowImageFunction : public MorphImageFunction<T_in, lineFunction_T, T_out>
47  {
48  public:
50 
51  typedef Image<T_in> imageInType;
52  typedef typename ImDtTypes<T_in>::lineType lineInType;
53  typedef typename ImDtTypes<T_in>::sliceType sliceInType;
54  typedef typename ImDtTypes<T_in>::volType volInType;
55 
56  typedef Image<T_out> imageOutType;
57  typedef typename ImDtTypes<T_out>::lineType lineOutType;
58  typedef typename ImDtTypes<T_out>::sliceType sliceOutType;
59  typedef typename ImDtTypes<T_out>::volType volOutType;
60 
61  unaryMorphArrowImageFunction(T_in border=numeric_limits<T_in>::min(), T_out /*_initialValue*/ = ImDtTypes<T_out>::min())
63  {
64  }
65  virtual RES_T _exec_single(const imageInType &imIn, imageOutType &imOut, const StrElt &se);
66  };
67 
68 
69  template <class T_in, class lineFunction_T, class T_out>
71  {
72  ASSERT_ALLOCATED(&imIn);
73  ASSERT_SAME_SIZE(&imIn, &imOut);
74 
75  if ((void*)&imIn==(void*)&imOut)
76  {
77  Image<T_in> tmpIm = imIn;
78  return _exec_single(tmpIm, imOut, se);
79  }
80 
81  if (!areAllocated(&imIn, &imOut, NULL))
82  return RES_ERR_BAD_ALLOCATION;
83 
84  UINT sePtsNumber = se.points.size();
85  if (sePtsNumber==0)
86  return RES_OK;
87 
88  size_t nSlices = imIn.getSliceCount();
89  size_t nLines = imIn.getHeight();
90 
91  this->lineLen = imIn.getWidth();
92 
93 
94  volInType srcSlices = imIn.getSlices();
95  volOutType destSlices = imOut.getSlices();
96 
97  int nthreads = Core::getInstance()->getNumberOfThreads();
98  typename ImDtTypes<T_in>::vectorType vec(this->lineLen);
99  typename ImDtTypes<T_in>::matrixType bufsIn(nthreads, typename ImDtTypes<T_in>::vectorType(this->lineLen));
100  typename ImDtTypes<T_out>::matrixType bufsOut(nthreads, typename ImDtTypes<T_out>::vectorType(this->lineLen));
101 
102  size_t l;
103 
104  for (size_t s=0;s<nSlices;s++)
105  {
106  lineInType *srcLines = srcSlices[s];
107  lineOutType *destLines = destSlices[s];
108 
109  #ifdef USE_OPEN_MP
110  #pragma omp parallel num_threads(nthreads)
111  #endif
112  {
113 
114  bool oddSe = se.odd, oddLine = 0;
115 
116  size_t x, y, z;
117  lineFunction_T arrowLineFunction;
118 
119  int tid = 0;
120 
121  #ifdef USE_OPEN_MP
122  tid = omp_get_thread_num();
123  #endif // _OPENMP
124  lineInType tmpBuf = bufsIn[tid].data();
125  lineOutType tmpBuf2 = bufsOut[tid].data();
126 
127  #ifdef USE_OPEN_MP
128  #pragma omp for
129  #endif // USE_OPEN_MP
130  for (l=0;l<nLines;l++)
131  {
132  lineInType lineIn = srcLines[l];
133  lineOutType lineOut = destLines[l];
134 
135  oddLine = oddSe && l%2;
136 
137  fillLine<T_out>(tmpBuf2, this->lineLen, T_out(0));
138 
139  for (UINT p=0;p<sePtsNumber;p++)
140  {
141  y = l + se.points[p].y;
142  x = - se.points[p].x - (oddLine && (y+1)%2);
143  z = s + se.points[p].z;
144 
145  arrowLineFunction.trueVal = (1UL << p);
146  this->_extract_translated_line(&imIn, x, y, z, tmpBuf);
147  arrowLineFunction._exec(lineIn, tmpBuf, this->lineLen, tmpBuf2);
148  }
149  copyLine<T_out>(tmpBuf2, this->lineLen, lineOut);
150  }
151  } // pragma omp parallel
152  }
153 
154  imOut.modified();
155 
156  return RES_OK;
157  }
158 
159 
160  template <class T_in, class T_out>
161  RES_T arrowLow(const Image<T_in> &imIn, Image<T_out> &imOut, const StrElt &se=DEFAULT_SE, T_in borderValue=numeric_limits<T_in>::min())
162  {
164  return iFunc(imIn, imOut, se);
165  }
166 
167  template <class T_in, class T_out>
168  RES_T arrowLowOrEqu(const Image<T_in> &imIn, Image<T_out> &imOut, const StrElt &se=DEFAULT_SE, T_in borderValue=numeric_limits<T_in>::min())
169  {
171  return iFunc(imIn, imOut, se);
172  }
173 
174  template <class T_in, class T_out>
175  RES_T arrowGrt(const Image<T_in> &imIn, Image<T_out> &imOut, const StrElt &se=DEFAULT_SE, T_in borderValue=numeric_limits<T_in>::min())
176  {
178  return iFunc(imIn, imOut, se);
179  }
180 
181  template <class T_in, class T_out>
182  RES_T arrowGrtOrEqu(const Image<T_in> &imIn, Image<T_out> &imOut, const StrElt &se=DEFAULT_SE, T_in borderValue=numeric_limits<T_in>::min())
183  {
185  return iFunc(imIn, imOut, se);
186  }
187 
188  template <class T_in, class T_out>
189  RES_T arrowEqu(const Image<T_in> &imIn, Image<T_out> &imOut, const StrElt &se=DEFAULT_SE, T_in borderValue=numeric_limits<T_in>::min())
190  {
192  return iFunc(imIn, imOut, se);
193  }
194 
204  template <class T_in, class T_out>
205  RES_T arrow(const Image<T_in> &imIn, const char *operation, Image<T_out> &imOut, const StrElt &se=DEFAULT_SE, T_in borderValue=numeric_limits<T_in>::min())
206  {
207  if (strcmp(operation, "==")==0)
208  return arrowEqu(imIn, imOut, se, borderValue);
209  else if (strcmp(operation, ">")==0)
210  return arrowGrt(imIn, imOut, se, borderValue);
211  else if (strcmp(operation, ">=")==0)
212  return arrowGrtOrEqu(imIn, imOut, se, borderValue);
213  else if (strcmp(operation, "<")==0)
214  return arrowLow(imIn, imOut, se, borderValue);
215  else if (strcmp(operation, "<=")==0)
216  return arrowLowOrEqu(imIn, imOut, se, borderValue);
217 
218  else return RES_ERR;
219  }
220 
225  template <class arrowT, class statutT, class outT, class containerType = STD_Queue<size_t> >
227 
228  protected:
229  containerType q;
230 
231  virtual bool testAndAssign (statutT &/*pS*/, outT &pO)
232  {
233  if (pO != propagationValue)
234  {
235  // pS = numeric_limits<statutT>::max();
236  pO = propagationValue;
237  return true;
238  }
239  return false;
240  }
241 
242  public:
243  outT propagationValue;
244 
245  typedef Image<arrowT> arrowIT;
246  typedef Image<statutT> statutIT;
247  typedef Image<outT> outIT;
248  typedef typename arrowIT::lineType arrowLT;
249  typedef typename statutIT::lineType statutLT;
250  typedef typename outIT::lineType outLT;
251 
252  arrowPropagate () {}
253  virtual ~arrowPropagate () {}
254 
255  RES_T _exec ( const Image<arrowT> &imArrow, Image<statutT> &imStatut, Image<outT> &imOut, const StrElt &se, const size_t &offset )
256  {
257  arrowLT arrowP = imArrow.getPixels ();
258  statutLT statutP = imStatut.getPixels ();
259  outLT outP = imOut.getPixels ();
260 
261  bool oddLine;
262  size_t size[3]; imArrow.getSize (size);
263  UINT sePtsNumber = se.points.size ();
264 
265  size_t x, x0, y, y0, z, z0;
266  arrowT arrow;
267 
268  size_t o, nb_o;
269 
270  q.push (offset);
271  do
272  {
273  o = q.front();
274  q.pop();
275  z0 = o / (size[1] * size[0]);
276  y0 = (o % (size[1]*size[0])) / size[0];
277  x0 = o % size[0];
278  oddLine = se.odd && y0%2;
279 
280  for (UINT p=0; p<sePtsNumber; ++p)
281  {
282  arrow = (1UL << p);
283  if (arrowP[o] & arrow)
284  {
285  x = x0 + se.points[p].x;
286  y = y0 + se.points[p].y;
287  z = z0 + se.points[p].z;
288  if (oddLine)
289  x += (y+1)%2;
290  nb_o = x + y*size[0] + z*size[1]*size[0];
291  if ( x < size[0] &&
292  y < size[1] &&
293  z < size[2])
294  if (testAndAssign (statutP[nb_o], outP[nb_o]))
295  q.push(nb_o);
296  }
297  }
298 
299  } while (!q.empty());
300  return RES_OK;
301  }
302  inline RES_T operator ()( const Image<arrowT> &imArrow, Image<statutT> &imStatut, Image<outT> &imOut, const StrElt &se, const size_t &offset )
303  {
304  return _exec (imArrow, imStatut, imOut, se, offset);
305  }
306  inline RES_T operator ()(const Image<arrowT> &imArrow, Image<outT> &imOut, const StrElt &se, const size_t &offset)
307  {
308  return _exec (imArrow, imOut, imOut, se, offset);
309  }
310  };
311 
312  template < class T1, class T2, class T_out=T2>
313  struct equSupLine3:public binaryLineFunctionBase < T1, T2, T_out>
314  {
315  equSupLine3 () :
316  trueVal ( ImDtTypes < T_out >::max ( ) ), falseVal ( 0 ) {}
317 
318  T_out trueVal, falseVal;
319 
321  typedef typename parentClass::lineType1 lineType1;
322  typedef typename parentClass::lineType2 lineType2;
323  typedef typename parentClass::lineOutType lineOutType;
324 
325  inline void operator () (const lineType1 lIn1,
326  const lineType2 lIn2,
327  const size_t size, lineOutType lOut )
328  {
329  return _exec ( lIn1, lIn2, size, lOut );
330  }
331  virtual void _exec ( const lineType1 lIn1,
332  const lineType2 lIn2,
333  const size_t size, lineOutType lOut )
334  {
335  T_out _trueVal ( trueVal ), _falseVal ( falseVal );
336 
337  for (size_t i = 0; i < size; i++)
338  {
339  lOut[i] += ( lIn1[i] == lIn2[i] ) ? _trueVal : _falseVal;
340  }
341  }
342  };
343 
344 
345  template < class T, class arrowT = UINT8 >
346  class arrowMinFunction : public MorphImageFunctionBase<T, arrowT>
347  {
348  public:
350 
351  typedef typename parentClass::imageInType imageInType;
352  typedef typename imageInType::lineType lineInType;
353  typedef typename imageInType::lineType sliceInType;
354  typedef typename imageInType::volType volInType;
355 
356  typedef typename parentClass::imageOutType imageArrowType;
357  typedef typename imageArrowType::lineType lineArrowType;
358  typedef typename imageArrowType::sliceType sliceArrowType;
359  typedef typename imageArrowType::volType volArrowType;
360 
361  arrowMinFunction ( T border = numeric_limits < T >::max ( ) ):borderValue ( border ), MorphImageFunctionBase < T, arrowT > ( )
362  {
363  }
364 
365  virtual RES_T _exec ( const imageInType & in,
366  imageArrowType & imOut, const StrElt & se );
367  private:
368  T borderValue;
369  size_t lineLen;
370 
371  };
372 
373 template < class T, class arrowT >
374 RES_T arrowMinFunction < T, arrowT >::_exec ( const imageInType & in,
375  imageArrowType & arrow,
376  const StrElt & se )
377 {
378 
379  ASSERT_ALLOCATED ( &in, &arrow );
380  ASSERT_SAME_SIZE ( &in, &arrow );
381 
382  if ( !areAllocated ( &in, &arrow, NULL ) )
383  return RES_ERR_BAD_ALLOCATION;
384 
385  UINT sePtsNumber = se.points.size ( );
386 
387  if ( sePtsNumber == 0 )
388  return RES_OK;
389 
390  size_t nSlices = in.getSliceCount ( );
391  size_t nLines = in.getHeight ( );
392 
393  lineLen = in.getWidth ( );
394 
395  volInType srcSlices = in.getSlices ( );
396  volArrowType destSlices = arrow.getSlices ( );
397  lineInType *srcLines;
398  lineArrowType *destLines;
399 
400  bool oddSe = se.odd, oddLine = 0;
401 
402  #ifdef USE_OPEN_MP
403  #pragma omp parallel private(oddLine)
404  #endif // USE_OPEN_MP
405  {
406  T* borderBuf = ImDtTypes < T >::createLine ( lineLen );
407  T* cpBuf = ImDtTypes < T >::createLine ( lineLen );
408  T* minBuf = ImDtTypes < T >::createLine ( lineLen );
409  T* nullBuf = ImDtTypes < T >::createLine ( lineLen );
410  T* flagBuf = ImDtTypes < T >::createLine ( lineLen );
415 
416  fillLine < T > ( nullBuf, lineLen, arrowT ( 0 ) );
417  fillLine < T > ( borderBuf, lineLen, T ( borderValue ) );
418 
419  lineInType lineIn;
420  lineArrowType lineArrow;
421  size_t x, y, z;
422 
423  for ( size_t s = 0; s < nSlices; ++s )
424  {
425  srcLines = srcSlices[s];
426  destLines = destSlices[s];
427 
428  #ifdef USE_OPEN_MP
429  #pragma omp for
430  #endif // USE_OPEN_MP
431  for ( size_t l = 0; l < nLines; ++l )
432  {
433  oddLine = oddSe && l %2;
434 
435  lineIn = srcLines[l];
436  lineArrow = destLines[l];
437 
438  fillLine < arrowT > ( lineArrow, lineLen, arrowT ( 0 ) );
439  copyLine < T > ( lineIn, lineLen, minBuf );
440 
441  for ( UINT p = 0; p < sePtsNumber; ++p )
442  {
443  y = l + se.points[p].y;
444  x = -se.points[p].x - (oddLine && (y+1)%2);
445  z = s + se.points[p].z;
446 
447  _equSup.trueVal = ( 1UL << p );
448 
449 
450  if ( z >= nSlices || y >= nLines )
451  copyLine < T > ( borderBuf, lineLen, cpBuf );
452  else
453  shiftLine < T > ( srcLines[y], x, lineLen, cpBuf, borderValue );
454 
455  low._exec ( cpBuf, minBuf, lineLen, flagBuf );
456  inf._exec ( cpBuf, minBuf, lineLen, minBuf );
457  test._exec ( flagBuf, nullBuf, lineArrow, lineLen, lineArrow );
458  _equSup._exec ( cpBuf, minBuf, lineLen, lineArrow );
459 
460  }
461  }
462  }
463 
464  }
465 
466  return RES_OK;
467 }
468 
469  template < class T, class arrowT > RES_T arrowMin ( const Image < T > &im,
471  &arrow,
472  const StrElt & se,
473  T borderValue =
474  numeric_limits <
475  T >::max ( ) )
476  {
477  arrowMinFunction < T, arrowT > iFunc ( borderValue );
478  return iFunc ( im, arrow, se );
479  }
480 
481  template < class T, class arrowT = UINT8 >
483  {
484  public:
486  typedef typename parentClass::imageInType imageInType;
487  typedef typename imageInType::lineType lineInType;
488  typedef typename imageInType::lineType sliceInType;
489  typedef typename imageInType::volType volInType;
490  typedef typename parentClass::imageOutType imageArrowType;
491  typedef typename imageArrowType::lineType lineArrowType;
492  typedef typename imageArrowType::sliceType sliceArrowType;
493  typedef typename imageArrowType::volType volArrowType;
494 
495  arrowMinStepFunction ( T border = numeric_limits < T >::max ( ) ):borderValue ( border ), MorphImageFunctionBase < T, arrowT > ( )
496  {
497  borderValue = border;
498  }
499 
500  virtual RES_T _exec ( const imageInType & in,
501  imageArrowType & imOut, const StrElt & se );
502  private:
503  T borderValue;
504  size_t lineLen;
505 
506  };
507 
508  template < class T, class arrowT >
509  RES_T arrowMinStepFunction < T, arrowT >::_exec ( const imageInType & in,
510  imageArrowType & arrow,
511  const StrElt & se )
512  {
513  ASSERT_ALLOCATED ( &in, &arrow );
514  ASSERT_SAME_SIZE ( &in, &arrow );
515 
516  if ( !areAllocated ( &in, &arrow, NULL ) )
517  return RES_ERR_BAD_ALLOCATION;
518 
519  StrElt cpSe = se.noCenter ();
520 
521  UINT sePtsNumber = cpSe.points.size ( );
522 
523  if ( sePtsNumber == 0 )
524  return RES_OK;
525 
526  size_t nSlices = in.getSliceCount ( );
527  size_t nLines = in.getHeight ( );
528  lineLen = in.getWidth ( );
529 
530  volInType srcSlices = in.getSlices ( );
531  volArrowType destSlices = arrow.getSlices ( );
532  lineInType *srcLines;
533  lineArrowType *destLines;
534 
535  bool oddSe = cpSe.odd, oddLine = 0;
536 
537  #ifdef USE_OPEN_MP
538  #pragma omp parallel private(oddLine)
539  #endif // USE_OPEN_MP
540  {
541  T* borderBuf = ImDtTypes < T >::createLine ( lineLen );
542  T* cpBuf = ImDtTypes < T >::createLine ( lineLen );
543  T* minBuf = ImDtTypes < T >::createLine ( lineLen );
544  T* nullBuf = ImDtTypes < T >::createLine ( lineLen );
545  T* flagBuf = ImDtTypes < T >::createLine ( lineLen );
551 
552  fillLine < T > ( nullBuf, lineLen, arrowT ( 0 ) );
553  fillLine < T > ( borderBuf, lineLen, T ( borderValue ) );
554  equ.trueVal = 0;
555  equ.falseVal = numeric_limits < T >::max ( );
556 
557  lineInType lineIn;
558  lineArrowType lineArrow;
559  size_t x, y, z, i;
560 
561  for ( size_t s = 0; s < nSlices; ++s )
562  {
563  srcLines = srcSlices[s];
564  destLines = destSlices[s];
565 
566  #ifdef USE_OPEN_MP
567  #pragma omp for
568  #endif // USE_OPEN_MP
569  for ( size_t l = 0; l < nLines; ++l )
570  {
571  oddLine = oddSe && l %2;
572 
573  lineIn = srcLines[l];
574  lineArrow = destLines[l];
575 
576  fillLine < arrowT > ( lineArrow, lineLen, arrowT ( 0 ) );
577  copyLine < T > ( borderBuf, lineLen, minBuf );
578 
579  for ( UINT p = 0; p < sePtsNumber; ++p )
580  {
581  y = l + cpSe.points[p].y;
582  x = -cpSe.points[p].x - (oddLine && (y+1)%2);
583  z = s + cpSe.points[p].z;
584 
585  _equSup.trueVal = ( 1UL << p );
586 
587 
588  if ( z >= nSlices || y >= nLines )
589  copyLine < T > ( borderBuf, lineLen, cpBuf );
590  else
591  shiftLine < T > ( srcLines[y], x, lineLen, cpBuf, borderValue );
592 
593  for (i=0; i<lineLen; ++i)
594  flagBuf[i] = cpBuf[i] >= lineIn[i] ? 255 : 0;
595  for (i=0; i<lineLen; ++i)
596  cpBuf[i] = flagBuf[i] ? cpBuf[i] : borderBuf[i];
597 
598  low._exec ( cpBuf, minBuf, lineLen, flagBuf );
599  inf._exec ( cpBuf, minBuf, lineLen, minBuf );
600  test._exec ( flagBuf, nullBuf, lineArrow, lineLen,
601  lineArrow );
602  _equSup._exec ( cpBuf, minBuf, lineLen, lineArrow );
603 
604  }
605  }
606  }
607  }
608 
609  return RES_OK;
610  }
611 
612  template < class T > RES_T arrowMinStep ( const Image < T > &im,
614  &arrow,
615  const StrElt & se,
616  T borderValue =
617  numeric_limits <
618  T >::max ( ) )
619  {
620  arrowMinStepFunction < T, T > iFunc ( borderValue );
621  return iFunc ( im, arrow, se );
622  }
623 
624 
627 } // namespace smil
628 
629 
630 #endif // _D_MORPHO_ARROW_HPP
631 
Definition: DMorphoArrow.hpp:482
Definition: DMorphoArrow.hpp:46
Author Vincent Morard Date : 7 march 2011 See : Morard V. and Dokladal P. and Decenciere E...
Definition: DApplyThreshold.hpp:36
Definition: DMorphImageOperations.hpp:133
vector< IntPoint > points
List of neighbor points.
Definition: DStructuringElement.h:125
RES_T equ(const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
Equality operator.
Definition: DImageArith.hpp:572
Definition: DMorphoArrow.hpp:346
Definition: DMorphoArrow.hpp:313
RES_T arrow(const Image< T_in > &imIn, const char *operation, Image< T_out > &imOut, const StrElt &se=DEFAULT_SE, T_in borderValue=numeric_limits< T_in >::min())
Arrow operator.
Definition: DMorphoArrow.hpp:205
volType getSlices() const
Get an array containing the start offset of each slice.
Definition: DImage.hpp:118
size_t getHeight() const
Get image height.
Definition: DBaseImage.h:91
Definition: DBaseImageOperations.hxx:39
RES_T low(const Image< T > &imIn1, const Image< T > &imIn2, Image< T > &imOut)
Lower operator.
Definition: DImageArith.hpp:692
Base structuring element.
Definition: DStructuringElement.h:51
Base morpho operator class.
Definition: DMorphImageOperations.hpp:54
Propagation Functor on a Arrow Image.
Definition: DMorphoArrow.hpp:226
StrElt noCenter() const
Return the SE with no center.
Definition: DStructuringElement.cpp:127
size_t getWidth() const
Get image width.
Definition: DBaseImage.h:87
Definition: Base/include/private/DLineArith.hpp:262
Definition: DTypes.hpp:80
Definition: Base/include/private/DLineArith.hpp:558
Definition: Base/include/private/DLineArith.hpp:337
bool areAllocated(const BaseImage *im,...)
Check if all images in a list are allocated.
Definition: DBaseImage.h:318
Definition: Base/include/private/DLineArith.hpp:177
Definition: DBaseLineOperations.hpp:109
RES_T inf(const Image< T > &imIn1, const T &value, Image< T > &imOut)
Inf of two images.
Definition: DImageArith.hpp:538
lineType getPixels() const
Get the pixels as a 1D array.
Definition: DImage.hpp:110
RES_T test(const Image< T1 > &imIn1, const Image< T2 > &imIn2, const Image< T2 > &imIn3, Image< T2 > &imOut)
Test.
Definition: DImageArith.hpp:920
size_t getSliceCount() const
Get the number of slices(for 3D images)
Definition: DBaseImage.h:158