Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PickedPixelMap Class Reference

This class is dedicated to manage an ImageComponent with a list of selected/picked pixels. More...

#include <PickedPixelMap.h>

Public Member Functions

void addPixel ()
 Allows to add a pixel in the list using the last picked pixel.
void changePixelIndexList (QList< QVector3D > *liste)
 Change pixel list (copy the one given in parameters)
void changePixelIndexListFromRealCoordinates (QList< QVector3D > *listeOfRealCoords)
 Change pixel list from a list of real coordinates.
QList< QVector3D > * getCoordIndexList ()
 return the list of coordinates pixel index
ImageComponentgetImage ()
 the managed ImageComponent
QList< QVector3D > * getPixelIndexList ()
 return the list of pixel index
QList< double > * getPixelValueList ()
 return the liste of pixel values
void modifyPixel (int row)
 Allows to modify one pixel in the list.
void openPixelList (QString fileName)
 open a list of pixel in a given file base name (CSV format, separator = comma).
 PickedPixelMap (ImageComponent *)
 constructor
void removePixel (int id)
 Allows to remove one pixel in the list.
void resetPixelList ()
 Empties the pixel list.
void savePixelList (QString fileName)
 save the list of pixel in a given file base name (CSV format, separator = comma).
virtual ~PickedPixelMap ()
 destructor

Private Member Functions

QVector3D convertCoordinatesToIndex (double x, double y, double z)
 conversion pixel index to coordinates
QVector3D convertIndexToCoordinates (int i, int j, int k)
 conversion pixel index to coordinates

Private Attributes

ImageComponentimage
 ImageComponent where the pixels are clicked.
QList< QVector3D > * pixelIndexList
 this is a list of pixels (as i,j,k indexes in the 3 directions)

Detailed Description

This class is dedicated to manage an ImageComponent with a list of selected/picked pixels.

This class allows to manage a generic list of pixels too (add, remove, modify and save some points).

Constructor & Destructor Documentation

PickedPixelMap::PickedPixelMap ( ImageComponent imageComp)

constructor

References image, and pixelIndexList.

PickedPixelMap::~PickedPixelMap ( )
virtual

destructor

Member Function Documentation

void PickedPixelMap::addPixel ( )

Allows to add a pixel in the list using the last picked pixel.

References camitk::ImageComponent::getLastPixelPicked(), image, and pixelIndexList.

Referenced by MultiPickingWidget::addPixelinTable().

void PickedPixelMap::changePixelIndexList ( QList< QVector3D > *  liste)

Change pixel list (copy the one given in parameters)

References pixelIndexList, and resetPixelList().

Referenced by MultiPickingWidget::manuallyModified().

void PickedPixelMap::changePixelIndexListFromRealCoordinates ( QList< QVector3D > *  listeOfRealCoords)

Change pixel list from a list of real coordinates.

References convertCoordinatesToIndex(), pixelIndexList, and resetPixelList().

Referenced by MultiPickingWidget::manuallyModified().

QVector3D PickedPixelMap::convertCoordinatesToIndex ( double  x,
double  y,
double  z 
)
private

conversion pixel index to coordinates

Parameters
x
y
z

References camitk::ImageComponent::getImageOrigin(), camitk::ImageComponent::getVoxelSize(), and image.

Referenced by changePixelIndexListFromRealCoordinates().

QVector3D PickedPixelMap::convertIndexToCoordinates ( int  i,
int  j,
int  k 
)
private

conversion pixel index to coordinates

Parameters
ithe first index pixel to retrieve x in coordinate
jthe second index pixel to retrieve y in coordinate
kthe third index pixel to retrieve z in coordinate

References camitk::ImageComponent::getImageOrigin(), camitk::ImageComponent::getVoxelSize(), and image.

Referenced by getCoordIndexList(), and savePixelList().

QList< QVector3D > * PickedPixelMap::getCoordIndexList ( )

return the list of coordinates pixel index

References convertIndexToCoordinates(), and pixelIndexList.

Referenced by MultiPickingWidget::updateTable().

ImageComponent * PickedPixelMap::getImage ( )

the managed ImageComponent

References image.

QList< QVector3D > * PickedPixelMap::getPixelIndexList ( )
QList< double > * PickedPixelMap::getPixelValueList ( )

return the liste of pixel values

References camitk::ImageComponent::getImageData(), image, and pixelIndexList.

Referenced by MultiPickingWidget::updateTable().

void PickedPixelMap::modifyPixel ( int  row)

Allows to modify one pixel in the list.

Parameters
indexthe index in the list of the pixel to modify using the last picked pixel

References camitk::ImageComponent::getLastPixelPicked(), image, and pixelIndexList.

Referenced by MultiPickingWidget::removeSeedNumber().

void PickedPixelMap::openPixelList ( QString  fileName)

open a list of pixel in a given file base name (CSV format, separator = comma).

the format is : index (int) , i (int) , j (int) , k (int) , x (double) , y (double) , z (double)

References pixelIndexList.

Referenced by MultiPickingWidget::openPixelList().

void PickedPixelMap::removePixel ( int  id)

Allows to remove one pixel in the list.

Parameters
indexthe index in the list of the pixel to remove

References pixelIndexList.

Referenced by MultiPickingWidget::removePixelFromTable(), and MultiPickingWidget::removeSeedNumber().

void PickedPixelMap::resetPixelList ( )

Empties the pixel list.

References pixelIndexList.

Referenced by changePixelIndexList(), and changePixelIndexListFromRealCoordinates().

void PickedPixelMap::savePixelList ( QString  fileName)

save the list of pixel in a given file base name (CSV format, separator = comma).

".csv" is automatically added if needed. the format is : index (int) , i (int) , j (int) , k (int) , x (double) , y (double) , z (double)

Parameters
fileNamethe location where the file will be saved

References convertIndexToCoordinates(), and pixelIndexList.

Referenced by MultiPickingWidget::savePixelList().

Member Data Documentation

ImageComponent* PickedPixelMap::image
private
QList<QVector3D>* PickedPixelMap::pixelIndexList
private

The documentation for this class was generated from the following files: