--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBG BlackBox Diagram file
+# - /home/davila/Creatis/C8/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/HelpViewerNV.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:HelpViewerNV
+PACKAGENAME:creaMaracasVisu
+COMPLEXOUTPUTS:1
+COMPLEX_PORT
+widget
+-35.421851:-72.510817:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:0
+BOXES:10
+BOX
+wx:LayoutLine:Box02
+ISEXEC:TRUE
+-38.719592:-37.691851:-900.000000
+18.840408:-47.691851:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box03
+ISEXEC:FALSE
+-84.617474:82.369571:-900.000000
+-47.842474:72.369571:-900.000000
+PORT
+In:"-Change Z&&2P&& Drag right click mouse"
+FIN_BOX
+BOX
+wx:OutputText:Box04
+ISEXEC:FALSE
+-59.479411:68.651033:-900.000000
+-22.704411:58.651033:-900.000000
+PORT
+In:"-Zoom&&2P&& Drag ctrl-right click mouse"
+FIN_BOX
+BOX
+wx:OutputText:Box05
+ISEXEC:FALSE
+-28.972162:52.915716:-900.000000
+7.802838:42.915716:-900.000000
+PORT
+In:"-Zoom&&2P&& Wheel mouse"
+FIN_BOX
+BOX
+wx:OutputText:Box06
+ISEXEC:FALSE
+-4.155228:38.876049:-900.000000
+32.619772:28.876049:-900.000000
+PORT
+In:"-Move image&&2P&& Drag shift-left click mouse"
+FIN_BOX
+BOX
+wx:OutputText:Box07
+ISEXEC:FALSE
+15.343630:19.839436:-900.000000
+52.118630:9.839436:-900.000000
+PORT
+In:"-Rotate image&&2P&& Drag ctrl-middle click mouse"
+FIN_BOX
+BOX
+wx:OutputText:Box08
+ISEXEC:FALSE
+40.481693:6.120898:-900.000000
+77.256693:-3.879102:-900.000000
+PORT
+In:"-Picker (position, gray level)&&2P&& Mouse move"
+FIN_BOX
+BOX
+wx:OutputText:Box09
+ISEXEC:FALSE
+70.988942:-9.614420:-900.000000
+107.763942:-19.614420:-900.000000
+PORT
+In:"-Move axes&&2P&& Drag the axes with click mouse left"
+FIN_BOX
+BOX
+wx:OutputText:Box10
+ISEXEC:FALSE
+95.805876:-23.654087:-900.000000
+132.580876:-33.654087:-900.000000
+PORT
+In:"-Choose a point&&2P&& Double click "
+FIN_BOX
+BOX
+wx:OutputText:Box11
+ISEXEC:FALSE
+-103.204056:98.464914:-900.000000
+-66.429056:88.464914:-900.000000
+PORT
+In:"-Brightness / Contrast&&2P&& Drag middle click mouse "
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+Box11:Widget:Box02:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box03:Widget:Box02:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box02:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box02:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box06:Widget:Box02:Widget5
+NumberOfControlPoints:0
+CONNECTION
+Box07:Widget:Box02:Widget6
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:Box02:Widget7
+NumberOfControlPoints:0
+CONNECTION
+Box09:Widget:Box02:Widget8
+NumberOfControlPoints:0
+CONNECTION
+Box10:Widget:Box02:Widget9
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:widget:widget
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
+# - /home/davila/Creatis/C8/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/HelpViewerNV.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include wx
+
+define HelpViewerNV creaMaracasVisu
+
+author "Author ??"
+description "Description ??"
+
+category "<VOID>"
+
+new wx:LayoutLine Box02
+
+new wx:OutputText Box03
+ set Box03.In "-Change Z: Drag right click mouse"
+
+new wx:OutputText Box04
+ set Box04.In "-Zoom: Drag ctrl-right click mouse"
+
+new wx:OutputText Box05
+ set Box05.In "-Zoom: Wheel mouse"
+
+new wx:OutputText Box06
+ set Box06.In "-Move image: Drag shift-left click mouse"
+
+new wx:OutputText Box07
+ set Box07.In "-Rotate image: Drag ctrl-middle click mouse"
+
+new wx:OutputText Box08
+ set Box08.In "-Picker (position, gray level): Mouse move"
+
+new wx:OutputText Box09
+ set Box09.In "-Move axes: Drag the axes with click mouse left"
+
+new wx:OutputText Box10
+ set Box10.In "-Choose a point: Double click "
+
+new wx:OutputText Box11
+ set Box11.In "-Brightness / Contrast: Drag middle click mouse "
+
+
+connect Box11.Widget Box02.Widget1
+connect Box03.Widget Box02.Widget2
+connect Box04.Widget Box02.Widget3
+connect Box05.Widget Box02.Widget4
+connect Box06.Widget Box02.Widget5
+connect Box07.Widget Box02.Widget6
+connect Box08.Widget Box02.Widget7
+connect Box09.Widget Box02.Widget8
+connect Box10.Widget Box02.Widget9
+
+# Complex input ports
+
+# Complex output ports
+output widget Box02.Widget " "
+
+exec Box02
+
+endefine
}
+void ManualContourModel_Box::ClockwisePoints( std::vector<double> *lstInX,
+ std::vector<double> *lstInY,
+ std::vector<double> *lstInZ,
+ std::vector<int> *lstIndexsIn )
+{
+ int iLstIndexIn,sizeLstIndexIn=lstIndexsIn->size();
+ int i,iGeneral=0;
+ int size,size2;
+ double cx,cy,cz;
+ double px,py,pz;
+ double backpx,backpy,backpz;
+ double ang;
+ char dir=-1;
+ bool dirx,diry,dirz;
+ int flagAng=0;
+ float backang;
+ double tmp;
+
+ // For each contour
+ for (iLstIndexIn=0; iLstIndexIn<sizeLstIndexIn; iLstIndexIn++)
+ {
+ // Step 1. Find gravity center and direction
+ size = (*lstIndexsIn)[iLstIndexIn];
+ if (size>2) // for contour with more than 2 points
+ {
+ cx = 0;
+ cy = 0;
+ cz = 0;
+ dirx = true;
+ diry = true;
+ dirz = true;
+ for ( i=0 ; i<size ; i++ )
+ {
+ px=(*lstInX)[iGeneral+i];
+ py=(*lstInY)[iGeneral+i];
+ pz=(*lstInZ)[iGeneral+i];
+ cx = px + cx;
+ cy = py + cy;
+ cz = pz + cz;
+ if (i!=0)
+ {
+ if (backpx!=px) { dirx=false; }
+ if (backpy!=py) { diry=false; }
+ if (backpz!=pz) { dirz=false; }
+ backpx=px;
+ backpy=py;
+ backpz=pz;
+ } // if i!=0
+ backpx=px;
+ backpy=py;
+ backpz=pz;
+ } // for i
+ cx=cx/size;
+ cy=cy/size;
+ cz=cz/size;
+ if (dirx==true) { dir=1; } // YZ
+ if (diry==true) { dir=2; } // XZ
+ if (dirz==true) { dir=0; } // XZ
+ // Step 2. Find angle diference find
+ flagAng=0;
+ for ( i=0 ; i<size ; i++ )
+ {
+ px = (*lstInX)[iGeneral+i]-cx;
+ py = (*lstInY)[iGeneral+i]-cy;
+ pz = (*lstInZ)[iGeneral+i]-cz;
+ if (dir==0) { ang=atan2( py , px ); } // XY
+ if (dir==1) { ang=atan2( pz , py ); } // YZ
+ if (dir==2) { ang=atan2( pz , px ); } // XZ
+ if (i>0)
+ {
+ if (backang<ang)
+ {
+ flagAng++;
+ } else {
+ flagAng--;
+ }// if backang<ang
+ } // if i
+ backang=ang;
+ } // for i
+
+ // Step 3. Invert order of points
+ if (flagAng<0)
+ {
+ size2 = size/2;
+ for ( i=0 ; i<size2 ; i++ )
+ {
+ tmp = (*lstInX)[iGeneral+i];
+ (*lstInX)[iGeneral+i] = (*lstInX)[iGeneral+size-1-i];
+ (*lstInX)[iGeneral+size-1-i] = tmp;
+ tmp = (*lstInY)[iGeneral+i];
+ (*lstInY)[iGeneral+i] = (*lstInY)[iGeneral+size-1-i];
+ (*lstInY)[iGeneral+size-1-i] = tmp;
+ tmp = (*lstInZ)[iGeneral+i];
+ (*lstInZ)[iGeneral+i] = (*lstInZ)[iGeneral+size-1-i];
+ (*lstInZ)[iGeneral+size-1-i] = tmp;
+ } // for i
+ } // flagAng
+ } // size>2
+ iGeneral = iGeneral+size;
+ } // for iLstIndexIn
+}
void ManualContourModel_Box::ShiftValues( std::vector<double> *lstInX,
std::vector<double> *lstInY,
}
if (bbGetInputDoubleContour()==1)
{
+ ClockwisePoints( &lstInX , &lstInY , &lstInZ , &lstIndexsIn );
ShiftValues( &lstInX , &lstInY , &lstInZ , &lstIndexsIn );
} // DoubleContour
int i,size=lstIndexsIn.size();
void Process();
+void ClockwisePoints( std::vector<double> *lstInX,
+ std::vector<double> *lstInY,
+ std::vector<double> *lstOuZ,
+ std::vector<int> *lstIndexsIn );
+
void ShiftValues( std::vector<double> *lstInX,
std::vector<double> *lstInY,
std::vector<double> *lstOuZ,
#include "imageInfoUR.h"
// ----------------------------------------------------------------------------------
-ImageInfoUR::ImageInfoUR() {
+ImageInfoUR::ImageInfoUR()
+{
this->m_OnMemory = false;
this->m_OnDisk = false;
}
// ----------------------------------------------------------------------------------
-ImageInfoUR::~ImageInfoUR() {
+ImageInfoUR::~ImageInfoUR()
+{
}
// ----------------------------------------------------------------------------------
-void ImageInfoUR::SetImageName(const StringType &imgName) {
+void ImageInfoUR::SetImageName(const StringType &imgName)
+{
this->m_ImageName = imgName;
}
// ----------------------------------------------------------------------------------
-void ImageInfoUR::SetImageMManager(ImageMManagerType* imMManager) {
+void ImageInfoUR::SetImageMManager(ImageMManagerType* imMManager)
+{
this->m_ImageMManager = imMManager;
}
// ----------------------------------------------------------------------------------
-void ImageInfoUR::SetStatus(const bool& onMemory) {
+void ImageInfoUR::SetStatus(const bool& onMemory)
+{
this->m_OnMemory = onMemory;
}
// ----------------------------------------------------------------------------------
-ImageInfoUR::StringType ImageInfoUR::GetImageName() {
+ImageInfoUR::StringType ImageInfoUR::GetImageName()
+{
return (this->m_ImageName);
}
// ----------------------------------------------------------------------------------
-ImageInfoUR::VTKImageDataPointerType ImageInfoUR::GetUndoImage() {
+ImageInfoUR::VTKImageDataPointerType ImageInfoUR::GetUndoImage()
+{
return (this->m_UndoImage);
}
// ----------------------------------------------------------------------------------
-ImageInfoUR::VTKImageDataPointerType ImageInfoUR::GetRedoImage() {
+ImageInfoUR::VTKImageDataPointerType ImageInfoUR::GetRedoImage()
+{
return (this->m_RedoImage);
}
// ----------------------------------------------------------------------------------
-ImageInfoUR::ImageMManagerType* ImageInfoUR::GetImageMManager() {
+ImageInfoUR::ImageMManagerType* ImageInfoUR::GetImageMManager()
+{
return (this->m_ImageMManager);
}
// ----------------------------------------------------------------------------------
-bool ImageInfoUR::GetStatus() {
+bool ImageInfoUR::GetStatus()
+{
return (this->m_OnMemory);
}
// ----------------------------------------------------------------------------------
-void ImageInfoUR::SetImages(VTKImageDataPointerType imgUndo,
- VTKImageDataPointerType imgRedo) {
+void ImageInfoUR::SetImages(VTKImageDataPointerType imgUndo, VTKImageDataPointerType imgRedo)
+{
this->m_UndoImage = imgUndo;
this->m_RedoImage = imgRedo;
this->SetStatus(true);
}
// ----------------------------------------------------------------------------------
-void ImageInfoUR::LoadImagesToMemory(const StringType& gPath) {
+void ImageInfoUR::LoadImagesToMemory(const StringType& gPath)
+{
//setting paths
StringType filename = gPath + this->m_ImageName;
StringType undoImagePath = filename + "_Undo.mhd";
StringType redoImagePath = filename + "_Redo.mhd";
//Loading Undo Image
- VTKMetaImageReaderPointerType readerUndo =
- VTKMetaImageReaderPointerType::New();
+ VTKMetaImageReaderPointerType readerUndo = VTKMetaImageReaderPointerType::New();
readerUndo->SetFileName(undoImagePath.c_str());
this->m_UndoImage = readerUndo->GetOutput();
//EED 2017-01-01 Migration VTK7
// ..
#endif
//Loading Redo Image
- VTKMetaImageReaderPointerType readerRedo =
- VTKMetaImageReaderPointerType::New();
+ VTKMetaImageReaderPointerType readerRedo = VTKMetaImageReaderPointerType::New();
readerRedo->SetFileName(redoImagePath.c_str());
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
this->m_OnMemory = true;
}
// ----------------------------------------------------------------------------------
-void ImageInfoUR::RemoveImagesFromMemory(const StringType& gPath) {
- if (!this->m_OnDisk) {
+void ImageInfoUR::RemoveImagesFromMemory(const StringType& gPath)
+{
+ if (!this->m_OnDisk)
+ {
this->SaveImagesOnDisk(gPath);
}
this->m_UndoImage = NULL;
this->SetStatus(false);
}
// ----------------------------------------------------------------------------------
-void ImageInfoUR::SaveImagesOnDisk(const StringType& gPath) {
+void ImageInfoUR::SaveImagesOnDisk(const StringType& gPath)
+{
+ printf("EED ImageInfoUR::SaveImagesOnDisk Start \n");
this->m_OnDisk = true;
StringType filename = gPath + this->m_ImageName;
StringType undoImagePath = filename + "_Undo.mhd";
StringType redoImagePath = filename + "_Redo.mhd";
this->SaveImageAsMHD(undoImagePath, this->m_UndoImage);
this->SaveImageAsMHD(redoImagePath, this->m_RedoImage);
+ printf("EED ImageInfoUR::SaveImagesOnDisk %s \n", undoImagePath.c_str() );
}
// ----------------------------------------------------------------------------------
-void ImageInfoUR::RemoveImagesFromDisk(const StringType& gPath) {
+void ImageInfoUR::RemoveImagesFromDisk(const StringType& gPath)
+{
StringType filename = gPath + this->m_ImageName;
StringType undoImagePathMHD = filename + "_Undo.mhd";
StringType redoImagePathMHD = filename + "_Redo.mhd";
remove(redoImagePathRAW.c_str());
}
// ----------------------------------------------------------------------------------
-void ImageInfoUR::SaveImageAsMHD(const StringType& filename,
- VTKImageDataPointerType image) {
+void ImageInfoUR::SaveImageAsMHD(const StringType& filename, VTKImageDataPointerType image)
+{
VTKMetaImageWriterPointerType w = VTKMetaImageWriterPointerType::New();
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
#include "imageModificationManager.h"
// ----------------------------------------------------------------------------------
-ImageMManager::ImageMManager() {
-
+ImageMManager::ImageMManager()
+{
}
// ----------------------------------------------------------------------------------
-ImageMManager::ImageMManager(ImageMManager* manager) {
+ImageMManager::ImageMManager(ImageMManager* manager)
+{
this->m_RegionStruct = manager->GetModifiedRegion();
}
// ----------------------------------------------------------------------------------
-ImageMManager::~ImageMManager() {
-
+ImageMManager::~ImageMManager()
+{
}
// ----------------------------------------------------------------------------------
-void ImageMManager::CleanModifiedRegion() {
-
+void ImageMManager::CleanModifiedRegion()
+{
int min = std::numeric_limits<int>::min();
int max = std::numeric_limits<int>::max();
this->m_RegionStruct.minX = max;
this->m_ValidRegion = false;
}
// ----------------------------------------------------------------------------------
-void ImageMManager::CalculateMinMaxRegion(const int& i, const int& j,
- const int& k) {
- if (i >= 0 && j >= 0 && k >= 0) {
- if (i <= this->m_RegionStruct.minX) {
+void ImageMManager::CalculateMinMaxRegion(const int& i, const int& j, const int& k)
+{
+ if (i >= 0 && j >= 0 && k >= 0)
+ {
+ if (i <= this->m_RegionStruct.minX)
+ {
this->m_RegionStruct.minX = i;
} //fi
- if (i > this->m_RegionStruct.maxX) {
+ if (i > this->m_RegionStruct.maxX)
+ {
this->m_RegionStruct.maxX = i;
} //esle
- if (j <= this->m_RegionStruct.minY) {
+ if (j <= this->m_RegionStruct.minY)
+ {
this->m_RegionStruct.minY = j;
} //fi
- if (j > this->m_RegionStruct.maxY) {
+ if (j > this->m_RegionStruct.maxY)
+ {
this->m_RegionStruct.maxY = j;
} //esle
- if (k <= this->m_RegionStruct.minZ) {
+ if (k <= this->m_RegionStruct.minZ)
+ {
this->m_RegionStruct.minZ = k;
} //fi
- if (k > this->m_RegionStruct.maxZ) {
+ if (k > this->m_RegionStruct.maxZ)
+ {
this->m_RegionStruct.maxZ = k;
} //esle
this->m_ValidRegion = true;
- } //fi
- else {
+ }else {
this->m_ValidRegion = false;
- } //esle
+ } // if i j k
+
+ if (m_ValidRegion ) printf(" ImageMManager::CalculateMinMaxRegion true \n");
+ if (!m_ValidRegion ) printf(" ImageMManager::CalculateMinMaxRegion false \n");
}
+
// ----------------------------------------------------------------------------------
-void ImageMManager::AddModifiedPixel(const int& i, const int& j, const int& k) {
+void ImageMManager::AddModifiedPixel(const int& i, const int& j, const int& k)
+{
+printf("EED ImageMManager::AddModifiedPixel \n");
this->CalculateMinMaxRegion(i, j, k);
}
// ----------------------------------------------------------------------------------
-bool ImageMManager::ValidateRegion() {
+bool ImageMManager::ValidateRegion()
+{
return (m_ValidRegion);
}
// ----------------------------------------------------------------------------------
-RegionStructUR ImageMManager::GetModifiedRegion() {
+RegionStructUR ImageMManager::GetModifiedRegion()
+{
return (this->m_RegionStruct);
}
// ----------------------------------------------------------------------------------
if( newImageManager->ValidateRegion( ) )
{
RegionSType region = newImageManager->GetModifiedRegion( );
- VTKImageDataPointerType imgUndo = this->GetImageRegion( region,
- this->m_UndoImage );
- VTKImageDataPointerType imgRedo = this->GetImageRegion( region,
- this->m_CurrentImage );
- this->m_ImagesDeque->AddImagesToURContainer( imgUndo, imgRedo,
- newImageManager );
+ VTKImageDataPointerType imgUndo = this->GetImageRegion( region,this->m_UndoImage );
+ VTKImageDataPointerType imgRedo = this->GetImageRegion( region,this->m_CurrentImage );
+ this->m_ImagesDeque->AddImagesToURContainer( imgUndo, imgRedo,newImageManager );
this->UpdateUndoImage( );
- }
- else
- {
+ } else {
std::cerr << "INVALID REGION" << std::endl;
}
}
if( undo )
{
img = imageInfo->GetUndoImage( );
- } //fi
- else
- {
+ } else {
img = imageInfo->GetRedoImage( );
} //else
RegionSType region = imageInfo->GetImageMManager( )->GetModifiedRegion( );
for( int k = region.minZ, z = 0; k <= region.maxZ; k++, z++ )
{
void* ptrsrc = img->GetScalarPointer( 0, y, z );
- void* ptrdest = this->m_CurrentImage->GetScalarPointer(
- region.minX, j, k );
+ void* ptrdest = this->m_CurrentImage->GetScalarPointer( region.minX, j, k );
memcpy( ptrdest, ptrsrc, linesize );
- }
- }
+ } // for k
+ } // for j
this->m_CurrentImage->Modified( );
- }
+ } // if img
this->m_ImagesDeque->ManageMemory( );
}
// ----------------------------------------------------------------------------------
virtual manualContourModel * Clone();
void CopyAttributesTo( manualContourModel *cloneObject );
- void Open(FILE *ff); // virtual
- virtual void Save(FILE *ff); // virtual
+ void Open(FILE *ff); // virtual
+ virtual void Save(FILE *ff); // virtual
virtual int GetTypeModel(); // virtual
virtual int AddPoint(double x,double y,double z);
{ // inside the boundaring box
if ( ShowLineVersion()==true )
{
- manualPoint *mpA = _manContModel->GetManualPoint(0);
- manualPoint *mpB = _manContModel->GetManualPoint(1);
_pts->GetPoint(0, ppA);
+ _pts->GetPoint(1, ppB);
double dirVec[3];
// direction of the segment
- dirVec[0] = mpB->GetX() - mpA->GetX();
- dirVec[1] = mpB->GetY() - mpA->GetY();
- dirVec[2] = mpB->GetZ() - mpA->GetZ();
+ dirVec[0] = ppB[0] - ppA[0];
+ dirVec[1] = ppB[1] - ppA[1];
+ dirVec[2] = ppB[2] - ppA[2];
// proj = mpA + k*dirVec
double num;
double den = 0.0 ;
- num = dirVec[0]*( xx-mpA->GetX() );
- num = num + dirVec[1]*( yy-mpA->GetY() );
- num = num + dirVec[2]*( zz-mpA->GetZ() );
+
+ num = dirVec[0]*( xx-ppA[0] );
+ num = num + dirVec[1]*( yy-ppA[1] );
+ num = num + dirVec[2]*( zz-ppA[2] );
+
den=dirVec[0]*dirVec[0] + dirVec[1]*dirVec[1] + dirVec[2]*dirVec[2];
double k;
if (den!=0)
k = 99999999;
}
// projection of th point xx,yy,zz in segment mpA,mpB
- double projX = mpA->GetX() + k*dirVec[0];
- double projY = mpA->GetY() + k*dirVec[1];
- double projZ = mpA->GetZ() + k*dirVec[2];
+ double projX = ppA[0] + k*dirVec[0];
+ double projY = ppA[1] + k*dirVec[1];
+ double projZ = ppA[2] + k*dirVec[2];
+
// distance [projX,projY,projZ] and (xx,yy,zz]
double d1= sqrt( (projX-xx)*(projX-xx) + (projY-yy)*(projY-yy) +(projZ-zz)*(projZ-zz) );
#include "BrushFilter.h"
-BrushFilter::BrushFilter() {
+BrushFilter::BrushFilter()
+{
_brushsize = 1;
_brushform = 0; // 0 rectangle-cube , 1 circle-sphere
_brushtool = 0; // 0 pencil , 1 fill
//---------------------------------------------------------------------------
void BrushFilter::FindMinMaxBrush(int &minX, int &maxX, int &minY, int &maxY,
- int &minZ, int &maxZ, int &size) {
+ int &minZ, int &maxZ, int &size)
+{
size = _brushsize - 1;
minX = _px - size;
maxX = _px + size;
void FindMinMaxBrush(int &minxX,int &maxX,int &minY,int &maxY,int &minZ,int &maxZ,int &size);
virtual void Run();
-
private:
int _brushsize;
int _brushform;
int _brushtool;
-
protected:
};
DEF_POINTER_IMAGE_VTK_CREA_set(v_image2,ss_image2,p_image2,st_image2,_image2)
} // if _image2
*/
-
// _usingAuxImageFill = false;
ivi = _px + _py*(_maxX+1) + _pz*(_maxX+1)*(_maxY+1); // index vector image
-
FillToolLoop(_px, _py, _pz, ivi);
} //if _minX _maxX _minY _maxY _minZ _maxZ
}
-
-
-
//---------------------------------------------------------------------------
void FillFilter::FillToolLoop(int px, int py, int pz,long int iviA)
{
lstZ.push_back(pz);
lstivi.push_back( iviA );
-
DEF_POINTER_IMAGE_VTK_CREA_set(v_image,ss_image,p_image,st_image,_image)
if (_image2!=NULL)
{
DEF_POINTER_IMAGE_VTK_CREA_set(v_image2,ss_image2,p_image2,st_image2,_image2)
} // if _image2
-
-
-
DEF_POINTER_IMAGE_VTK_CREA(v_auxImageFill,ss_auxImageFill,p_auxImageFill,st_auxImageFill,_auxImageFill)
while ( lstX.size()!=0 )
{
//---------------------------------------------------------------------------
void ManualPaintModel::SetUndoImage()
{
+ printf("EED ManualPaintModel::SetUndoImage \n");
ImageMManager* imMManager = NULL;
if (_tool == 0)
{
void ManualPaintModel::Undo()
{
+ printf("EED ManualPaintModel::Undo \n");
this->_imageUndoRedo->Undo();
}
//---------------------------------------------------------------------------
bool vtkInteractorManualPaint::OnChar()
{
+printf("EED vtkInteractorManualPaint::OnChar \n");
vtkRenderWindowInteractor *interactor = _vtkInteractorStyleBaseView->GetInteractor();
if (interactor->GetKeyCode() == 97)
{
//---------------------------------------------------------------------------
bool vtkInteractorManualPaint::OnLeftButtonDown()
{
- vtkRenderWindowInteractor *interactor =
- _vtkInteractorStyleBaseView->GetInteractor();
+ vtkRenderWindowInteractor *interactor = _vtkInteractorStyleBaseView->GetInteractor();
if (interactor->GetControlKey() == 1) {
_state = true;
// wxVtk2DBaseView *wxvtk2Dbaseview = (wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
//---------------------------------------------------------------------------
bool vtkInteractorManualPaint::OnLeftButtonUp()
{
+printf("EED vtkInteractorManualPaint::OnLeftButtonUp \n");
if((_state == true) || (_stateKey == true))
{
_manualPaintControler->SetImageUndo();