CreaTools FAQ

Frequently Asked Questions and Answers . . .

c++

1. How start a new project ?

 

BBTK

VTK

 

Known bugs

 


 

C++

 

1. (C++) How start a new project ?
http://www.creatis.insa-lyon.fr/site/en/CreaTools_home
  -> Getting Started
    ->  B. Developer Users Getting Started
      -> II. Starting a new project

 


 

 
1. (BBTK) How to Add a project (package) as a BBTK plugin?
http://www.creatis.insa-lyon.fr/site/en/CreaTools_home
-> Getting Started
  ->  B. Developer Users Getting Started
   -> II. Starting a new project
    ->  4. Add your project as a BBTK plugin

 

 
2. (BBTK) How to create a box-bbtk with itk calls ?
See example
creaNewProject
-> bbtk_mySamplePackage_PKG
-> src/bbmySamplePackagemySampleBoxWithITK.cxx/.h
Note: not forget active BUILD_BBTK_PACKAGE_mySamplePackage ON in the ccmake configuration

 

 
3. (BBTK) Error executing a box with itk "bbtk was not built for itk images of type <itk::Image<unsigned short, 3u>*>"
In your .h file of the box not forget the following configuration (respect the order first the "define" and then "include")
// Definition of the DIM and TYPE of the itkImage ..
#define BBTK_ITK_IMAGE_DIM_2
#define BBTK_ITK_IMAGE_DIM_3
#define BBTK_ITK_IMAGE_DIM_4
#define BBTK_ITK_IMAGE_TYPE_int8_t
#define BBTK_ITK_IMAGE_TYPE_uint8_t
#define BBTK_ITK_IMAGE_TYPE_int16_t
#define BBTK_ITK_IMAGE_TYPE_uint16_t
#define BBTK_ITK_IMAGE_TYPE_int32_t
#define BBTK_ITK_IMAGE_TYPE_uint32_t
#define BBTK_ITK_IMAGE_TYPE_float
#define BBTK_ITK_IMAGE_TYPE_double
#include "bbitkImage.h"

 

4. (BBTK) Having VTK problems when running CreaTools applications in a Virtual Machine

Problem: When you try to execute applications such as bbEditor or creaImageIO in a VM (tested only with Fedora 15 x86_64 VM in a Windows 7 host and using VirtualBox), the application is launched and then the console shows a Segmentation fault message.

Solution: Verify that your VM settings have the 3D acceleration option unchecked.

 

 

 

5. (BBTK) How to execute a bbs with arguments ?

-> Create the script

 
Method 1 :
In bbEditor
-> Transform it in a ComplexBox with the button
-> Add requiered Input (s) and connect it (them) to the script
-> Save Diagram
 
In the script.bbs (Edit)
-> Comment lines : #define ...
                               #endefine
-> Move the line "exec Box..." at the end of the bbs file
 
 
Method 2 :
In the script.bbs (Edit)
-> Add before the line "exec Box..." the Input(s) :   input (nameOfInput) connexion " "
          ex : input Input1 Box00.In " "
                 input Input2 Box01.NbPoints " "
                 ...
 
 
Execution
After this steps, execute the script with this following command :
        bbi script Input1=...   Input2=...
  or   bbi script.bbs Input1=...   Input2=...
 

 
6. (BBTK) How to generate a graph within bbEditor under Linux/Windows?
Under Linux and Windows, the drag and drop functionality does not work to create boxes. Instead, select the box of your choice, and click on the button "New bow" in the tool bar.
 
 
 

 


 
 
 
 
1. (VTK) How to create a vtkImageData from Scratch ?
  vtkImageData *newImage = vtkImageData::New();
   newImage->Initialize();
   newImage->SetScalarTypeToUnsignedChar();
   newImage->SetSpacing( 1,1,1 );
   newImage->SetDimensions(  200,200,200 );
   newImage->SetNumberOfScalarComponents(1);
   newImage->AllocateScalars();
 
 
 
 
2. (VTK) How to fill a vtkImageData ?
Method with 3 loops :
int i,j,k;
  for (i=0; i<dim[0]; i++;
  {
   for (j=0; j<dim[1]; j++)
   {
    for (k=0; k<dim[2]; k++)
    {
     imageoutput->SetScalarComponentFromDouble(i,j,k, 0, bbGetInputInitialValue() );
    } // for k
   } // for j
  } // for i
 
 
 
 
 
 
 

 


 
 
 
 
1. (Known bugs) Documentation is not generated
Even if you set the configuration for the documentation generation to "ON", no documentation is generated. The documentation is not currently available by this way.