Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
guiimage.cpp
Go to the documentation of this file.
1 #include "ColorChannel.hpp"
2 #include "ColorRGB.hpp"
3 #include "Histogram.hpp"
4 #include "NiftiHeader.hpp"
5 #include "Signal.hpp"
6 #include "SignalEqualize.hpp"
7 #include "gdcm.h"
8 #include "guiimage.h"
9 #include "tool.h"
10 #include <QDebug>
11 #include <QDebug>
12 #include <QPixmap>
13 #include <QRgb>
14 #include <QTime>
15 #include <QTime>
16 
17 GuiImage::GuiImage( QString fname, QObject *parent ) : QObject( parent ), image( GDCM::OpenGImage(
18  fname.toStdString( ) ) ), m_fileName(
19  fname ) {
20  qDebug( ) << "guiimage.";
21 
22  COMMENT( "GuiImage 0.", 2 );
23  transform.resize( 4 );
24  /* Bial::Image< int > bial_img( getIntImage( ) ); // Error here. Set color image. */
26  size_t dims( getDims( ) );
27  m_equalizeHistogram = false;
28  bounding.insert( 0, 4, Bial::BBox( Bial::Point3D( 0, 0, 0 ), Bial::Point3D( dim( 0 ), dim( 1 ), 1 ) ) );
29  m_currentSlice.insert( 0, 4, 0 );
30  COMMENT( "Getting maximum intensity and histogram.", 2 );
31  Bial::MultiImageType img_type( image.Type( ) );
32  switch( img_type ) {
35  m_fmax = m_max = img.Maximum( );
36  histogram = Bial::SignalType::ZeroStartHistogram( img );
37  break;
38  }
41  m_max = m_fmax = img.Maximum( );
42  histogram = Bial::SignalType::ZeroStartHistogram( img );
43  break;
44  }
47  Bial::Image< int > img( Bial::ColorSpace::ARGBtoGraybyBrightness< int >( clr_img ) );
48  histogram = Bial::SignalType::ZeroStartHistogram( img );
49  Bial::Color clr( clr_img.Maximum( ) );
50  m_fmax = m_max = std::max( clr[ 0 ], std::max( clr[ 1 ], clr[ 2 ] ) );
51  break;
52  }
54  /* Supposing HSV. Getting V channel. */
56  Bial::Image< float > img( Bial::ColorSpace::Channel< float >( rcl_img, 2 ) );
57  histogram = Bial::SignalType::ZeroStartHistogram( img );
58  Bial::RealColor rcl( rcl_img.Maximum( ) );
59  m_max = m_fmax = rcl[ 2 ];
60  break;
61  }
62  default:
63  std::string msg( BIAL_ERROR( "Accessing non-initialized multi-image." ) );
64  throw( std::runtime_error( msg ) );
65  }
66  COMMENT( "Adjusting slice to appear on canvas.", 2 );
67  if( dims == 3 ) {
68  COMMENT( "NIfTI image detected.", 2 );
69  m_modality = Modality::BW3D;
70  if( Bial::NiftiHeader::IsNiftiFile( fname.toStdString( ) ) ) {
71  {
72  COMMENT( "Generating Axial affine transform.", 2 );
73  transform[ 0 ].Rotate( 90.0, Bial::FastTransform::X ).Rotate( 90.0, Bial::FastTransform::Y );
74  transform[ 0 ].Scale( 1, -1, -1 );
75  updateBoundings( 0 );
76  }
77  {
78  COMMENT( "Generating Coronal affine transform.", 2 );
79  transform[ 1 ].Rotate( 180.0, Bial::FastTransform::Z ).Rotate( 90.0, Bial::FastTransform::Y );
80  transform[ 1 ].Scale( -1, 1, 1 );
81  updateBoundings( 1 );
82  }
83  {
84  COMMENT( "Generating Sagittal affine transform.", 2 );
85  transform[ 2 ].Rotate( 180.0, Bial::FastTransform::Z );
86  updateBoundings( 2 );
87  }
88  }
89  else {
90  {
91  COMMENT( "Generating Axial affine transform.", 2 );
92  transform[ 0 ].Rotate( 90.0, Bial::FastTransform::X ).Rotate( 90.0, Bial::FastTransform::Y );
93  updateBoundings( 0 );
94  }
95  {
96  COMMENT( "Generating Coronal affine transform.", 2 );
97  transform[ 1 ].Rotate( 90.0, Bial::FastTransform::Y );
98  updateBoundings( 1 );
99  }
100  {
101  COMMENT( "Generating Sagittal affine transform.", 2 );
102  transform[ 2 ].Rotate( 180.0, Bial::FastTransform::Z );
103  updateBoundings( 2 );
104  }
105  }
106  cachedPixmaps.resize( 3 );
107  needUpdate.insert( 0, 3, true );
108  for( int view = 0; view < m_currentSlice.size( ); ++view ) {
109  setCurrentSlice( view, depth( view ) / 2 );
110  }
111  m_currentToolPos = -1;
112  }
113  else if( ( img_type == Bial::MultiImageType::clr_img ) || ( img_type == Bial::MultiImageType::rcl_img ) ) {
114  COMMENT( "PPM image detected.", 2 );
115  m_modality = Modality::RGB2D;
116  Bial::BBox box( Bial::Point3D( 0, 0, 0 ), Bial::Point3D( dim( 0 ), dim( 1 ), 1 ) );
117  bounding[ 0 ] = box;
118  cachedPixmaps.resize( 4 );
119  needUpdate.insert( 0, 4, true );
120  }
121  else {
122  COMMENT( "Gray image detected.", 2 );
123  m_modality = Modality::BW2D;
124  Bial::BBox box( Bial::Point3D( 0, 0, 0 ), Bial::Point3D( dim( 0 ), dim( 1 ), 1 ) );
125  bounding[ 0 ] = box;
126  cachedPixmaps.resize( 1 );
127  needUpdate.push_back( true );
128  }
129  COMMENT( "Computing equalization transform.", 2 );
130  Bial::Signal levi = histogram;
131  levi[ 0 ] = 0;
132  Bial::SignalOp::Equalize( levi );
133  equalization.resize( levi.size( ) );
134  for( size_t val = 0; val < levi.size( ); ++val ) {
135  equalization[ val ] = std::round( levi[ val ] );
136  }
137  COMMENT( "Computing equalized histogram.", 2 );
138  equalized = Bial::Signal( histogram.size( ), 0.0, 1.0 );
139  for( size_t val = 0; val < equalized.size( ); ++val ) {
140  equalized[ equalization[ val ] ] = histogram[ val ];
141  }
142  COMMENT( "Image " << fileName( ).toStdString( ) << " size = (" << width( 0 ) << ", " << heigth( 0 ) << ", " <<
143  depth( 0 ) << ")", 0 );
144 }
145 
147  qDeleteAll( tools );
148 }
149 
151  if( tools.isEmpty( ) ) {
152  return( nullptr );
153  }
154  if( m_currentToolPos >= ( size_t ) tools.size( ) ) {
155  m_currentToolPos = 0;
156  }
157  return( tools.at( m_currentToolPos ) );
158 }
159 
161  return( m_modality );
162 }
163 
164 QString GuiImage::fileName( ) {
165  return( m_fileName );
166 }
167 
168 QPointF GuiImage::getIntersection( size_t view ) {
169  /* TODO: implement */
170  size_t slice = currentSlice( view );
171 // std::cout << m_currentSlice[ 0 ] << " " << m_currentSlice[ 1 ] << " " << m_currentSlice[ 2 ] << " " <<
172 // m_currentSlice[ 3 ] << std::endl;
173 }
174 
175 QPixmap GuiImage::getSlice( size_t view ) {
176  size_t slice = currentSlice( view );
177  COMMENT( "GET SLICE: image = " << m_fileName.toStdString( ) << ", axis = " << view << ", slice = " << slice, 2 );
178  if( needUpdate[ view ] ) {
179  if( slice >= depth( view ) ) {
180  throw( std::out_of_range(
181  BIAL_ERROR( QString( "Slice is out of range. Expected < %1" ).arg( depth( view ) ).toStdString( ) ) ) );
182  }
183  const size_t xsize = width( view );
184  const size_t ysize = heigth( view );
185  QImage res( xsize, ysize, QImage::Format_ARGB32 );
186  double factor = 255.0 / ( double ) m_fmax;
187  const Bial::FastTransform &transf = transform[ view ];
188  switch( image.Type( ) ) {
190  COMMENT( "Generating BW view.", 2 );
191  const Bial::Image< int > &img( getIntImage( ) );
192 #pragma omp parallel for default(none) shared(transf, img, res) firstprivate(slice, factor)
193  for( size_t y = 0; y < ysize; ++y ) {
194  QRgb *scanLine = ( QRgb* ) res.scanLine( y );
195  for( size_t x = 0; x < xsize; ++x ) {
196  int pixel = 0;
197  int xx, yy, zz;
198  transf( x, y, slice, &xx, &yy, &zz );
199  pixel = img( xx, yy, zz ); /* Pegar imagem e depois usar aqui dentro. */
200  if( m_equalizeHistogram ) {
201  pixel = equalization[ pixel ];
202  }
203  pixel *= factor;
204  scanLine[ x ] = qRgb( pixel, pixel, pixel );
205  }
206  }
207  break;
208  }
210  COMMENT( "Generating BW float view.", 2 );
211  const Bial::Image< float > &img( getFltImage( ) );
212 #pragma omp parallel for default(none) shared(transf, img, res) firstprivate(slice, factor)
213  for( size_t y = 0; y < ysize; ++y ) {
214  QRgb *scanLine = ( QRgb* ) res.scanLine( y );
215  for( size_t x = 0; x < xsize; ++x ) {
216  int pixel = 0;
217  int xx, yy, zz;
218  transf( x, y, slice, &xx, &yy, &zz );
219  pixel = static_cast< int >( img( xx, yy, zz ) );
220  if( m_equalizeHistogram ) {
221  pixel = equalization[ pixel ];
222  }
223  pixel *= factor;
224  scanLine[ x ] = qRgb( pixel, pixel, pixel );
225  }
226  }
227  break;
228  }
230  if( needUpdate[ 0 ] ) {
231  COMMENT( "Generating RGB view.", 2 );
232  const Bial::Image< Bial::Color > &img( getClrImage( ) );
233 #pragma omp parallel for default(none) shared(transf, img, res) firstprivate(slice, factor)
234  for( size_t y = 0; y < ysize; ++y ) {
235  QRgb *scanLine = ( QRgb* ) res.scanLine( y );
236  for( size_t x = 0; x < xsize; ++x ) {
237  int xx, yy, zz;
238  transf( x, y, slice, &xx, &yy, &zz );
239  size_t pos = img.Position( xx, yy );
240  int r = img[ pos ][ 1 ];
241  int g = img[ pos ][ 2 ];
242  int b = img[ pos ][ 3 ];
243  if( m_equalizeHistogram ) {
244  r = equalization[ r ];
245  g = equalization[ g ];
246  b = equalization[ b ];
247  }
248  scanLine[ x ] = qRgb( r * factor, g * factor, b * factor );
249  }
250  }
251  cachedPixmaps[ 0 ] = QPixmap::fromImage( res );
252  needUpdate[ 0 ] = false;
253  }
254  if( view > 0 ) {
255  res = cachedPixmaps[ 0 ].toImage( );
256  int r( view == 1 ), g( view == 2 ), b( view == 3 );
257  for( size_t y = 0; y < ysize; ++y ) {
258  QRgb *scanLine = ( QRgb* ) res.scanLine( y );
259  for( size_t x = 0; x < xsize; ++x ) {
260  QRgb clr = scanLine[ x ];
261  scanLine[ x ] = qRgb( qRed( clr ) * r, qGreen( clr ) * g, qBlue( clr ) * b );
262  }
263  }
264  }
265  break;
266  }
268  if( needUpdate[ 0 ] ) {
269  COMMENT( "Generating RGB view.", 2 );
271 #pragma omp parallel for default(none) shared(transf, img, res) firstprivate(slice, factor)
272  for( size_t y = 0; y < ysize; ++y ) {
273  QRgb *scanLine = ( QRgb* ) res.scanLine( y );
274  for( size_t x = 0; x < xsize; ++x ) {
275  int xx, yy, zz;
276  transf( x, y, slice, &xx, &yy, &zz );
277  size_t pos = img.Position( xx, yy );
278  int r = img[ pos ][ 1 ];
279  int g = img[ pos ][ 2 ];
280  int b = img[ pos ][ 3 ];
281  if( m_equalizeHistogram ) {
282  r = equalization[ r ];
283  g = equalization[ g ];
284  b = equalization[ b ];
285  }
286  scanLine[ x ] = qRgb( r * factor, g * factor, b * factor );
287  }
288  }
289  cachedPixmaps[ 0 ] = QPixmap::fromImage( res );
290  needUpdate[ 0 ] = false;
291  }
292  if( view > 0 ) {
293  res = cachedPixmaps[ 0 ].toImage( );
294  int r( view == 1 ), g( view == 2 ), b( view == 3 );
295  for( size_t y = 0; y < ysize; ++y ) {
296  QRgb *scanLine = ( QRgb* ) res.scanLine( y );
297  for( size_t x = 0; x < xsize; ++x ) {
298  QRgb clr = scanLine[ x ];
299  scanLine[ x ] = qRgb( qRed( clr ) * r, qGreen( clr ) * g, qBlue( clr ) * b );
300  }
301  }
302  }
303  break;
304  }
305  default:
306  std::string msg( BIAL_ERROR( "Accessing non-initialized multi-image." ) );
307  throw( std::runtime_error( msg ) );
308  }
309  if( needUpdate[ view ] ) {
310  cachedPixmaps[ view ] = QPixmap::fromImage( res );
311  needUpdate[ view ] = false;
312  }
313  /* qDebug( ) << "Elapsed: " << timer.elapsed( ); */
314  }
315  return( cachedPixmaps[ view ] );
316 }
317 
318 size_t GuiImage::width( size_t view = 0 ) {
319  return( abs( round( bounding.at( view ).pMax.x ) ) );
320 }
321 
322 size_t GuiImage::heigth( size_t view = 0 ) {
323  return( abs( round( bounding.at( view ).pMax.y ) ) );
324 }
325 
326 size_t GuiImage::depth( size_t view = 0 ) {
327  return( abs( round( bounding.at( view ).pMax.z ) ) );
328 }
329 
330 void GuiImage::setCurrentSlice( size_t view, size_t slice ) {
331  size_t sz = m_currentSlice.size( );
332  if( view < sz ) {
333  if( ( m_currentSlice[ view ] != slice ) && ( slice < depth( view ) ) ) {
334  m_currentSlice[ view ] = slice;
335  needUpdate[ view ] = true;
336  emit imageUpdated( );
337  }
338  }
339  else {
340  throw std::out_of_range( BIAL_ERROR( "Axis out of range." ) );
341  }
342 }
343 
344 Bial::Point3D GuiImage::getPosition( QPointF pos, size_t view ) {
345  Bial::Point3D point( pos.x( ), pos.y( ), ( double ) m_currentSlice[ view ] );
346  transform[ view ]( point, &point );
347  return( point );
348 }
349 
351  return( transform.at( axis ) );
352 }
353 
355  return( image.Type( ) );
356 }
357 
359  return( image.IntImage( ) );
360 }
361 
363  return( image.FltImage( ) );
364 }
365 
367  return( image.ClrImage( ) );
368 }
369 
371  return( image.RclImage( ) );
372 }
373 
374 size_t GuiImage::getDims( ) const {
375  switch( image.Type( ) ) {
377  return( getIntImage( ).Dims( ) );
379  return( getFltImage( ).Dims( ) );
381  return( getClrImage( ).Dims( ) );
383  return( getRclImage( ).Dims( ) );
384  default:
385  std::string msg( BIAL_ERROR( "Getting dimensions from non-initialized multi-image." ) );
386  throw( std::runtime_error( msg ) );
387  }
388 }
389 
391  switch( image.Type( ) ) {
393  return( getIntImage( ).Dim( ) );
395  return( getFltImage( ).Dim( ) );
397  return( getClrImage( ).Dim( ) );
399  return( getRclImage( ).Dim( ) );
400  default:
401  std::string msg( BIAL_ERROR( "Getting dimensions from non-initialized multi-image." ) );
402  throw( std::runtime_error( msg ) );
403  }
404 }
405 
406 void GuiImage::rotate90( size_t view ) {
407  Bial::FastTransform transf;
408  transf.Rotate( -90.0, Bial::FastTransform::Z );
409  transform[ view ] = transf * transform[ view ].Inverse( );
410  updateBoundings( view );
411  needUpdate[ view ] = true;
412  emit imageUpdated( );
413 }
414 
415 void GuiImage::flipH( size_t view ) {
416  Bial::FastTransform transf;
417  transf.Scale( -1, 1, 1 );
418  transform[ view ] = transf * transform[ view ].Inverse( );
419  updateBoundings( view );
420  needUpdate[ view ] = true;
421  emit imageUpdated( );
422 }
423 
424 void GuiImage::flipV( size_t view ) {
425  Bial::FastTransform transf;
426  transf.Scale( 1, -1, 1 );
427  transform[ view ] = transf * transform[ view ].Inverse( );
428  updateBoundings( view );
429  needUpdate[ view ] = true;
430  emit imageUpdated( );
431 }
432 
434  for( int axis = 0; axis < needUpdate.size( ); ++axis ) {
435  rotate90( axis );
436  }
437 }
438 
440  return( m_max );
441 }
442 
443 float GuiImage::fmax( ) {
444  return( m_fmax );
445 }
446 
447 size_t GuiImage::currentSlice( size_t view ) {
448  return( m_currentSlice[ view ] );
449 }
450 
452  return( m_equalizeHistogram );
453 }
454 
455 void GuiImage::setEqualizeHistogram( bool equalizeHistogram ) {
456  m_equalizeHistogram = equalizeHistogram;
457  for( int axis = 0; axis < needUpdate.size( ); ++axis ) {
458  needUpdate[ axis ] = true;
459  }
460  emit imageUpdated( );
461 }
462 
464  if( m_equalizeHistogram ) {
465  return( equalized );
466  }
467  return( histogram );
468 }
469 
470 int GuiImage::getPixel( int x, int y, int z ) {
471  int color = 0;
472  switch( image.Type( ) ) {
474  const Bial::Image< int > &img( getIntImage( ) );
475  if( img.Dims( ) == 2 ) {
476  if( img.ValidCoordinate( x, y ) ) {
477  color = img( x, y );
478  }
479  }
480  else {
481  if( img.ValidCoordinate( x, y, z ) ) {
482  color = img( x, y, z );
483  }
484  }
485  break;
486  }
489  if( img.Dims( ) == 2 ) {
490  if( img.ValidCoordinate( x, y ) ) {
491  color = img( x, y );
492  }
493  }
494  else {
495  if( img.ValidCoordinate( x, y, z ) ) {
496  color = img( x, y, z );
497  }
498  }
499  break;
500  }
503  if( img.ValidCoordinate( x, y ) ) {
504  color = img( x, y ) ( 0 );
505  }
506  break;
507  }
510  if( img.ValidCoordinate( x, y ) ) {
511  color = img( x, y ) ( 0 );
512  }
513  break;
514  }
515  default:
516  std::string msg( BIAL_ERROR( "Accessing non-initialized multi-image." ) );
517  throw( std::runtime_error( msg ) );
518  }
519  if( m_equalizeHistogram ) {
520  return( equalization[ color ] );
521  }
522  return( color );
523 }
524 
525 size_t GuiImage::currentToolPos( ) const {
526  return( m_currentToolPos );
527 }
528 
530  if( currentToolPos < static_cast< size_t >( tools.size( ) ) ) {
531  m_currentToolPos = currentToolPos;
532  }
533 }
534 
535 void GuiImage::updateBoundings( size_t axis ) {
536  Bial::Point3D start;
538  Bial::Point3D end( size[ 0 ] - 1, size[ 1 ] - 1, std::max( size[ 2 ] - 1, ( size_t ) 1 ) );
539  transform[ axis ]( start, &start );
540  transform[ axis ]( end, &end );
541  bounding[ axis ] = Bial::BBox( start, end );
542  transform[ axis ] = transform[ axis ].Inverse( );
543  transform[ axis ].Translate( bounding[ axis ].pMin.x, bounding[ axis ].pMin.y, bounding[ axis ].pMin.z );
544  bounding[ axis ] = bounding[ axis ].Normalized( );
545 }
bool ValidCoordinate(const Vector< size_t > &pxl) const
Verifies if a given pixel coordinate is in image domain.
int max()
max is the maximum integer intensity of the input image. Used for int and Color images.
Definition: guiimage.cpp:439
AdjacencyIterator end(const Adjacency &adj, const Vector< D > &vct, size_t pixel_index)
Returns an iterator to position after the end of elements.
Modality
Definition: displayformat.h:9
size_t Dims() const
Returns the number of dimensions of the image.
Tool * currentTool()
currentTool returns the current Tool.
Definition: guiimage.cpp:150
Definition: gdcm.h:24
virtual ~GuiImage()
Destructor.
Definition: guiimage.cpp:146
Definition: tool.h:10
const Bial::Signal & getHistogram() const
getHistogram returns the image histogram.
Definition: guiimage.cpp:463
void rotateAll90()
rotateAll90 rotates all views in 90 degrees.
Definition: guiimage.cpp:433
#define BIAL_ERROR(exp)
Use BIAL_ERROR to compose runtime error messages. Note that ERROR generates a string, instead of a stream, because it is better to throw an exception, rather than exiting the program. This way, the exception may be threated by a higher level program, like an user IDE.
Definition: Common.hpp:161
Signal handeling declaration.
Definition: Signal.hpp:20
const MultiImageType & Type() const
Returns a reference the current image type.
void flipH(size_t view)
flipH mirrors the current view on X axis.
Definition: guiimage.cpp:415
Bial::MultiImageType getImageType() const
getImageType returns image type among int, float, Color and RealColor.
Definition: guiimage.cpp:354
size_t heigth(size_t view)
heigth is the view heigth.
Definition: guiimage.cpp:322
size_t currentToolPos() const
Definition: guiimage.cpp:525
GuiImage(QString fName, QObject *parent=0)
GuiImage is the GuiImage class constructor.
Definition: guiimage.cpp:17
bool getEqualizeHistogram() const
getEqualizeHistogram returns a boolean value that says if the image must be equalized or not...
Definition: guiimage.cpp:451
The Point3D class is a Geometric representation of a point in 3D space. A point is a zero­dimension...
Definition: Geometrics.hpp:218
Bial::Point3D getPosition(QPointF pos, size_t view)
getPosition transforms the scene position to the input image coordinates.
Definition: guiimage.cpp:344
Bial::Vector< size_t > getDim() const
getDim
Definition: guiimage.cpp:390
static size_t size
Definition: enough.c:173
size_t size() const
Returns the number of bins.
Image< RealColor > & RclImage() const
Returns a reference to the RealColor image.
Image< Color > & ClrImage() const
Returns a reference to the Color image.
void Equalize(Signal &sgn)
Equalizes input signal.
Image< int > & IntImage() const
Returns a reference to the integer image.
size_t depth(size_t view)
depth is the number of slices of the view.
Definition: guiimage.cpp:326
Modality modality()
modality is the image modality getter.
Definition: guiimage.cpp:160
void setCurrentToolPos(const size_t &currentToolPos)
Definition: guiimage.cpp:529
Image< float > & FltImage() const
Returns a reference to the float image.
void flipV(size_t view)
flipV mirrors the current view on Y axis.
Definition: guiimage.cpp:424
QPixmap getSlice(size_t view)
getSlice calculates and returns a QImage with the current slice of the view.
Definition: guiimage.cpp:175
size_t width(size_t view)
width is the view width.
Definition: guiimage.cpp:318
D Maximum() const
Returns the maximum value in Image.
Content: NiftiHeader class Description: Magnetic Resonance Image class. Future add-on&#39;s: Complete...
void setCurrentSlice(size_t view, size_t slice)
currentSlice sets the view&#39;s current slice.
Definition: guiimage.cpp:330
Bial::FastTransform getTransform(size_t axis)
getTransform returns the transform matrix of the views.
Definition: guiimage.cpp:350
float fmax()
fmax is the maximum float intensity of the input image. Used for float and RealColor images...
Definition: guiimage.cpp:443
QPointF getIntersection(size_t view)
Definition: guiimage.cpp:168
FastTransform & Rotate(double degrees, int dms)
Vector< size_t > Dim() const
Returns a Vector with image dimensions.
Definition: zran.c:67
static int max
Definition: enough.c:170
Class RealColor is used to handle multi-channels in pixels with floating point values.
Definition: RealColor.hpp:22
QString fileName()
fileName is the image absolute path getter.
Definition: guiimage.cpp:164
void imageUpdated()
imageUpdated is called each time a internal property is updated, after that the image views are updat...
Bial::Image< int > & getIntImage() const
get*Image
Definition: guiimage.cpp:358
The BBox class is a Bounding Box with 8 vertices, and can be represented by 2 points (6coordinates)...
Definition: Geometrics.hpp:640
int getPixel(int x, int y, int z=0)
getPixel returns the pixel intensity of the image at the given position.
Definition: guiimage.cpp:470
void rotate90(size_t view)
rotate90 rotates a view in 90 degrees.
Definition: guiimage.cpp:406
size_t currentSlice(size_t view)
currentSlice is the view&#39;s current slice.
Definition: guiimage.cpp:447
static bool IsNiftiFile(const std::string &filename)
Returns true if given file has nifti extension.
QVector< Tool * > tools
tools is a vector containing the image tools.
Definition: guiimage.h:98
Bial::Image< Bial::Color > & getClrImage() const
Definition: guiimage.cpp:366
FastTransform & Scale(int sx, int sy, int sz=1.f)
void setEqualizeHistogram(bool equalizeHistogram)
setEqualizeHistogram updates a boolean value that says if the image must be equalized or not...
Definition: guiimage.cpp:455
Signal ZeroStartHistogram(const C< D > &data, double data_step=1.0)
Static constructor.
size_t Position(size_t p_0, size_t p_1) const
Returns the position corresponding to the input coordinates in this image.
MultiImageType
The MultiImageType class is used to identify which image type is open in MultiImage.
Definition: MultiImage.hpp:23
Bial::Image< float > & getFltImage() const
Definition: guiimage.cpp:362
Bial::Image< Bial::RealColor > & getRclImage() const
Definition: guiimage.cpp:370
size_t getDims() const
getDims
Definition: guiimage.cpp:374