arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

SlicerWidget Class Reference

#include <SlicerWidget.h>

List of all members.


Detailed Description

SlicerWidget.h simianUI.

Definition at line 34 of file SlicerWidget.h.

Public Types

enum  AXIS_ID { X_AXIS, Y_AXIS, Z_AXIS }

Public Slots

void setVolume (VolumeSP vol)
 Set Volume.

void setAxis (int axisId)
 Set Axis.

void setSlice (int slicePos)
 Set Slice.

void setFieldOn (int fieldNum)
 Set Field ....

void setFieldOff (int fieldNum)
void setPickPos (int xp, int yp)
 Set Pick Pos.

void setVolPos (int xp, int yp, int zp)
 Set Volume Pos.

void setFilter (int f)
 Set Filter.


Signals

void volPickPosChanged (int xp, int yp, int zp)

Public Member Functions

 SlicerWidget (QWidget *parent=0, char *name=0, WFlags f=0)
 construction

virtual ~SlicerWidget ()
 destruction


Protected Member Functions

virtual void resizeEvent (QResizeEvent *re)
 Slots.

virtual void conf ()
 configure


Protected Attributes

QCanvas * _sliceCanvas
SliceView_sliceView
QSlider * _slider
QLCDNumber * _number
QComboBox * _axisCombo
NrroCanvasImg_sliceImage
int _curAxis
int _curSlice
VolumeSP _vol
NrroKernel _filter


Member Enumeration Documentation

enum SlicerWidget::AXIS_ID
 

Enumeration values:
X_AXIS 
Y_AXIS 
Z_AXIS 

Definition at line 40 of file SlicerWidget.h.


Constructor & Destructor Documentation

SlicerWidget::SlicerWidget QWidget *  parent = 0,
char *  name = 0,
WFlags  f = 0
 

construction

slice image created on the canvas!!!

Definition at line 37 of file SlicerWidget.cpp.

References _axisCombo, _sliceCanvas, _sliceImage, _sliceView, _slider, BoxKernel, conf(), and name.

SlicerWidget::~SlicerWidget  )  [virtual]
 

destruction

Definition at line 72 of file SlicerWidget.cpp.

References _axisCombo, _sliceCanvas, _sliceImage, _sliceView, and _slider.


Member Function Documentation

void SlicerWidget::conf  )  [protected, virtual]
 

configure

top widget

connect the slice view to us

bottom widget

slice slider

slice number

axis combo box

Definition at line 367 of file SlicerWidget.cpp.

References _axisCombo, _curAxis, _curSlice, _sliceView, _slider, gutz::connect(), display(), num, setAxis(), setPickPos(), setSlice(), X_AXIS, Y_AXIS, and Z_AXIS.

Referenced by SlicerWidget().

void SlicerWidget::resizeEvent QResizeEvent *  re  )  [protected, virtual]
 

Slots.

update the image

Definition at line 87 of file SlicerWidget.cpp.

References _curSlice, _sliceCanvas, and setSlice().

void SlicerWidget::setAxis int  axisId  )  [slot]
 

Set Axis.

check if we have any setup

some error checking

handle various volume configs, 3D or multi-channel 4D

set the max value of the slider to the correct axis size

update the slice to reflect new axis

figure out what to do with the new axis first update the combo box

Definition at line 117 of file SlicerWidget.cpp.

References _axisCombo, _curAxis, _curSlice, _slider, _vol, gutz::SmartPtr< Volume >::isNull(), n, setSlice(), X_AXIS, Y_AXIS, and Z_AXIS.

Referenced by conf(), SlicerMulti::confSliceView(), and setVolume().

void SlicerWidget::setFieldOff int  fieldNum  )  [slot]
 

Definition at line 243 of file SlicerWidget.cpp.

void SlicerWidget::setFieldOn int  fieldNum  )  [slot]
 

Set Field ....

Definition at line 238 of file SlicerWidget.cpp.

void SlicerWidget::setFilter int  f  )  [slot]
 

Set Filter.

Definition at line 336 of file SlicerWidget.cpp.

References _curSlice, _filter, SlicerBase::BICUBE, SlicerBase::BILIN, BoxKernel, SlicerBase::BSPLINE, BSplineKernel, CatmulRomKernel, SlicerBase::NEAREST, setSlice(), and TentKernel.

void SlicerWidget::setPickPos int  xp,
int  yp
[slot]
 

