Commit dfe39c64 authored by Claire Sery's avatar Claire Sery Committed by Emmanuel Promayon
Browse files

UPDATED WIZARD to be compatible with VTK 6 and Qt 5

parent a7a2b881
......@@ -141,8 +141,7 @@ void @ACTIONCLASSNAME@::process(@COMPONENTNAME@ * comp) {
// Creating the output image
vtkSmartPointer<vtkImageData> outputImage = vtkSmartPointer<vtkImageData>::New();
outputImage->SetDimensions(dims);
outputImage->SetScalarType(inputImage->GetScalarType());
outputImage->SetNumberOfScalarComponents(numberOfScalarComponents);
outputImage->AllocateScalars(inputImage->GetScalarType(), numberOfScalarComponents);
// Here, we arbitrarily fill the output image with the exact same data as the input image.
// Thus this action just copy the input image (an example of stupid action...).
......@@ -240,7 +239,6 @@ vtkSmartPointer<vtkImageData> @ACTIONCLASSNAME@::itkProcess(vtkSmartPointer<vtkI
resultImage->GetExtent(extent);
result->SetExtent(extent);
result->DeepCopy(resultImage);
result->Update();
// Set CamiTK progress bar back to zero (the processing filter is over)
observer->Reset();
......
......@@ -5,9 +5,6 @@
// include generated actions headers
@INCLUDEACTIONHEADERS@
// --------------- declare the extension -------------------
Q_EXPORT_PLUGIN2(@EXTENSIONCLASSNAMELOW@, @EXTENSIONCLASSNAME@);
// --------------- getActions -------------------
void @EXTENSIONCLASSNAME@::init() {
@BEGIN_REGISTERACTIONS@
......
......@@ -8,6 +8,7 @@
class @EXTENSIONCLASSNAME@ : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension);
Q_PLUGIN_METADATA(IID "fr.imag.camitk.wizardgenerated.action.@EXTENSIONCLASSNAME@")
public:
/// Constructor
......
......@@ -69,8 +69,7 @@ using namespace camitk;
vtkSmartPointer<vtkImageData> image = NULL;
image = vtkSmartPointer<vtkImageData>::New();
image->SetDimensions(3,3,3);
image->SetScalarType(VTK_UNSIGNED_CHAR);
image->SetNumberOfScalarComponents(1);
image->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
// Here, we arbitrarily fill the image data
int* dims = image->GetDimensions();
......
......@@ -13,8 +13,6 @@
using namespace camitk;
// --------------- Extension Declaration -------------------
Q_EXPORT_PLUGIN2(@EXTENSIONCLASSNAMELOW@, @EXTENSIONCLASSNAME@);
// --------------- GetFileExtensions -------------------
QStringList @EXTENSIONCLASSNAME@::getFileExtensions() const {
......
......@@ -10,6 +10,7 @@
class @EXTENSIONCLASSNAME@ : public camitk::ComponentExtension {
Q_OBJECT
Q_INTERFACES(camitk::ComponentExtension);
Q_PLUGIN_METADATA(IID "fr.imag.camitk.wizardgenerated.component.@EXTENSIONCLASSNAME@")
public:
/// Constructor
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment