# lib definition
ADD_LIBRARY(bbtk SHARED ${SOURCES} ${SOURCES_H})
#-----------------------------------------------------------------------------
-TARGET_LINK_LIBRARIES(bbtk ${BBTK_LINK_LIBRARIES})
+TARGET_LINK_LIBRARIES(bbtk ${BBTK_LINK_LIBRARIES} ${BOOST_LIBRARIES})
#-----------------------------------------------------------------------------
IF(UNIX)
SET_TARGET_PROPERTIES(bbtk PROPERTIES COMPILE_FLAGS -Wall)
Program: bbtk
Module: $RCSfile: bbtkItkBlackBoxMacros.h,v $
Language: C++
- Date: $Date: 2009/04/30 14:31:31 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2009/05/15 15:00:24 $
+ Version: $Revision: 1.6 $
=========================================================================*/
/* ---------------------------------------------------------------------
<<"]"<<std::endl); \
itkParent::Update(); \
bbtkDebugMessage("process",2,"<** Processing ["<<bbGetFullName() \
- <<"]"<<std::endl); \
- }
+ <<"]"<<std::endl); \
+ }
+
//============================================================================
//===========================================================================
SET(${BBTK_PACKAGE_NAME}_LIBS
# LIST HERE THE ADDITIONAL LIBS TO LINK AGAINST
# EXCEPT : the same libs than for INCLUDE_DIRS
-/usr/local/lib/gdcm/libvtkgdcm.so
+ vtkgdcm
)
#===========================================================================
Program: bbtk
Module: $RCSfile: bbitkBinaryThresholdImageFilter.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:21 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2009/05/15 14:57:58 $
+ Version: $Revision: 1.5 $
=========================================================================*/
/* ---------------------------------------------------------------------
bbtk::AtomicBlackBox);
BBTK_ADD_BLACK_BOX_TO_PACKAGE(itk,
BinaryThresholdImageFilterGeneric);
+
+
}
// EO namespace bbtk
Program: bbtk
Module: $RCSfile: bbitkBinaryThresholdImageFilter.h,v $
Language: C++
- Date: $Date: 2009/03/23 12:55:49 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2009/05/15 14:57:58 $
+ Version: $Revision: 1.12 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ITK_PROCESS();
BBTK_ITK_DELETE();
- void bbUserConstructor() { Init(); }
- void bbUserCopyConstructor(bbtk::BlackBox::Pointer) { Init(); }
- void Init();
};
private :
inline void ProcessSwitch();
template <class T> void Process();
- void bbUserConstructor() { Init(); }
- void bbUserCopyConstructor(bbtk::BlackBox::Pointer) { Init(); }
- void Init();
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(BinaryThresholdImageFilterGeneric,
bbtkDebugDecTab("Core",9);
}
-
- template <class T>
- void BinaryThresholdImageFilter<T>::Init()
- {
- bbSetInputLowerThreshold(0);
- bbSetInputUpperThreshold(100);
- bbSetInputInsideValue(255);
- bbSetInputOutsideValue(0);
- }
- void BinaryThresholdImageFilterGeneric::Init()
+
+////--
+// template <class T>
+// void BinaryThresholdImageFilter<T>::bbUserSetDefaultValues()
+// {
+// bbSetInputLowerThreshold(0);
+// bbSetInputUpperThreshold(100);
+// bbSetInputInsideValue(255);
+// bbSetInputOutsideValue(0);
+// }
+
+ void BinaryThresholdImageFilterGeneric::bbUserSetDefaultValues()
{
bbSetInputLowerThreshold(0);
bbSetInputUpperThreshold(100);
bbSetInputOutsideValue(0);
}
+ //--
+
+ template <class T>
+ void BinaryThresholdImageFilter<T>::bbUserInitializeProcessing()
+ {
+ }
+
+ void BinaryThresholdImageFilterGeneric::bbUserInitializeProcessing()
+ {
+ }
+
+//--
+
+ //--
+
+ template <class T>
+ void BinaryThresholdImageFilter<T>::bbUserFinalizeProcessing()
+ {
+ }
+
+ void BinaryThresholdImageFilterGeneric::bbUserFinalizeProcessing()
+ {
+ }
+
+
+
}
// EO namespace bbtk
Program: bbtk
Module: $RCSfile: bbitkExtractImageFilter.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:21 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2009/05/15 14:57:58 $
+ Version: $Revision: 1.5 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(itk,ExtractImageFilterGeneric)
+ //-----------------------------------------------------------------
+ void ExtractImageFilterGeneric::bbUserSetDefaultValues()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ExtractImageFilterGeneric::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ExtractImageFilterGeneric::bbUserFinalizeProcessing()
+ {
+ }
+
+
}
// EO namespace bbitk
Program: bbtk
Module: $RCSfile: bbitkImageProperties.cxx,v $
Language: C++
- Date: $Date: 2008/11/27 14:58:06 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2009/05/15 14:57:58 $
+ Version: $Revision: 1.8 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(itk,ImageProperties);
-
+ //-----------------------------------------------------------------
+ void ImageProperties::bbUserSetDefaultValues()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ImageProperties::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ImageProperties::bbUserFinalizeProcessing()
+ {
+ }
void ImageProperties::DoIt()
Program: bbtk
Module: $RCSfile: bbitkImageReader.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:21 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2009/05/15 14:57:58 $
+ Version: $Revision: 1.6 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(itk,ImageReader);
-
-
-
+ //-----------------------------------------------------------------
+ void ImageReader::bbUserSetDefaultValues()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ImageReader::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ImageReader::bbUserFinalizeProcessing()
+ {
+ }
+
void ImageReader::Read()
{
std::string filename = bbGetInputIn();
Program: bbtk
Module: $RCSfile: bbitkImageRegion.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:21 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2009/05/15 14:57:58 $
+ Version: $Revision: 1.5 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(itk,ImageRegionCreator);
-
+ /*
+ void ImageRegionCreator::bbUserSetDefaultValues() { }
+ void ImageRegionCreator::bbUserInitializeProcessing() { }
+ void ImageRegionCreator::bbUserFinalizeProcessing() { }
+
+ template <unsigned int Dimension>
+ void ImageRegionCreator::bbUserSetDefaultValues() { }
+
+ template <unsigned int Dimension>
+ void ImageRegionCreator::bbUserInitializeProcessing() { }
+
+ template <unsigned int Dimension>
+ void ImageRegionCreator::bbUserFinalizeProcessing() { }
+ */
+
void ImageRegionCreator::DoIt()
{
const std::vector<long>& index = bbGetInputIndex();
Program: bbtk
Module: $RCSfile: bbitkImageSeriesReader.cxx,v $
Language: C++
- Date: $Date: 2008/11/27 14:55:54 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2009/05/15 14:57:58 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(itk,ImageSeriesReader);
- void ImageSeriesReader::bbUserConstructor()
- {
- bbSetInputXSpacing(-1.);
- bbSetInputYSpacing(-1.);
- bbSetInputZSpacing(-1.);
- }
-
- void ImageSeriesReader::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
- {
- }
-
- void ImageSeriesReader::bbUserDestructor()
- {
- }
+ //-----------------------------------------------------------------
+ void ImageSeriesReader::bbUserSetDefaultValues()
+ {
+ bbSetInputXSpacing(-1.0);
+ bbSetInputYSpacing(-1.0);
+ bbSetInputZSpacing(-1.0);
+ }
+
+ //-----------------------------------------------------------------
+ void ImageSeriesReader::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ImageSeriesReader::bbUserFinalizeProcessing()
+ {
+ }
+
+
+
void ImageSeriesReader::Read()
{
const std::vector<std::string>& filenames = bbGetInputFileNames();
Program: bbtk
Module: $RCSfile: bbitkImageSeriesReader.h,v $
Language: C++
- Date: $Date: 2008/11/27 14:55:54 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2009/05/15 14:57:58 $
+ Version: $Revision: 1.11 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_BLACK_BOX_INTERFACE(ImageSeriesReader,
bbtk::AtomicBlackBox);
- //==================================================================
- /// User callback called in the box contructor
- virtual void bbUserConstructor();
- /// User callback called in the box copy constructor
- virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
- /// User callback called in the box destructor
- virtual void bbUserDestructor();
- //==================================================================
BBTK_DECLARE_INPUT(FileNames,std::vector<std::string>);
BBTK_DECLARE_INPUT(XSpacing,float);
BBTK_DECLARE_INPUT(YSpacing,float);
Program: bbtk
Module: $RCSfile: bbitkImageWriter.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:21 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2009/05/15 14:57:58 $
+ Version: $Revision: 1.5 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(itk,ImageWriter);
-
+ //-----------------------------------------------------------------
+ void ImageWriter::bbUserSetDefaultValues()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ImageWriter::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ImageWriter::bbUserFinalizeProcessing()
+ {
+ }
void ImageWriter::Write()
{
Program: bbtk
Module: $RCSfile: bbitkResampleImageFilter.h,v $
Language: C++
- Date: $Date: 2008/11/25 11:17:15 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2009/05/15 14:57:58 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
private :
inline void ProcessSwitch();
template <class T> void Process();
- void bbUserConstructor() { Init(); }
- void bbUserCopyConstructor(bbtk::BlackBox::Pointer) { Init(); }
- void Init();
itk::Object* mOutput;
};
}
- void ResampleImageFilter::Init()
- {
- std::vector<double> res;
- res.push_back(1);
- res.push_back(1);
- res.push_back(1);
- bbSetInputSpacing(res);
- mOutput = 0;
- }
+ //-----------------------------------------------------------------
+ void ResampleImageFilter::bbUserSetDefaultValues()
+ {
+ std::vector<double> res;
+ res.push_back(1);
+ res.push_back(1);
+ res.push_back(1);
+ bbSetInputSpacing(res);
+ mOutput = 0;
+ }
+
+ //-----------------------------------------------------------------
+ void ResampleImageFilter::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ResampleImageFilter::bbUserFinalizeProcessing()
+ {
+ }
+
}
// EO namespace bbtk
Program: bbtk
Module: $RCSfile: bbvtkImagePlanes.cxx,v $
Language: C++
- Date: $Date: 2009/04/30 14:31:33 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.24 $
=========================================================================*/
/* ---------------------------------------------------------------------
};
//================================================================
- //vtkCxxRevisionMacro(ImagePlanes::VtkCallbackType, "$Revision: 1.23 $");
+ //vtkCxxRevisionMacro(ImagePlanes::VtkCallbackType, "$Revision: 1.24 $");
//================================================================
BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,ImagePlanes)
BBTK_BLACK_BOX_IMPLEMENTATION(ImagePlanes,bbtk::AtomicBlackBox);
- void ImagePlanes::bbUserConstructor()
+
+
+ void ImagePlanes::bbUserSetDefaultValues()
{
bbSetOutputPlaneX(0);
bbSetOutputPlaneY(0);
mVtkCallback = 0;
}
- void ImagePlanes::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
- {
- bbSetOutputPlaneX(0);
- bbSetOutputPlaneY(0);
- bbSetOutputPlaneZ(0);
- bbSetOutputImageX(0);
- bbSetOutputImageY(0);
- bbSetOutputImageZ(0);
- mVtkCallback = 0;
- }
- void ImagePlanes::Init()
+
+ void ImagePlanes::bbUserInitializeProcessing()
{
/// CREATION DES WIDGETS
}
//---------------------------------------------------------------------
- void ImagePlanes::bbUserDestructor()
+ void ImagePlanes::bbUserFinalizeProcessing()
{
if (bbGetOutputPlaneX())
{
{
if (bbGetInputIn()!=0)
{
- // Create the widgets if not already done
- Init();
if ( bbGetInputStatus("In") != bbtk::UPTODATE )
{
bbGetOutputPlaneZ()->GetResliceOutput()->Update();
}
}
+
+
+ //-----------------------------------------------------------------
+ void vtkImageDataPointerRelay::bbUserSetDefaultValues()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void vtkImageDataPointerRelay::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void vtkImageDataPointerRelay::bbUserFinalizeProcessing()
+ {
+ }
+
+
+
}//namespace bbtk
#endif // _USE_VTK_
Program: bbtk
Module: $RCSfile: bbvtkImagePlanes.h,v $
Language: C++
- Date: $Date: 2009/04/17 09:24:02 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.15 $
=========================================================================*/
/* ---------------------------------------------------------------------
void Process();
protected:
- virtual void bbUserConstructor();
- virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
- virtual void bbUserDestructor();
- void Init();
+
private:
class VtkCallbackType;
VtkCallbackType* mVtkCallback;
Program: bbtk
Module: $RCSfile: bbvtkIsoSurfaceExtractor.cxx,v $
Language: C++
- Date: $Date: 2009/05/14 15:40:12 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.14 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,IsoSurfaceExtractor)
BBTK_BLACK_BOX_IMPLEMENTATION(IsoSurfaceExtractor,bbtk::AtomicBlackBox);
- void IsoSurfaceExtractor::bbUserConstructor()
+ void IsoSurfaceExtractor::bbUserSetDefaultValues()
{
printf("EED %p IsoSurfaceExtractor::bbUserConstructor \n", this);
- Init();
- std::vector<double> colour;
- colour.push_back(1.0);
- colour.push_back(1.0);
- colour.push_back(0.5);
- bbSetInputColour(colour);
- }
- void IsoSurfaceExtractor::bbUserCopyConstructor(bbtk::BlackBox::Pointer from)
- {
- Init();
+ firsttime=true;
+ std::vector<double> colour;
+ colour.push_back(1.0);
+ colour.push_back(1.0);
+ colour.push_back(0.5);
+ bbSetInputColour(colour);
+
+ bbSetInputIn(NULL);
+ // bbSetInputInVtkObject(NULL);
+ bbSetInputRenderer(NULL);
+ bbSetInputTransform(NULL);
+ bbSetInputIsovalue(400);
+ bbSetInputOpacity(1);
+
+ marchingcubes = NULL;
+ polydatamapper = NULL;
+ vtkactor = NULL;
}
- void IsoSurfaceExtractor::bbUserDestructor()
- {
- marchingcubes->Delete();
- polydatamapper->Delete();
- vtkactor->Delete();
- }
- void IsoSurfaceExtractor::Init()
- {
- firsttime=true;
-
- bbSetInputIn(NULL);
- // bbSetInputInVtkObject(NULL);
- bbSetInputRenderer(NULL);
- bbSetInputTransform(NULL);
- bbSetInputIsovalue(400);
- bbSetInputOpacity(1);
-
+ //---------------------------------------------------------------------
+ void IsoSurfaceExtractor::bbUserInitializeProcessing()
+ {
marchingcubes = vtkMarchingCubes::New();
polydatamapper = vtkPolyDataMapper::New();
vtkactor = vtkActor::New();
polydatamapper->ScalarVisibilityOff();
polydatamapper->ImmediateModeRenderingOn();
-}
+ }
+ //---------------------------------------------------------------------
+ void IsoSurfaceExtractor::bbUserFinalizeProcessing()
+ {
+ if (marchingcubes!=NULL)
+ {
+ marchingcubes->Delete();
+ marchingcubes=NULL;
+ }
+
+
+ if (polydatamapper!=NULL)
+ {
+ polydatamapper->Delete();
+ polydatamapper=NULL;
+ }
+
+ if (vtkactor!=NULL)
+ {
+ vtkactor->Delete();
+ vtkactor=NULL;
+ }
+
+
+
+
+ }
+
+
//---------------------------------------------------------------------
void IsoSurfaceExtractor::DoProcess()
Program: bbtk
Module: $RCSfile: bbvtkIsoSurfaceExtractor.h,v $
Language: C++
- Date: $Date: 2008/11/25 11:17:23 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.12 $
=========================================================================*/
/* ---------------------------------------------------------------------
void DoProcess();
protected:
- virtual void bbUserConstructor();
- virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
- virtual void bbUserDestructor();
- void Init();
};
BBTK_BEGIN_DESCRIBE_BLACK_BOX(IsoSurfaceExtractor,bbtk::AtomicBlackBox);
Program: bbtk
Module: $RCSfile: bbvtkMIPCreator.cxx,v $
Language: C++
- Date: $Date: 2008/11/25 11:17:23 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.6 $
=========================================================================*/
/* ---------------------------------------------------------------------
- void MIPCreator::bbUserConstructor()
+ //---------------------------------------------------------------------
+ void MIPCreator::bbUserSetDefaultValues()
{
- Init();
- bbSetInputShift(0);
- bbSetInputScale(1.);
+ bbSetInputShift(0);
+ bbSetInputScale(1.0);
+ mCast = NULL;
+ mMIP = NULL;
+ mMapper = NULL;
+ mVolume = NULL;
}
- void MIPCreator::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
- {
- Init();
- }
-
- void MIPCreator::Init()
- {
-
+
+ //---------------------------------------------------------------------
+ void MIPCreator::bbUserInitializeProcessing()
+ {
+
// Create the pipeline
mCast = vtkImageShiftScale::New();
mCast->SetOutputScalarTypeToUnsignedChar();
bbSetOutputOut(mVolume);
}
- void MIPCreator::bbUserDestructor()
+ //---------------------------------------------------------------------
+ void MIPCreator::bbUserFinalizeProcessing()
{
- mCast->Delete();
- mMIP->Delete();
- mMapper->Delete();
- mVolume->Delete();
+ if (mCast!=NULL)
+ {
+ mCast->Delete();
+ mCast=NULL;
+ }
+
+ if (mMIP!=NULL)
+ {
+ mMIP->Delete();
+ mMIP=NULL;
+ }
+
+ if (mMapper!=NULL)
+ {
+ mMapper->Delete();
+ mMapper=NULL;
+ }
+
+ if (mVolume!=NULL)
+ {
+ mVolume->Delete();
+ mVolume=NULL;
+ }
+
}
//---------------------------------------------------------------------
void MIPCreator::Process()
{
mCast->SetInput( bbGetInputIn() );
- mCast->SetScale( bbGetInputScale() / 100. );
+ mCast->SetScale( bbGetInputScale() / 100.0 );
mCast->SetShift( -bbGetInputShift() );
mMapper->Update();
Program: bbtk
Module: $RCSfile: bbvtkMIPCreator.h,v $
Language: C++
- Date: $Date: 2008/12/16 12:48:10 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.8 $
=========================================================================*/
/* ---------------------------------------------------------------------
void Process();
protected:
- virtual void bbUserConstructor();
- virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
- virtual void bbUserDestructor();
- void Init();
private:
- vtkImageShiftScale* mCast;
- vtkVolumeRayCastMIPFunction* mMIP;
- vtkVolumeRayCastMapper* mMapper;
- vtkVolume* mVolume;
+ vtkImageShiftScale *mCast;
+ vtkVolumeRayCastMIPFunction *mMIP;
+ vtkVolumeRayCastMapper *mMapper;
+ vtkVolume *mVolume;
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbvtkMarchingCubes.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:30 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.4 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,MarchingCubes)
BBTK_BLACK_BOX_IMPLEMENTATION(MarchingCubes,bbtk::AtomicBlackBox);
+
+ //-----------------------------------------------------------------
+ void MarchingCubes::bbUserSetDefaultValues()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void MarchingCubes::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void MarchingCubes::bbUserFinalizeProcessing()
+ {
+ }
+
+
} // EO namespace bbvtk
Program: bbtk
Module: $RCSfile: bbvtkPiecewiseFunction.cxx,v $
Language: C++
- Date: $Date: 2008/12/16 12:48:10 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_BLACK_BOX_IMPLEMENTATION(PiecewiseFunction,bbtk::AtomicBlackBox);
-
-
-
- void PiecewiseFunction::bbUserConstructor()
+ //---------------------------------------------------------------------
+ void PiecewiseFunction::bbUserSetDefaultValues()
{
- Init();
// Identity function
std::vector<float> x,y;
x.push_back(0);
y.push_back(1);
bbSetInputX(x);
bbSetInputY(y);
- }
- void PiecewiseFunction::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
- {
- Init();
+ bbSetOutputOut(0);
}
- void PiecewiseFunction::Init()
+
+ //---------------------------------------------------------------------
+ void PiecewiseFunction::bbUserInitializeProcessing()
{
bbSetOutputOut(vtkPiecewiseFunction::New());
}
- void PiecewiseFunction::bbUserDestructor()
+ //---------------------------------------------------------------------
+ void PiecewiseFunction::bbUserFinalizeProcessing()
{
- bbGetOutputOut()->Delete();
+ if (bbGetOutputOut()!=NULL)
+ {
+ bbGetOutputOut()->Delete();
+ bbSetOutputOut(0);
+ }
}
//---------------------------------------------------------------------
Program: bbtk
Module: $RCSfile: bbvtkPiecewiseFunction.h,v $
Language: C++
- Date: $Date: 2008/12/16 12:48:10 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
void Process();
protected:
- virtual void bbUserConstructor();
- virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
- virtual void bbUserDestructor();
- void Init();
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbvtkSegmentationConnectivity.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:30 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.5 $
=========================================================================*/
/* ---------------------------------------------------------------------
bbtk::AtomicBlackBox);
- void SegmentationConnectivity::bbUserConstructor()
+ // --------------------------------------------------------------
+ void SegmentationConnectivity::bbUserSetDefaultValues()
{
- bbSetInputIn(NULL);
- std::vector<int> position;
- position.push_back(0);
- position.push_back(0);
- position.push_back(0);
- bbSetInputPositionXYZ(position);
- std::vector<int> threshold;
- threshold.push_back(0);
- threshold.push_back(0);
- bbSetInputThresholdMinMax(threshold);
- bbSetOutputOut(NULL);
- thresh2 = vtkImageThreshold::New();
- thresh2->SetInValue(255);
- thresh2->SetOutputScalarTypeToUnsignedShort();
- thresh2->SetOutValue(0);
- cast2 = vtkImageCast::New();
- cast2->SetInput(thresh2->GetOutput());
- cast2->SetOutputScalarTypeToUnsignedChar();
- connect2 = vtkImageSeedConnectivity::New();
- connect2->SetInput(cast2->GetOutput());
- connect2->SetInputConnectValue(255);
- connect2->SetOutputConnectedValue(255);
- connect2->SetOutputUnconnectedValue(0);
- cast4 = vtkImageCast::New();
- cast4->SetInput(connect2->GetOutput());
- cast4->SetOutputScalarTypeToUnsignedShort();
+ thresh2 = NULL;
+ cast2 = NULL;
+ connect2 = NULL;
+ cast4 = NULL;
+
+ bbSetInputIn(NULL);
+ std::vector<int> position;
+ position.push_back(0);
+ position.push_back(0);
+ position.push_back(0);
+ bbSetInputPositionXYZ(position);
+ std::vector<int> threshold;
+ threshold.push_back(0);
+ threshold.push_back(0);
+ bbSetInputThresholdMinMax(threshold);
+ bbSetOutputOut(NULL);
}
-
-
- void SegmentationConnectivity::bbUserDestructor()
+
+ // --------------------------------------------------------------
+ void SegmentationConnectivity::bbUserInitializeProcessing()
+ {
+ thresh2 = vtkImageThreshold::New();
+ thresh2->SetInValue(255);
+ thresh2->SetOutputScalarTypeToUnsignedShort();
+ thresh2->SetOutValue(0);
+ cast2 = vtkImageCast::New();
+ cast2->SetInput(thresh2->GetOutput());
+ cast2->SetOutputScalarTypeToUnsignedChar();
+ connect2 = vtkImageSeedConnectivity::New();
+ connect2->SetInput(cast2->GetOutput());
+ connect2->SetInputConnectValue(255);
+ connect2->SetOutputConnectedValue(255);
+ connect2->SetOutputUnconnectedValue(0);
+ cast4 = vtkImageCast::New();
+ cast4->SetInput(connect2->GetOutput());
+ cast4->SetOutputScalarTypeToUnsignedShort();
+ }
+
+ // --------------------------------------------------------------
+ void SegmentationConnectivity::bbUserFinalizeProcessing()
{
- thresh2->Delete();
- cast2->Delete();
- connect2->Delete();
- cast4->Delete();
+ if (thresh2!=NULL)
+ {
+ thresh2->Delete();
+ thresh2=NULL;
+ }
+ if (cast2!=NULL)
+ {
+ cast2->Delete();
+ cast2=NULL;
+ }
+ if (connect2!=NULL)
+ {
+ connect2->Delete();
+ connect2=NULL;
+ }
+ if (cast4!=NULL)
+ {
+ cast4->Delete();
+ cast4=NULL;
+ }
+
}
+ // --------------------------------------------------------------
void SegmentationConnectivity::DoProcess()
{
vtkImageData *imagedata = bbGetInputIn();
Program: bbtk
Module: $RCSfile: bbvtkSegmentationConnectivity.h,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:30 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.5 $
=========================================================================*/
/* ---------------------------------------------------------------------
void DoProcess();
protected:
- virtual void bbUserConstructor();
- virtual void bbUserDestructor();
private:
vtkImageCast *cast2;
BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,Transform);
BBTK_BLACK_BOX_IMPLEMENTATION(Transform,bbtk::AtomicBlackBox);
+
+
+ // --------------------------------------------------------------
+
+ void Transform::bbUserSetDefaultValues()
+ {
+ bbSetInputIn(NULL);
+
+ vecScale.push_back(1); // scale x
+ vecScale.push_back(1); // scale y
+ vecScale.push_back(1); // scale z
+ bbSetInputScale(vecScale);
+
+ vecRotateWXYZ.push_back(0); //angle
+ vecRotateWXYZ.push_back(1); //vx
+ vecRotateWXYZ.push_back(0); //vy
+ vecRotateWXYZ.push_back(0); //vz
+ bbSetInputRotateWXYZ(vecRotateWXYZ);
+
+ vecTranslate.push_back(0); //tx
+ vecTranslate.push_back(0); //ty
+ vecTranslate.push_back(0); //tz
+ bbSetInputTranslate(vecTranslate);
+
+ vecSpacing.push_back(1); //spacing x
+ vecSpacing.push_back(1); //spacing y
+ vecSpacing.push_back(1); //spacing z
+ bbSetInputTranslate(vecSpacing);
+
+ result = NULL;
+ }
+
+ // --------------------------------------------------------------
+ void Transform::bbUserInitializeProcessing()
+ {
+ bbUserFinalizeProcessing();
+ result = vtkTransform::New();
+ }
+
+
+ // --------------------------------------------------------------
+ void Transform::bbUserFinalizeProcessing()
+ {
+ if (result!=NULL)
+ {
+ result->Delete();
+ result=NULL;
+ }
+
+ }
+
+
+ // --------------------------------------------------------------
void Transform::Process()
{
- if (result!=NULL)
- {
- result->Delete();
- }
- result = vtkTransform::New();
-
-
- if (bbGetInputIn()!=NULL)
+ bbUserInitializeProcessing();
+ if (bbGetInputIn()!=NULL)
{
- result->Concatenate( bbGetInputIn()->GetMatrix() );
+ result->Concatenate( bbGetInputIn()->GetMatrix() );
}
-
-
- if (bbGetInputScale().size()>=3)
+
+ if (bbGetInputScale().size()>=3)
{
- result->Scale(bbGetInputScale()[0], bbGetInputScale()[1], bbGetInputScale()[2]);
+ result->Scale(bbGetInputScale()[0], bbGetInputScale()[1], bbGetInputScale()[2]);
}
- if ((bbGetInputTranslate().size()>=3) && (bbGetInputSpacing().size()>=3))
+ if ((bbGetInputTranslate().size()>=3) && (bbGetInputSpacing().size()>=3))
{
- double tx = bbGetInputTranslate()[0] * bbGetInputSpacing()[0];
- double ty = bbGetInputTranslate()[1] * bbGetInputSpacing()[1];
- double tz = bbGetInputTranslate()[2] * bbGetInputSpacing()[2];
- result->Translate(tx,ty,tz);
+ double tx = bbGetInputTranslate()[0] * bbGetInputSpacing()[0];
+ double ty = bbGetInputTranslate()[1] * bbGetInputSpacing()[1];
+ double tz = bbGetInputTranslate()[2] * bbGetInputSpacing()[2];
+ result->Translate(tx,ty,tz);
}
- if (bbGetInputRotateWXYZ().size()>=4)
+ if (bbGetInputRotateWXYZ().size()>=4)
{
- result->RotateWXYZ(bbGetInputRotateWXYZ()[0],bbGetInputRotateWXYZ()[1], bbGetInputRotateWXYZ()[2], bbGetInputRotateWXYZ()[3]);
+ result->RotateWXYZ(bbGetInputRotateWXYZ()[0],bbGetInputRotateWXYZ()[1], bbGetInputRotateWXYZ()[2], bbGetInputRotateWXYZ()[3]);
}
- result->Update();
+ result->Update();
- bbSetOutputOut(result);
+ bbSetOutputOut(result);
}
-
- void Transform::bbUserConstructor()
- {
- bbSetInputIn(NULL);
-
- vecScale.push_back(1); // scale x
- vecScale.push_back(1); // scale y
- vecScale.push_back(1); // scale z
- bbSetInputScale(vecScale);
-
- vecRotateWXYZ.push_back(0); //angle
- vecRotateWXYZ.push_back(1); //vx
- vecRotateWXYZ.push_back(0); //vy
- vecRotateWXYZ.push_back(0); //vz
- bbSetInputRotateWXYZ(vecRotateWXYZ);
-
- vecTranslate.push_back(0); //tx
- vecTranslate.push_back(0); //ty
- vecTranslate.push_back(0); //tz
- bbSetInputTranslate(vecTranslate);
-
- vecSpacing.push_back(1); //spacing x
- vecSpacing.push_back(1); //spacing y
- vecSpacing.push_back(1); //spacing z
- bbSetInputTranslate(vecSpacing);
-
- result = NULL;
- }
- /*
- void Transform::bbUserCopyConstructor()
- {
-
-
- }
- */
- void Transform::bbUserDestructor()
- {
-
-
- }
}
// EO namespace bbvtk
public bbtk::AtomicBlackBox
{
BBTK_BLACK_BOX_INTERFACE(Transform,bbtk::AtomicBlackBox);
- //==================================================================
- /// User callback called in the box contructor
- virtual void bbUserConstructor();
- /// User callback called in the box copy constructor
- //virtual void bbUserCopyConstructor();
- /// User callback called in the box destructor
- virtual void bbUserDestructor();
- //==================================================================
BBTK_DECLARE_INPUT(In,vtkLinearTransform *);
BBTK_DECLARE_INPUT(Scale,std::vector<double>);
BBTK_DECLARE_INPUT(RotateWXYZ,std::vector<double>);
BBTK_PROCESS(Process);
void Process();
- std::vector<double> vecScale;
- std::vector<double> vecRotateWXYZ;
- std::vector<double> vecTranslate;
- std::vector<double> vecSpacing;
+ std::vector<double> vecScale;
+ std::vector<double> vecRotateWXYZ;
+ std::vector<double> vecTranslate;
+ std::vector<double> vecSpacing;
vtkTransform *result;
};
BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,VecImageGaussianSmooth)
BBTK_BLACK_BOX_IMPLEMENTATION(VecImageGaussianSmooth,bbtk::AtomicBlackBox);
-void VecImageGaussianSmooth::Process()
-{
- vtkImageGaussianSmooth *vtkimagegaussiansmooth;
- int i,size = (int)VecVtkimagegaussiansmooth.size();
- for (i=0 ; i<size ; i++)
- {
- VecVtkimagegaussiansmooth[i]->Delete();
+
+
+ //---------------------------------------------------------------------
+ void VecImageGaussianSmooth::bbUserSetDefaultValues()
+ {
+ bbSetInputStdDevX(2);
+ bbSetInputStdDevY(2);
+ bbSetInputStdDevZ(2);
+ bbSetInputiImage(0);
}
- VecVtkimagegaussiansmooth.clear();
- VecResult.clear();
-
- double stdvX=bbGetInputStdDevX();
- double stdvY=bbGetInputStdDevY();
- double stdvZ=bbGetInputStdDevZ();
- size=(int)bbGetInputIn().size();
- for (i=0 ; i<size ; i++)
- {
- vtkimagegaussiansmooth = vtkImageGaussianSmooth::New();
- vtkimagegaussiansmooth->SetInput( bbGetInputIn()[i] );
- vtkimagegaussiansmooth->SetStandardDeviation( stdvX,stdvY, stdvZ );
- vtkimagegaussiansmooth->Update();
- VecResult.push_back( vtkimagegaussiansmooth->GetOutput() );
- VecVtkimagegaussiansmooth.push_back(vtkimagegaussiansmooth);
- } //for i
- bbSetOutputOut(VecResult);
- if (bbGetInputiImage() < (int)VecResult.size())
+ void VecImageGaussianSmooth::bbUserInitializeProcessing()
{
- bbSetOutputOutImage(VecResult[bbGetInputiImage()]);
- } //if
+ }
-}
-
-void VecImageGaussianSmooth::bbUserConstructor()
-{
-
- bbSetInputStdDevX(2);
- bbSetInputStdDevY(2);
- bbSetInputStdDevZ(2);
-
- bbSetInputiImage(0);
-
-}
+ //---------------------------------------------------------------------
+ void VecImageGaussianSmooth::bbUserFinalizeProcessing()
+ {
+ int i,size = (int)VecVtkimagegaussiansmooth.size();
+ for (i=0 ; i<size ; i++)
+ {
+ VecVtkimagegaussiansmooth[i]->Delete();
+ }
+ VecVtkimagegaussiansmooth.clear();
+ }
+
+
+
+ //---------------------------------------------------------------------
+
+ void VecImageGaussianSmooth::Process()
+ {
+ bbUserFinalizeProcessing();
+
+ vtkImageGaussianSmooth *vtkimagegaussiansmooth;
+ VecResult.clear();
-void VecImageGaussianSmooth::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
-{
-}
+ double stdvX=bbGetInputStdDevX();
+ double stdvY=bbGetInputStdDevY();
+ double stdvZ=bbGetInputStdDevZ();
+
+ int i,size=(int)bbGetInputIn().size();
+ for (i=0 ; i<size ; i++)
+ {
+ vtkimagegaussiansmooth = vtkImageGaussianSmooth::New();
+ vtkimagegaussiansmooth->SetInput( bbGetInputIn()[i] );
+ vtkimagegaussiansmooth->SetStandardDeviation( stdvX,stdvY, stdvZ );
+ vtkimagegaussiansmooth->Update();
+ VecResult.push_back( vtkimagegaussiansmooth->GetOutput() );
+ VecVtkimagegaussiansmooth.push_back(vtkimagegaussiansmooth);
+ } //for i
+
+ bbSetOutputOut(VecResult);
+ if (bbGetInputiImage() < (int)VecResult.size())
+ {
+ bbSetOutputOutImage(VecResult[bbGetInputiImage()]);
+ } //if
+
+ }
-void VecImageGaussianSmooth::bbUserDestructor()
-{
-}
}
// EO namespace bbvtk
public bbtk::AtomicBlackBox
{
BBTK_BLACK_BOX_INTERFACE(VecImageGaussianSmooth,bbtk::AtomicBlackBox);
-//==================================================================
-/// User callback called in the box contructor
-virtual void bbUserConstructor();
-/// User callback called in the box copy constructor
-virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
-/// User callback called in the box destructor
-virtual void bbUserDestructor();
-//==================================================================
BBTK_DECLARE_INPUT(In,std::vector<vtkImageData*>);
BBTK_DECLARE_INPUT(StdDevX,double);
BBTK_DECLARE_INPUT(StdDevY,double);
BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,VecIsoSurfaceExtractor)
BBTK_BLACK_BOX_IMPLEMENTATION(VecIsoSurfaceExtractor,bbtk::AtomicBlackBox);
-void VecIsoSurfaceExtractor::Process()
-{
- double r,g,b;
- vtkMarchingCubes *marchingcubes;
- vtkPolyDataMapper *polydatamapper;
- vtkActor *vtkactor;
-
- int i,size;
-
-
- size = VecVtkactor.size();
- for( i=0 ; i<size ; i++)
+
+ //-----------------------------------------------------------
+ void VecIsoSurfaceExtractor::bbUserSetDefaultValues()
{
- if (bbGetInputRenderer()!=NULL )
+ std::vector<double> colour;
+ // 1- red
+ colour.push_back(1.0);
+ colour.push_back(0.0);
+ colour.push_back(0.0);
+ // 2- blue
+ colour.push_back(0.0);
+ colour.push_back(0.0);
+ colour.push_back(1.0);
+ // 3- yellow
+ colour.push_back(1.0);
+ colour.push_back(1.0);
+ colour.push_back(0.0);
+ // 4- green
+ colour.push_back(0.0);
+ colour.push_back(1.0);
+ colour.push_back(0.0);
+ // 5-
+ colour.push_back(0.0);
+ colour.push_back(1.0);
+ colour.push_back(1.0);
+
+ // 6-
+ colour.push_back(0.5);
+ colour.push_back(0.5);
+ colour.push_back(0.5);
+
+ bbSetInputColour(colour);
+ bbSetInputTransform(NULL);
+ bbSetInputOpacity(1);
+
+ bbSetInputRenderer(NULL);
+ bbSetInputIsovalue(128);
+ bbSetInputOpacity(1);
+ }
+
+ //-----------------------------------------------------------
+ void VecIsoSurfaceExtractor::bbUserInitializeProcessing()
+ {
+ // bbSetInputIn(NULL);
+ // bbSetInputInVtkObject(NULL);
+
+ }
+
+ //-----------------------------------------------------------
+ void VecIsoSurfaceExtractor::bbUserFinalizeProcessing()
+ {
+ int i,size = VecMarchingcubes.size();
+ for (i=0;i<size;i++)
{
- bbGetInputRenderer()->RemoveActor( VecVtkactor[i] );
VecMarchingcubes[i]->Delete();
VecPolydatamapper[i]->Delete();
VecVtkactor[i]->Delete();
}
+ VecMarchingcubes.clear();
+ VecPolydatamapper.clear();
+ VecVtkactor.clear();
}
- VecMarchingcubes.clear();
- VecPolydatamapper.clear();
- VecVtkactor.clear();
-
-
- size = bbGetInputIn().size();
- for( i=0 ; i<size ; i++){
- marchingcubes = vtkMarchingCubes::New();
- polydatamapper = vtkPolyDataMapper::New();
- vtkactor = vtkActor::New();
-
- polydatamapper->SetInput(marchingcubes->GetOutput());
- vtkactor->SetMapper(polydatamapper);
-
- polydatamapper->ScalarVisibilityOff();
- polydatamapper->ImmediateModeRenderingOn();
-
- VecMarchingcubes.push_back(marchingcubes);
- VecPolydatamapper.push_back(polydatamapper);
- VecVtkactor.push_back(vtkactor);
- } // for i
-
-
- for( i=0 ; i<size ; i++){
- // Visualisation - result volume
- marchingcubes=VecMarchingcubes[i];
- vtkactor=(vtkActor*)VecVtkactor[i];
-
- marchingcubes->SetInput( bbGetInputIn()[i] );
- marchingcubes->SetValue(0, bbGetInputIsovalue() );
- marchingcubes->Update();
-
- if ( (i*3+1)<(int)(bbGetInputColour().size()) ){
- r = bbGetInputColour()[0+i*3];
- g = bbGetInputColour()[1+i*3];
- b = bbGetInputColour()[2+i*3];
- } else {
- r = bbGetInputColour()[0];
- g = bbGetInputColour()[1];
- b = bbGetInputColour()[2];
- }
- vtkactor->GetProperty()->SetColor( r,g,b );
-
- vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
-
- if ( bbGetInputTransform()!=NULL )
- {
- vtkactor->SetUserTransform( bbGetInputTransform() );
- }
+
+ //-----------------------------------------------------------
+ void VecIsoSurfaceExtractor::Process()
+ {
+ double r,g,b;
+ vtkMarchingCubes *marchingcubes;
+ vtkPolyDataMapper *polydatamapper;
+ vtkActor *vtkactor;
+
+ int i,size;
- // Interface Update
- if (bbGetInputRenderer()!=NULL )
+ size = VecVtkactor.size();
+ for( i=0 ; i<size ; i++)
{
- bbGetInputRenderer()->AddActor( vtkactor );
+ if (bbGetInputRenderer()!=NULL )
+ {
+ bbGetInputRenderer()->RemoveActor( VecVtkactor[i] );
+ VecMarchingcubes[i]->Delete();
+ VecPolydatamapper[i]->Delete();
+ VecVtkactor[i]->Delete();
+ }
}
- } // for i
-
-
- bbSetOutputOut( VecVtkactor );
-}
-
-void VecIsoSurfaceExtractor::bbUserConstructor()
-{
- Init();
- std::vector<double> colour;
- // 1- red
- colour.push_back(1.0);
- colour.push_back(0.0);
- colour.push_back(0.0);
- // 2- blue
- colour.push_back(0.0);
- colour.push_back(0.0);
- colour.push_back(1.0);
- // 3- yellow
- colour.push_back(1.0);
- colour.push_back(1.0);
- colour.push_back(0.0);
- // 4- green
- colour.push_back(0.0);
- colour.push_back(1.0);
- colour.push_back(0.0);
- // 5-
- colour.push_back(0.0);
- colour.push_back(1.0);
- colour.push_back(1.0);
-
- // 6-
- colour.push_back(0.5);
- colour.push_back(0.5);
- colour.push_back(0.5);
-
-
- bbSetInputColour(colour);
- bbSetInputTransform(NULL);
- bbSetInputOpacity(1);
-}
-
-void VecIsoSurfaceExtractor::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
-{
- Init();
-}
-
-void VecIsoSurfaceExtractor::bbUserDestructor()
-{
- int i,size = VecMarchingcubes.size();
- for (i=0;i<size;i++)
- {
- VecMarchingcubes[i]->Delete();
- VecPolydatamapper[i]->Delete();
- VecVtkactor[i]->Delete();
+ VecMarchingcubes.clear();
+ VecPolydatamapper.clear();
+ VecVtkactor.clear();
+
+
+ size = bbGetInputIn().size();
+ for( i=0 ; i<size ; i++){
+ marchingcubes = vtkMarchingCubes::New();
+ polydatamapper = vtkPolyDataMapper::New();
+ vtkactor = vtkActor::New();
+
+ polydatamapper->SetInput(marchingcubes->GetOutput());
+ vtkactor->SetMapper(polydatamapper);
+
+ polydatamapper->ScalarVisibilityOff();
+ polydatamapper->ImmediateModeRenderingOn();
+
+ VecMarchingcubes.push_back(marchingcubes);
+ VecPolydatamapper.push_back(polydatamapper);
+ VecVtkactor.push_back(vtkactor);
+ } // for i
+
+
+ for( i=0 ; i<size ; i++){
+ // Visualisation - result volume
+ marchingcubes=VecMarchingcubes[i];
+ vtkactor=(vtkActor*)VecVtkactor[i];
+
+ marchingcubes->SetInput( bbGetInputIn()[i] );
+ marchingcubes->SetValue(0, bbGetInputIsovalue() );
+ marchingcubes->Update();
+
+ if ( (i*3+1)<(int)(bbGetInputColour().size()) ){
+ r = bbGetInputColour()[0+i*3];
+ g = bbGetInputColour()[1+i*3];
+ b = bbGetInputColour()[2+i*3];
+ } else {
+ r = bbGetInputColour()[0];
+ g = bbGetInputColour()[1];
+ b = bbGetInputColour()[2];
+ }
+ vtkactor->GetProperty()->SetColor( r,g,b );
+
+ vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
+
+ if ( bbGetInputTransform()!=NULL )
+ {
+ vtkactor->SetUserTransform( bbGetInputTransform() );
+ }
+
+ // Interface Update
+ if (bbGetInputRenderer()!=NULL )
+ {
+ bbGetInputRenderer()->AddActor( vtkactor );
+ }
+ } // for i
+
+ bbSetOutputOut( VecVtkactor );
}
- VecMarchingcubes.clear();
- VecPolydatamapper.clear();
- VecVtkactor.clear();
-}
-
-
-void VecIsoSurfaceExtractor::Init()
-{
-// bbSetInputIn(NULL);
- // bbSetInputInVtkObject(NULL);
- bbSetInputRenderer(NULL);
- bbSetInputIsovalue(128);
- bbSetInputOpacity(1);
-
-}
}
public bbtk::AtomicBlackBox
{
BBTK_BLACK_BOX_INTERFACE(VecIsoSurfaceExtractor,bbtk::AtomicBlackBox);
-//==================================================================
-/// User callback called in the box contructor
-virtual void bbUserConstructor();
-/// User callback called in the box copy constructor
-virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
-/// User callback called in the box destructor
-virtual void bbUserDestructor();
-//==================================================================
- BBTK_DECLARE_INPUT(In,std::vector<vtkImageData*>);
+ BBTK_DECLARE_INPUT(In,std::vector<vtkImageData*>);
// BBTK_DECLARE_INPUT(InVtkObject,vtkObject *);
BBTK_DECLARE_INPUT(Isovalue,double);
BBTK_DECLARE_INPUT(Opacity,double);
Program: bbtk
Module: $RCSfile: bbvtkVolumeRenderer.cxx,v $
Language: C++
- Date: $Date: 2008/12/16 12:48:10 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
- void VolumeRenderer::bbUserConstructor()
+ void VolumeRenderer::bbUserSetDefaultValues()
{
- Init();
- bbSetInputColorFunction(0);
- bbSetInputOpacityFunction(0);
+ mRayCastFunction = NULL;
+ mMapper = NULL;
+ mVolume = NULL;
+ bbSetInputColorFunction(0);
+ bbSetInputOpacityFunction(0);
}
- void VolumeRenderer::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
- {
- Init();
- }
-
- void VolumeRenderer::Init()
+
+ void VolumeRenderer::bbUserInitializeProcessing()
{
// Create the pipeline
// mMIP->SetMaximizeMethodToScalarValue();
mRayCastFunction = vtkVolumeRayCastCompositeFunction::New();
-
mMapper = vtkVolumeRayCastMapper::New();
- mMapper->SetVolumeRayCastFunction(mRayCastFunction);
-
-
+ mMapper->SetVolumeRayCastFunction(mRayCastFunction);
mVolume = vtkVolume::New();
- mVolume->SetMapper(mMapper);
+ mVolume->SetMapper(mMapper);
// mMapper->ScalarVisibilityOff();
// mMapper->ImmediateModeRenderingOn();
- bbSetOutputOut(mVolume);
}
- void VolumeRenderer::bbUserDestructor()
+ //---------------------------------------------------------------------
+ void VolumeRenderer::bbUserFinalizeProcessing()
{
- mRayCastFunction->Delete();
- mMapper->Delete();
- mVolume->Delete();
+ if (mRayCastFunction!=NULL)
+ {
+ mRayCastFunction->Delete();
+ mRayCastFunction=NULL;
+ }
+ if (mMapper!=NULL)
+ {
+ mMapper->Delete();
+ mMapper=NULL;
+ }
+ if (mVolume!=NULL)
+ {
+ mVolume->Delete();
+ mVolume=NULL;
+ }
}
//---------------------------------------------------------------------
}
if (changed) mMapper->Update();
-
+
+ bbSetOutputOut(mVolume);
+
}
}//namespace bbtk
Program: bbtk
Module: $RCSfile: bbvtkVolumeRenderer.h,v $
Language: C++
- Date: $Date: 2008/12/16 12:48:10 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/15 14:58:01 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
void Process();
protected:
- virtual void bbUserConstructor();
- virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
- virtual void bbUserDestructor();
- void Init();
+
private:
vtkVolumeProperty * mVolumeProperty;
vtkVolumeRayCastCompositeFunction * mRayCastFunction;
Program: bbtk
Module: $RCSfile: bbwxCheckBox.cxx,v $
Language: C++
- Date: $Date: 2009/01/13 09:57:13 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_BLACK_BOX_IMPLEMENTATION(CheckBox,bbtk::WxBlackBox);
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,CheckBox);
- //--------------------------------------------------------------------------
- void CheckBox::bbUserConstructor()
- {
- bbSetInputIn(false);
- bbSetOutputOut(false);
- }
-
+
+ //-----------------------------------------------------------------
+ void CheckBox::bbUserSetDefaultValues()
+ {
+ bbSetInputIn(false);
+ bbSetOutputOut(false);
+ }
+
+ //-----------------------------------------------------------------
+ void CheckBox::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void CheckBox::bbUserFinalizeProcessing()
+ {
+ }
+
+
//--------------------------------------------------------------------------
void CheckBox::Process()
{
Program: bbtk
Module: $RCSfile: bbwxCheckBox.h,v $
Language: C++
- Date: $Date: 2009/01/13 09:57:13 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
void CreateWidget(wxWindow*);
protected:
- virtual void bbUserConstructor();
+
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbwxColourSelector.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:32 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.7 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ColourSelector);
BBTK_BLACK_BOX_IMPLEMENTATION(ColourSelector,bbtk::AtomicBlackBox);
- void ColourSelector::bbUserConstructor()
- {
- }
-
+ //-----------------------------------------------------------------
+ void ColourSelector::bbUserSetDefaultValues()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ColourSelector::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ColourSelector::bbUserFinalizeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
void ColourSelector::Process()
{
bbtkDebugMessageInc("Core",9,"ColourSelector::Process() ["
Program: bbtk
Module: $RCSfile: bbwxColourSelector.h,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:23 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_PROCESS(Process);
void Process();
protected:
- virtual void bbUserConstructor();
+
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbwxColourSelectorButton.cxx,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:23 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.10 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_BLACK_BOX_IMPLEMENTATION(ColourSelectorButton,bbtk::WxBlackBox);
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ColourSelectorButton);
- void ColourSelectorButton::bbUserConstructor()
- {
- // Default input value
- bbSetInputIn("1 1 1");
- // Initial output value = the same than input
- bbSetOutputOut("1 1 1");
- // IMPORTANT : Initialize output widget to null pointer to test it after
- bbSetOutputWidget(0);
- }
-
+ //-----------------------------------------------------------------
+ void ColourSelectorButton::bbUserSetDefaultValues()
+ {
+ // Default input value
+ bbSetInputIn("1 1 1");
+ // Initial output value = the same than input
+ bbSetOutputOut("1 1 1");
+ // IMPORTANT : Initialize output widget to null pointer to test it after
+ bbSetOutputWidget(0);
+ }
+
+ //-----------------------------------------------------------------
+ void ColourSelectorButton::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void ColourSelectorButton::bbUserFinalizeProcessing()
+ {
+ }
void ColourSelectorButton::Process()
{
Program: bbtk
Module: $RCSfile: bbwxColourSelectorButton.h,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:23 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.11 $
=========================================================================*/
/* ---------------------------------------------------------------------
void Process();
void CreateWidget(wxWindow*);
protected:
- virtual void bbUserConstructor();
+
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbwxCommandButton.cxx,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:23 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.15 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,CommandButton);
BBTK_BLACK_BOX_IMPLEMENTATION(CommandButton,bbtk::WxBlackBox);
- void CommandButton::bbUserConstructor()
- {
- bbSetInputIn("");
- bbSetInputLabel("");
- std::vector<double> lstColour;
- lstColour.push_back(0.75);
- lstColour.push_back(0.75);
- lstColour.push_back(0.75);
- bbSetInputColour(lstColour);
- bbSetOutputWidget(0);
- }
-
+//-----------------------------------------------------------------
+ void CommandButton::bbUserSetDefaultValues()
+ {
+ bbSetInputIn("");
+ bbSetInputLabel("");
+ std::vector<double> lstColour;
+ lstColour.push_back(0.75);
+ lstColour.push_back(0.75);
+ lstColour.push_back(0.75);
+ bbSetInputColour(lstColour);
+ bbSetOutputWidget(0);
+ }
+
+ //-----------------------------------------------------------------
+ void CommandButton::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void CommandButton::bbUserFinalizeProcessing()
+ {
+ }
+
void CommandButton::Process()
{
}
}
+
void CommandButton::UpdateLabel()
{
CommandButtonWidget* wxwidget = (CommandButtonWidget*)bbGetOutputWidget();
Program: bbtk
Module: $RCSfile: bbwxCommandButton.h,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:23 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_CREATE_WIDGET(CreateWidget);
void CreateWidget(wxWindow*);
protected:
- virtual void bbUserConstructor();
private:
Program: bbtk
Module: $RCSfile: bbwxDirectorySelector.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:32 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.7 $
=========================================================================*/
/* ---------------------------------------------------------------------
namespace bbwx
{
- BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,DirectorySelector);
-
-
- BBTK_BLACK_BOX_IMPLEMENTATION(DirectorySelector,bbtk::AtomicBlackBox);
-
-
- void DirectorySelector::Process()
- {
- bbtkDebugMessageInc("Core",9,"DirectorySelector::Process() ["
- <<bbGetFullName()<<"]"<<std::endl);
-
- wxDirDialog* FD =
- new wxDirDialog( 0,
- bbtk::std2wx(bbGetInputMessage()),
- bbtk::std2wx(bbGetInputDefaultDir()));
-
- if (FD->ShowModal()==wxID_OK)
- {
- bbSetOutputOut( bbtk::wx2std (FD->GetPath()) );
- bbSetInputDefaultDir( bbtk::wx2std (FD->GetPath()) );
- }
- else
- {
- bbSetOutputOut("");
- bbSetInputDefaultDir("");
- }
-
- bbtkDebugDecTab("Core",9);
- }
+ BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,DirectorySelector);
+ BBTK_BLACK_BOX_IMPLEMENTATION(DirectorySelector,bbtk::AtomicBlackBox);
+
+ //-----------------------------------------------------------------
+ void DirectorySelector::bbUserSetDefaultValues()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void DirectorySelector::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void DirectorySelector::bbUserFinalizeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void DirectorySelector::Process()
+ {
+ bbtkDebugMessageInc("Core",9,"DirectorySelector::Process() ["
+ <<bbGetFullName()<<"]"<<std::endl);
+
+ wxDirDialog* FD =
+ new wxDirDialog( 0,
+ bbtk::std2wx(bbGetInputMessage()),
+ bbtk::std2wx(bbGetInputDefaultDir()));
+
+ if (FD->ShowModal()==wxID_OK)
+ {
+ bbSetOutputOut( bbtk::wx2std (FD->GetPath()) );
+ bbSetInputDefaultDir( bbtk::wx2std (FD->GetPath()) );
+ }
+ else
+ {
+ bbSetOutputOut("");
+ bbSetInputDefaultDir("");
+ }
+
+ bbtkDebugDecTab("Core",9);
+ }
Program: bbtk
Module: $RCSfile: bbwxFileSelector.cxx,v $
Language: C++
- Date: $Date: 2009/03/11 13:34:58 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.7 $
=========================================================================*/
/* ---------------------------------------------------------------------
{
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,FileSelector);
-
-
BBTK_BLACK_BOX_IMPLEMENTATION(FileSelector,bbtk::AtomicBlackBox);
+ //-----------------------------------------------------------------
+ void FileSelector::bbUserSetDefaultValues()
+ {
+ bbSetInputOpenSave("Open");
+ }
+
+ //-----------------------------------------------------------------
+ void FileSelector::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void FileSelector::bbUserFinalizeProcessing()
+ {
+ }
+
void FileSelector::Process()
{
bbtkDebugMessageInc("Core",9,"FileSelector::Process() ["
bbtkDebugDecTab("Core",9);
}
-
- void FileSelector::bbUserConstructor()
- {
- bbSetInputOpenSave("Open");
- }
Program: bbtk
Module: $RCSfile: bbwxFileSelector.h,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:23 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.7 $
=========================================================================*/
/* ---------------------------------------------------------------------
void Process();
protected:
- virtual void bbUserConstructor();
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbwxInputText.cxx,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:23 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.6 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,InputText);
BBTK_BLACK_BOX_IMPLEMENTATION(InputText,bbtk::WxBlackBox);
-
-
- void InputText::bbUserConstructor()
- {
- bbSetInputTitle("");
- bbSetInputIn("");
- bbSetOutputWidget(0);
- }
+ //-----------------------------------------------------------------
+ void InputText::bbUserSetDefaultValues()
+ {
+ bbSetInputTitle("");
+ bbSetInputIn("");
+ bbSetOutputWidget(0);
+ }
+
+ //-----------------------------------------------------------------
+ void InputText::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void InputText::bbUserFinalizeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
void InputText::Process()
{
InputTextWidget *w=(InputTextWidget *)bbGetOutputWidget();
Program: bbtk
Module: $RCSfile: bbwxInputText.h,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:23 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.7 $
=========================================================================*/
/* ---------------------------------------------------------------------
void CreateWidget(wxWindow*);
protected:
- virtual void bbUserConstructor();
+
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbwxLayoutLine.cxx,v $
Language: C++
- Date: $Date: 2008/11/24 15:45:51 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.8 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx, LayoutLine);
BBTK_BLACK_BOX_IMPLEMENTATION(LayoutLine,bbtk::WxBlackBox);
- void LayoutLine::bbUserConstructor()
- {
- bbSetInputOrientation("VERTICAL");
- bbSetInputWidget1(NULL);
- bbSetInputWidget2(NULL);
- bbSetInputWidget3(NULL);
- bbSetInputWidget4(NULL);
- bbSetInputWidget5(NULL);
- bbSetInputWidget6(NULL);
- bbSetInputWidget7(NULL);
- bbSetInputWidget8(NULL);
- bbSetInputWidget9(NULL);
- }
-
+ //-----------------------------------------------------------------
+ void LayoutLine::bbUserSetDefaultValues()
+ {
+ bbSetInputOrientation("VERTICAL");
+ bbSetInputWidget1(NULL);
+ bbSetInputWidget2(NULL);
+ bbSetInputWidget3(NULL);
+ bbSetInputWidget4(NULL);
+ bbSetInputWidget5(NULL);
+ bbSetInputWidget6(NULL);
+ bbSetInputWidget7(NULL);
+ bbSetInputWidget8(NULL);
+ bbSetInputWidget9(NULL);
+ }
+
+ //-----------------------------------------------------------------
+ void LayoutLine::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void LayoutLine::bbUserFinalizeProcessing()
+ {
+ }
+
+
void LayoutLine::Process()
{
}
Program: bbtk
Module: $RCSfile: bbwxLayoutLine.h,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:23 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.10 $
=========================================================================*/
/* ---------------------------------------------------------------------
void OnShowWidget();
protected:
- virtual void bbUserConstructor();
void TryInsertWindow(wxWindow *parent, wxWindow *w,wxBoxSizer *sizer);
};
Program: bbtk
Module: $RCSfile: bbwxLayoutSplit.cxx,v $
Language: C++
- Date: $Date: 2009/04/15 15:45:55 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.11 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,LayoutSplit);
BBTK_BLACK_BOX_IMPLEMENTATION(LayoutSplit,bbtk::WxBlackBox);
- void LayoutSplit::bbUserConstructor()
- {
- bbSetInputOrientation("VERTICAL");
- bbSetInputProportion(50);
- bbSetInputWidget1(NULL);
- bbSetInputWidget2(NULL);
- }
-
+ //-----------------------------------------------------------------
+ void LayoutSplit::bbUserSetDefaultValues()
+ {
+ bbSetInputOrientation("VERTICAL");
+ bbSetInputProportion(50);
+ bbSetInputWidget1(NULL);
+ bbSetInputWidget2(NULL);
+ }
+
+ //-----------------------------------------------------------------
+ void LayoutSplit::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void LayoutSplit::bbUserFinalizeProcessing()
+ {
+ }
+
void LayoutSplit::Process()
{
}
Program: bbtk
Module: $RCSfile: bbwxLayoutSplit.h,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:24 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
void OnShowWidget();
protected:
- virtual void bbUserConstructor();
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbwxLayoutTab.cxx,v $
Language: C++
- Date: $Date: 2008/11/26 12:18:32 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.10 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_BLACK_BOX_IMPLEMENTATION(LayoutTab,bbtk::WxBlackBox);
- void LayoutTab::bbUserConstructor()
- {
+ //-----------------------------------------------------------------
+ void LayoutTab::bbUserSetDefaultValues()
+ {
bbSetInputOrientation("TOP");
bbSetInputWidget1(NULL);
bbSetInputWidget2(NULL);
bbSetInputWidget8(NULL);
bbSetInputWidget9(NULL);
}
-
+
+ //-----------------------------------------------------------------
+ void LayoutTab::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void LayoutTab::bbUserFinalizeProcessing()
+ {
+ }
+
+
+ //-----------------------------------------------------------------
void LayoutTab::TryInsertWindow(wxNotebook *book, const std::string& input )
{
wxWindow* w = bbCreateWidgetOfInput(input,book); //panel);
Program: bbtk
Module: $RCSfile: bbwxLayoutTab.h,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:24 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.11 $
=========================================================================*/
/* ---------------------------------------------------------------------
void OnShowWidget();
protected:
- virtual void bbUserConstructor();
void TryInsertWindow(wxNotebook *book, const std::string& input);
};
Program: bbtk
Module: $RCSfile: bbwxRadioButton.cxx,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:24 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,RadioButton);
BBTK_BLACK_BOX_IMPLEMENTATION(RadioButton,bbtk::WxBlackBox);
-
- void RadioButton::bbUserConstructor()
- {
- bbSetInputIn(0);
- bbSetOutputOut( bbGetInputIn() );
- bbSetInputIn0("");
- bbSetInputIn1("");
- bbSetInputIn2("");
- bbSetInputIn3("");
- bbSetInputIn4("");
- bbSetInputIn5("");
- bbSetInputIn6("");
- bbSetInputIn7("");
- bbSetInputIn8("");
- bbSetInputIn9("");
- }
-
+ //-----------------------------------------------------------------
+ void RadioButton::bbUserSetDefaultValues()
+ {
+ bbSetInputIn(0);
+ bbSetOutputOut( bbGetInputIn() );
+ bbSetInputIn0("");
+ bbSetInputIn1("");
+ bbSetInputIn2("");
+ bbSetInputIn3("");
+ bbSetInputIn4("");
+ bbSetInputIn5("");
+ bbSetInputIn6("");
+ bbSetInputIn7("");
+ bbSetInputIn8("");
+ bbSetInputIn9("");
+ }
+
+ //-----------------------------------------------------------------
+ void RadioButton::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void RadioButton::bbUserFinalizeProcessing()
+ {
+ }
+
void RadioButton::Process()
{
bbtkDebugMessageInc("Core",9,"RadioButton::Process()"<<std::endl);
Program: bbtk
Module: $RCSfile: bbwxRadioButton.h,v $
Language: C++
- Date: $Date: 2008/12/12 08:55:24 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.8 $
=========================================================================*/
/* ---------------------------------------------------------------------
void CreateWidget(wxWindow*);
protected:
- virtual void bbUserConstructor();
+
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbwxSlider.cxx,v $
Language: C++
- Date: $Date: 2009/04/16 16:08:23 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.24 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_BLACK_BOX_IMPLEMENTATION(Slider,bbtk::WxBlackBox);
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,Slider);
- //--------------------------------------------------------------------------
- void Slider::bbUserConstructor()
- {
- bbSetInputIn(0);
- bbSetInputMin(0);
- bbSetInputMax(500);
- bbSetOutputOut(0);
- bbSetInputOrientation("HORIZONTAL");
- bbSetInputChangeResolution(false);
- bbSetInputLabel(true);
- bbSetInputReactiveOnTrack(false);
- }
+ //-----------------------------------------------------------------
+ void Slider::bbUserSetDefaultValues()
+ {
+ bbSetInputIn(0);
+ bbSetInputMin(0);
+ bbSetInputMax(500);
+ bbSetOutputOut(0);
+ bbSetInputOrientation("HORIZONTAL");
+ bbSetInputChangeResolution(false);
+ bbSetInputLabel(true);
+ bbSetInputReactiveOnTrack(false);
+ }
+
+ //-----------------------------------------------------------------
+ void Slider::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void Slider::bbUserFinalizeProcessing()
+ {
+ }
//--------------------------------------------------------------------------
void Slider::Process()
Program: bbtk
Module: $RCSfile: bbwxSlider.h,v $
Language: C++
- Date: $Date: 2009/04/16 16:08:23 $
- Version: $Revision: 1.17 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.18 $
=========================================================================*/
/* ---------------------------------------------------------------------
void CreateWidget(wxWindow*);
protected:
- virtual void bbUserConstructor();
+
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbwxvtkViewer2D.cxx,v $
Language: C++
- Date: $Date: 2009/04/17 09:04:13 $
- Version: $Revision: 1.34 $
+ Date: $Date: 2009/05/15 14:58:07 $
+ Version: $Revision: 1.35 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wxvtk,Viewer2D);
BBTK_BLACK_BOX_IMPLEMENTATION(Viewer2D,bbtk::WxBlackBox);
+
+ //-----------------------------------------------------------------
+ void Viewer2D::bbUserSetDefaultValues()
+ {
+ bbSetInputIn(NULL);
+ bbSetInputSlice(0);
+ bbSetOutputWidget(0);
+ bbSetOutputRenderer(0);
+ bbSetInputOrientation(2);
+ }
+
+ //-----------------------------------------------------------------
+ void Viewer2D::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void Viewer2D::bbUserFinalizeProcessing()
+ {
+ }
+
+ //--------------------------------------------------------------------------
void Viewer2D::Process()
{
// std::cout << "Viewer2D::Process" << std::endl;
}
- void Viewer2D::bbUserConstructor()
- {
- bbSetInputIn(NULL);
- bbSetInputSlice(0);
- bbSetOutputWidget(0);
- bbSetOutputRenderer(0);
- bbSetInputOrientation(2);
- }
+ //--------------------------------------------------------------------------
void Viewer2D::CreateWidget(wxWindow* parent)
{
Viewer2DWidget* w = new Viewer2DWidget(this,parent);
Program: bbtk
Module: $RCSfile: bbwxvtkViewer2D.h,v $
Language: C++
- Date: $Date: 2009/04/17 09:04:13 $
- Version: $Revision: 1.16 $
+ Date: $Date: 2009/05/15 14:58:08 $
+ Version: $Revision: 1.17 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void Process();
void CreateWidget(wxWindow*);
// void OnShowWidget();
- void bbUserConstructor();
+
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbwxvtkViewer3D.cxx,v $
Language: C++
- Date: $Date: 2009/04/15 15:45:57 $
- Version: $Revision: 1.15 $
+ Date: $Date: 2009/05/15 14:58:08 $
+ Version: $Revision: 1.16 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
BBTK_BLACK_BOX_IMPLEMENTATION(Viewer3D,bbtk::WxBlackBox);
- void Viewer3D::bbUserConstructor()
- {
- firsttime=true;
- bbSetInputIn1(NULL);
- bbSetInputIn2(NULL);
- bbSetInputIn3(NULL);
- bbSetInputIn4(NULL);
- bbSetInputIn5(NULL);
- bbSetInputObs1(NULL);
- bbSetInputObs2(NULL);
- bbSetInputObs3(NULL);
- bbSetInputObs4(NULL);
- bbSetInputObs5(NULL);
- bbSetInputStereo(false);
- bbSetOutputRenderer( NULL );
- bbSetOutputInteractor( NULL );
- bbSetOutputWidget(NULL);
- }
-
-
+
+ //-----------------------------------------------------------------
+ void Viewer3D::bbUserSetDefaultValues()
+ {
+ firsttime=true;
+ bbSetInputIn1(NULL);
+ bbSetInputIn2(NULL);
+ bbSetInputIn3(NULL);
+ bbSetInputIn4(NULL);
+ bbSetInputIn5(NULL);
+ bbSetInputObs1(NULL);
+ bbSetInputObs2(NULL);
+ bbSetInputObs3(NULL);
+ bbSetInputObs4(NULL);
+ bbSetInputObs5(NULL);
+ bbSetInputStereo(false);
+ bbSetOutputRenderer( NULL );
+ bbSetOutputInteractor( NULL );
+ bbSetOutputWidget(NULL);
+ }
+
+ //-----------------------------------------------------------------
+ void Viewer3D::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void Viewer3D::bbUserFinalizeProcessing()
+ {
+ }
+
+ //--------------------------------------------------------------------------
void Viewer3D::Process()
{
Program: bbtk
Module: $RCSfile: bbwxvtkViewer3D.h,v $
Language: C++
- Date: $Date: 2009/03/23 12:55:54 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2009/05/15 14:58:08 $
+ Version: $Revision: 1.13 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void OnShowWidget();
protected:
- virtual void bbUserConstructor();
bool firsttime;
};