BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImageChangeInformation,bbtk::AtomicBlackBox);
BBTK_NAME("ImageChangeInformation");
BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
-BBTK_DESCRIPTION("vtkImageData change information. Translate extern to 0,0,0");
+BBTK_DESCRIPTION("(C++,JavaScript) vtkImageData change information. Translate extern to 0,0,0");
BBTK_CATEGORY("filter");
BBTK_INPUT(ImageChangeInformation,In,"Input image",vtkImageData*,"");
BBTK_INPUT(ImageChangeInformation,NewSpacing,"New spacing of the image. 3 elements (default: the same spacing of the original image)", std::vector<double> ,"");
BBTK_BEGIN_DESCRIBE_BLACK_BOX(ViewerNV,bbtk::WxBlackBox);
BBTK_NAME("ViewerNV");
BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
-BBTK_DESCRIPTION("(C++,Python) Viewer : N view configuration 2D and 3D");
+BBTK_DESCRIPTION("(C++,Python,JavaScript) Viewer : N view configuration 2D and 3D");
BBTK_CATEGORY("viewer");
BBTK_INPUT(ViewerNV,Title,"Title prepended to the text",std::string,"");
BBTK_INPUT(ViewerNV,In,"Input image",vtkImageData*,"");
}
}
-void CutModelData::createActor(){
-
- _Mapper = vtkPolyDataMapper::New();
+void CutModelData::createActor()
+{
+ _Mapper = vtkPolyDataMapper::New();
_Actor = vtkActor::New();
_Actor->SetMapper(_Mapper);
_Actor->GetProperty()->SetColor(1, 0, 0);
void CutModelData::createShapes()
{
- _cubefigure = new CutModelFigureCube();
+ _cubefigure = new CutModelFigureCube();
_cylinderfigure = new CutModelFigureCylinder();
- _spherefigure = new CutModelFigureSphere();
+ _spherefigure = new CutModelFigureSphere();
}
// EED 2022-08-04 throw
copyimage->GetExtent(ext);
for (xx=ext[0];xx<=ext[1]; xx++)
{
- for (yy=ext[2];yy<=ext[3]; yy++)
+ for (yy=ext[2];yy<=ext[3]; yy++)
{
- for (zz=ext[4];zz<=ext[5];zz++)
+ for (zz=ext[4];zz<=ext[5];zz++)
{
inside=actualCuttingModel->IfPointInside(xx,yy,zz);
if ( ((inside==true)&&(isinside==true)) || ((!inside==true)&&(!isinside)) )
{
pOrg=(unsigned short*)copyimage->GetScalarPointer (xx,yy,zz);
-
//std::cout<<"xx,yy,zz "<<xx<<","<<yy<<","<<zz<<" "<<*pOrg<<std::endl;
if ((unsigned short)minvalue <=(*pOrg)&&(*pOrg)<=(unsigned short)maxvalue)
- {
-
+ {
*pOrg=(unsigned short)value;
-
}
} // if inside
} // for zz
=========================================================================*/
-
-
-
#ifndef __CutModelDataH__
#define __CutModelDataH__
void ExecuteUnCut( bool isinside, vtkImageData* image, vtkImageData* copyimage)throw( CutModelException);
void setTransform(vtkTransform* transform,vtkImageData* img)throw( CutModelException);
*/
- void changeOpacity(int opacity);
- void ShowViewBox(bool check);
- void ChangeShape(int selection);
- vtkActor* getActor();
- vtkPolyData* getPolyData();
- void changeColor(double r,double g,double b);
- void udapteActorDirection();
- void ExecuteCut( double* range, bool isinside, vtkImageData* copyimage);
- void ExecuteUnCut( bool isinside, vtkImageData* image, vtkImageData* copyimage);
- void setTransform(vtkTransform* transform,vtkImageData* img);
+ void changeOpacity(int opacity);
+ void ShowViewBox(bool check);
+ void ChangeShape(int selection);
+ vtkActor* getActor();
+ vtkPolyData* getPolyData();
+ void changeColor(double r,double g,double b);
+ void udapteActorDirection();
+ void ExecuteCut( double* range, bool isinside, vtkImageData* copyimage);
+ void ExecuteUnCut( bool isinside, vtkImageData* image, vtkImageData* copyimage);
+ void setTransform(vtkTransform* transform,vtkImageData* img);
- void RefreshViewBox();
- vtkTransform* getCurrentMatrix(){
- return currentmatrix;
- }
- int getCurrentShape(){
- return _currentshape;
- }
- void setCurrentShape(int currentshape){
- _currentshape = currentshape;
- }
-private:
+ void RefreshViewBox();
+ vtkTransform* getCurrentMatrix(){ return currentmatrix; }
+ int getCurrentShape() { return _currentshape;}
+ void setCurrentShape(int currentshape) {_currentshape = currentshape; }
+private:
// EED 2022-08-04
// void checkInvariant()throw( CutModelException);
// void setTransform(vtkImageData* img)throw( CutModelException);
vtkTransform *currentmatrix;
vtkTransform *modeltransform;
vtkTransform *inversModel;
- CutModelFigure* getCurentCuttingModel();
- vtkTransform* getModelTransform(vtkImageData* copyimage);
- vtkTransform* getModelTransformInvers();
+ CutModelFigure* getCurentCuttingModel();
+ vtkTransform* getModelTransform(vtkImageData* copyimage);
+ vtkTransform* getModelTransformInvers();
};
#endif