FILE(GLOB ${LIBRARY_NAME}_SOURCES_MANUAL_CONTOUR src/interface/wxWindows/widgets/manualContour/*.cpp )
FILE(GLOB ${LIBRARY_NAME}_HEADERS_MANUAL_PAINT "src/interface/wxWindows/widgets/manualPaint/*.h")
- FILE(GLOB ${LIBRARY_NAME}_SOURCES_MANUAL_PAINT src/interface/wxWindows/widgets/manualPaint/*.cpp )
- FILE(GLOB ${LIBRARY_NAME}_SOURCES_MANUAL_PAINT src/interface/wxWindows/widgets/manualPaint/*.cxx )
+ FILE(GLOB ${LIBRARY_NAME}_SOURCES_MANUAL_PAINT src/interface/wxWindows/widgets/manualPaint/*.cpp src/interface/wxWindows/widgets/manualPaint/*.cxx )
+ # FILE(GLOB ${LIBRARY_NAME}_SOURCES_MANUAL_PAINT src/interface/wxWindows/widgets/manualPaint/*.cxx ) #DFCH
FILE(GLOB ${LIBRARY_NAME}_HEADERS_KERNEL "src/kernel/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_KERNEL src/kernel/*.cxx src/kernel/*.cpp src/kernel/*.cc)
zz=zz*zz;
if (_brushform==0)
{
- this->CalculateMinMaxRegion(i,j,k); //DFCH
+ //this->CalculateMinMaxRegion(i,j,k); //DFCH
_image->SetScalarComponentFromFloat (i,j,k, 0, value );
} else if (_brushform==1)
{
if ((xx+yy+zz)<=rr)
{
- this->CalculateMinMaxRegion(i,j,k); //DFCH
+ //this->CalculateMinMaxRegion(i,j,k); //DFCH
_image->SetScalarComponentFromFloat (i,j,k, 0, value );
}
} // _brushform
{
if (_usingAuxImageFill==true)
{
- this->CalculateMinMaxRegion(px,py,pz); //DFCH
+ //this->CalculateMinMaxRegion(px,py,pz); //DFCH
_auxImageFill->SetScalarComponentFromFloat (px, py, pz,0, 0);
}
_tmpDistfill=(px-_pxfill)*(px-_pxfill) + (py-_pyfill)*(py-_pyfill) + (pz-_pzfill)*(pz-_pzfill);
if ( _auxGrayLevelValidationFill==true )
{
- this->CalculateMinMaxRegion(px,py,pz); //DFCH
+ //this->CalculateMinMaxRegion(px,py,pz); //DFCH
_image->SetScalarComponentFromFloat (px,py,pz, 0, (float)_graylevel );
if (_countRecursiveFill< _limitRecursionFill)
{
if ((px>=_minX) && (px<=_maxX) && (py>=_minY) && (py<=_maxY) && (pz>=_minZ) && (pz<=_maxZ))
{
- this->CalculateMinMaxRegion(px,py,pz); //DFCH
+ //this->CalculateMinMaxRegion(px,py,pz); //DFCH
_auxImageFill->SetScalarComponentFromFloat (px, py, pz,0, 1);
}
}
}
//---------------------------------------------------------------------------
-void ManualPaintControler::SetImageUndo()
+/*void ManualPaintControler::SetImageUndo()
{
_manualPaintModel->SetUndoImage();
-}
+}*/
_tool = 0; // 0 pencil , 1 fill
_brushfilter = new BrushFilter();
_fillfilter = new FillFilter();
- _imageUndoRedo = new ImageUndoRedo();
+ //_imageUndoRedo = new ImageUndoRedo();
}
//---------------------------------------------------------------------------
void ManualPaintModel::SetImage(vtkImageData *image) {
_brushfilter->SetImage(image);
_fillfilter->SetImage(image);
- _imageUndoRedo->SetImage(image);
+ //_imageUndoRedo->SetImage(image);
}
//---------------------------------------------------------------------------
_fillfilter->GetScalarRange(range);
}
//---------------------------------------------------------------------------
-void ManualPaintModel::SetUndoImage() {
+/*void ManualPaintModel::SetUndoImage() {
RegionStructUR* region = NULL;
if (_tool == 0) {
region = this->_brushfilter->GetModifiedRegion();
void ManualPaintModel::Undo() {
//this->_imageUndoRedo->Undo();
-}
+}*/
void SetRangeMin( int min );
void SetRangeMax( int max );
void GetScalarRange( double * range );
- void SetUndoImage();//DFCH
- void Undo();//DFCH
+ //void SetUndoImage();//DFCH
+ //void Undo();//DFCH
private:
int _tool;
BrushFilter *_brushfilter;
FillFilter *_fillfilter;
- ImageUndoRedo *_imageUndoRedo;
+ //ImageUndoRedo *_imageUndoRedo;
protected:
#include "baseFilterManualPaint.h"
baseFilterManualPaint::baseFilterManualPaint() {
- _MRegion = new RegionStructUR();
- CleanModifiedRegion();
+ //_MRegion = new RegionStructUR();
+ //CleanModifiedRegion();
_graylevel = 0.0;
_2D3D = 1; // 0 2D , 1 true 3D
_direction = 0; // 1 XZ , 0 YZ , 2 XY
void baseFilterManualPaint::GetScalarRange(double * range) {
range = this->_image->GetScalarRange();
}
+/*
RegionStructUR* baseFilterManualPaint::GetModifiedRegion() {
return (this->_MRegion);
} //DFCH
this->_MRegion->maxZ = k;
} //fi
}
+*/
void ResetGeneralMinMax();
void SetGeneralMinMax(int minX,int maxX,int minY,int maxY,int minZ,int maxZ);
void GetScalarRange( double * range );
- RegionStructUR* GetModifiedRegion();//DFCH
+ /* RegionStructUR* GetModifiedRegion();//DFCH
void CleanModifiedRegion();//DFCH
- void CalculateMinMaxRegion( const int& i, const int& j, const int& k);//DFCH
+ void CalculateMinMaxRegion( const int& i, const int& j, const int& k);//DFCH*/
virtual void Run();
private:
protected:
- RegionStructUR *_MRegion; //Saves the last modified region (MinX, MaxX, MinY, MaxY, MinZ, MaxZ).
+ //RegionStructUR *_MRegion; //Saves the last modified region (MinX, MaxX, MinY, MaxY, MinZ, MaxZ).
vtkImageData *_image;
int _direction;
int _px; // start point of the brush
-/*
#include "imageDequeUR.h"
ImageDequeUR::ImageDequeUR() {
- this->m_currentPos = 0;
+
}
-//virtual
ImageDequeUR::~ImageDequeUR() {
}
-//virtual
-void ImageDequeUR::addImageToContainer(ImageType* img, const RegionS& region) {
+void ImageDequeUR::AddImageToUndoContainer(ImageType* img,
+ const RegionS& region) {
+
}
-//virtual
-void ImageDequeUR::loadImageToPMemory() {
+void ImageDequeUR::AddImageToRedoContainer(ImageType* img,
+ const RegionS& region) {
+
}
-//virtual
-void ImageDequeUR::removeImageFromPMemory() {
+void ImageDequeUR::LoadUndoImageToPMemory(const unsigned int& index) {
}
-ImageType* ImageDequeUR::undo() {
- return NULL;
+void ImageDequeUR::RemoveUndoImageFromPMemory(const unsigned int& index) {
+
}
-ImageType* ImageDequeUR::redo() {
- return NULL;
+void ImageDequeUR::LoadRedoImageToPMemory(const unsigned int& index) {
+
}
-void ImageDequeUR::removeFirstImageFromContainer() {
- this->m_ImgDeque.pop_front();
+void ImageDequeUR::RemoveRedoImageFromPMemory(const unsigned int& index) {
+
}
-void ImageDequeUR::removeLastImageFromContainer() {
- this->m_ImgDeque.pop_back();
+void ImageDequeUR::SaveImageAsMHD(ImageType* img, const std::string& filename) {
+
}
-void ImageDequeUR::cleanContainer() {
- this->m_ImgDeque.clear();
+ImageInfoUR ImageDequeUR::Undo() {
+ ImageInfoUR im;
+ return im;
}
-void ImageDequeUR::cleanContainerFromIndex(const unsigned int& index) {
- for (int i = this->m_ImgDeque.size(); i >= index; i--) {
- this->m_ImgDeque.pop_back();
- }
+ImageInfoUR ImageDequeUR::Redo() {
+ ImageInfoUR im;
+ return im;
}
-*/
* Author: caceres
*/
-/*#include "managerUR.h"
+#include "managerUR.h"
-ManagerUR::ManagerUR(ImageType* current) {
+ManagerUR::ManagerUR() {
- this->m_CurrentImage = current;
- this->m_CurrentImage->Update();
- this->m_OriginalImage = ImageType::New();
- this->m_OriginalImage->ShallowCopy(m_CurrentImage);
}
-//virtual
ManagerUR::~ManagerUR() {
}
-//virtual
-void ManagerUR::undo() {
+void ManagerUR::SetImage(vtkImageData *image) {
}
-//virtual
-void ManagerUR::redo() {
+void ManagerUR::Undo() {
}
-//virtual
-void ManagerUR::setUndoImage(const RegionSType& region) {
+void ManagerUR::Redo() {
}
-//virtual
-void ManagerUR::setRedoImage( ) {
+void ManagerUR::SetUndoImage(const RegionSType& region) {
}
-void ManagerUR::setOriginalImage(ImageType* img) {
- this->m_OriginalImage = img;
-}
-void ManagerUR::setCurrentImage(ImageType* img) {
- this->m_CurrentImage = img;
+void ManagerUR::SetRedoImage(const RegionSType& region) {
+
}
-//virtual
-void ManagerUR::drawUR(ImageType* urImage, const RegionSType& region){
+void ManagerUR::DrawUR(ImageInfoUR imageInfo) {
-}*/
+}
//---------------------------------------------------------------------------
bool vtkInteractorManualPaint::OnLeftButtonUp() {
- _manualPaintControler->SetImageUndo();
+ //_manualPaintControler->SetImageUndo();
_state = false;
return true;
}
wxManualPaintPanel::wxManualPaintPanel(wxWindow * parent) :
wxPanel(parent, -1) {
-
wxPanel *panel = this;
wxSizer *sizer = NULL;
//---------------------------------------------------------------------------
void wxManualPaintPanel::OnUndo(wxCommandEvent &event) {
- this->_manualPaintModel->Undo();
+ //this->_manualPaintModel->Undo();
}
//--------------------------------------------------------------------------------------------------------------------------------