Set Pick Pos.

volume voxel positions

get the nrro

handle multi-channel volumes correctly

view space to world space

Definition at line 251 of file SlicerWidget.cpp.

References _curAxis, _curSlice, _sliceView, _vol, SliceView::getAspect(), SliceView::getHeight(), SliceView::getPos(), SliceView::getWidth(), SliceView::getZoom(), gutz::SmartPtr< Volume >::isNull(), n, gutz::vec2f, gutz::vec2f_one, volPickPosChanged(), X_AXIS, Y_AXIS, and Z_AXIS.

Referenced by conf().

void SlicerWidget::setSlice int  slicePos  )  [slot]
 

Set Slice.

no fields

respect scalar and multi-channel volumes

slice the data

size of image we need, exactly the size of the viewport

relative dimensions, min & max (0-1) base these depend on the aspect ratio and position of the viewport relative to the image

Definition at line 185 of file SlicerWidget.cpp.

References _curAxis, _curSlice, _filter, _sliceCanvas, _sliceImage, _sliceView, _slider, _vol, gutz::clamp(), SliceView::getAspect(), SliceView::getHeight(), SliceView::getPos(), SliceView::getWidth(), SliceView::getZoom(), Nrro::IMAGE, gutz::SmartPtr< Nrro >::isNull(), gutz::SmartPtr< Volume >::isNull(), reshapeNrroImageA(), NrroCanvasImg::setNrro(), gutz::vec2f, and gutz::vec2i.

Referenced by conf(), resizeEvent(), setAxis(), setFilter(), setVolPos(), and setVolume().

void SlicerWidget::setVolPos int  xp,
int  yp,
int  zp
[slot]
 

Set Volume Pos.

Definition at line 317 of file SlicerWidget.cpp.

References _curAxis, setSlice(), X_AXIS, Y_AXIS, and Z_AXIS.

void SlicerWidget::setVolume VolumeSP  vol  )  [slot]
 

Set Volume.

Definition at line 101 of file SlicerWidget.cpp.

References _curAxis, _curSlice, _vol, gutz::SmartPtr< Volume >::isNull(), setAxis(), and setSlice().

void SlicerWidget::volPickPosChanged int  xp,
int  yp,
int  zp
[signal]
 

Referenced by setPickPos().


Member Data Documentation

QComboBox* SlicerWidget::_axisCombo [protected]
 

Definition at line 70 of file SlicerWidget.h.

Referenced by conf(), setAxis(), SlicerWidget(), and ~SlicerWidget().

int SlicerWidget::_curAxis [protected]
 

Definition at line 73 of file SlicerWidget.h.

Referenced by conf(), setAxis(), setPickPos(), setSlice(), setVolPos(), and setVolume().

int SlicerWidget::_curSlice [protected]
 

Definition at line 74 of file SlicerWidget.h.

Referenced by conf(), resizeEvent(), setAxis(), setFilter(), setPickPos(), setSlice(), and setVolume().

NrroKernel SlicerWidget::_filter [protected]
 

Definition at line 78 of file SlicerWidget.h.

Referenced by setFilter(), and setSlice().

QLCDNumber* SlicerWidget::_number [protected]
 

Definition at line 69 of file SlicerWidget.h.

QCanvas* SlicerWidget::_sliceCanvas [protected]
 

Definition at line 66 of file SlicerWidget.h.

Referenced by resizeEvent(), setSlice(), SlicerWidget(), and ~SlicerWidget().

NrroCanvasImg* SlicerWidget::_sliceImage [protected]
 

Definition at line 71 of file SlicerWidget.h.

Referenced by setSlice(), SlicerWidget(), and ~SlicerWidget().

SliceView* SlicerWidget::_sliceView [protected]
 

Definition at line 67 of file SlicerWidget.h.

Referenced by conf(), setPickPos(), setSlice(), SlicerWidget(), and ~SlicerWidget().

QSlider* SlicerWidget::_slider [protected]
 

Definition at line 68 of file SlicerWidget.h.

Referenced by conf(), setAxis(), setSlice(), SlicerWidget(), and ~SlicerWidget().

VolumeSP SlicerWidget::_vol [protected]
 

Definition at line 76 of file SlicerWidget.h.

Referenced by setAxis(), setPickPos(), setSlice(), and setVolume().


The documentation for this class was generated from the following files:
Send questions, comments, and bug reports to:
jmk