Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 411bebbd authored by saubatn's avatar saubatn
Browse files

UPDATED Compilation & linking of CamiTK SDK ok.

parent 3f4a1208
......@@ -48,9 +48,6 @@
#include "ShowArbitraryViewer.h"
#include "ChangeLanguage.h"
// --------------- declare the extension -------------------
// Q_EXPORT_PLUGIN2(applicationaction, ApplicationActionExtension)
// --------------- constructor -------------------
ApplicationActionExtension::ApplicationActionExtension() : ActionExtension() {}
......
......@@ -28,9 +28,6 @@
#include "EditFrame.h"
#include "DisplayFrame.h"
// --------------- declare the extension -------------------
Q_EXPORT_PLUGIN2(testframeextension, TestFrameExtension);
// --------------- getActions -------------------
void TestFrameExtension::init() {
// Creating and registering the instance of MoveFrame
......
......@@ -29,7 +29,8 @@
class TestFrameExtension : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension);
Q_INTERFACES(camitk::ActionExtension)
Q_PLUGIN_METADATA(IID "fr.imag.camitk.action.editframes")
public:
/// Constructor
......
......@@ -138,7 +138,7 @@ void BoxVOI::process ( ImageComponent * comp ) {
vtkSmartPointer<vtkExtractVOI> extractVOI = vtkSmartPointer<vtkExtractVOI>::New();
//construction of new img
extractVOI->SetInput ( inputImage );
extractVOI->SetInputData ( inputImage );
//get seeds values
int x1,x2,y1,y2,z1,z2=0;
......@@ -186,7 +186,6 @@ void BoxVOI::process ( ImageComponent * comp ) {
//Update values computed
result->SetExtent ( extent );
result->DeepCopy ( resultImage );
result->Update();
// creation of the image component
QString newName;
......
......@@ -27,9 +27,6 @@
// include generated actions headers
#include "BoxVOI.h"
// --------------- declare the extension -------------------
Q_EXPORT_PLUGIN2 (boxvoiextension, BoxVOIExtension)
// --------------- getActions -------------------
void BoxVOIExtension::init() {
registerNewAction (BoxVOI);
......
......@@ -38,6 +38,7 @@
class BoxVOIExtension : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES (camitk::ActionExtension)
Q_PLUGIN_METADATA(IID "fr.imag.camitk.action.cropvolume")
public:
/// the constructor
......
......@@ -26,9 +26,6 @@
#include "ImageLutExtension.h"
#include "ImageLutAction.h"
// --------------- declare the extension -------------------
Q_EXPORT_PLUGIN2(imagelut, ImageLutExtension);
// --------------- init -------------------
void ImageLutExtension::init() {
registerNewAction(ImageLutAction);
......
......@@ -37,7 +37,8 @@
*/
class ImageLutExtension : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension);
Q_INTERFACES(camitk::ActionExtension)
Q_PLUGIN_METADATA(IID "fr.imag.camitk.action.imagelut")
public:
/// the constructor
......
......@@ -136,7 +136,7 @@ void ResampleAction::process(ImageComponent * comp) {
shiftScaleFilter->AddObserver(vtkCommand::ProgressEvent, progressCallback);
shiftScaleFilter->SetInput(inputImage);
shiftScaleFilter->SetInputData(inputImage);
// Case on the input scalar type : compute the max and min type of the output
// and also the name of the new image.
......@@ -213,7 +213,7 @@ void ResampleAction::process(ImageComponent * comp) {
double yFactor = ySize/(double)dims[1];
double zFactor = zSize/(double)dims[2];
resampleFilter->SetInput(shiftScaleFilter->GetOutput());
resampleFilter->SetInputData(shiftScaleFilter->GetOutput());
resampleFilter->SetAxisMagnificationFactor(0, xFactor);
resampleFilter->SetAxisMagnificationFactor(1, yFactor);
resampleFilter->SetAxisMagnificationFactor(2, zFactor);
......
......@@ -27,9 +27,6 @@
// include generated actions headers
#include "ResampleAction.h"
// --------------- declare the extension -------------------
Q_EXPORT_PLUGIN2(resampleextension, ResampleExtension);
// --------------- getActions -------------------
void ResampleExtension::init() {
// Creating and registering the instance of ResampleAction
......
......@@ -29,7 +29,8 @@
class ResampleExtension : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension);
Q_INTERFACES(camitk::ActionExtension)
Q_PLUGIN_METADATA(IID "fr.imag.camitk.action.imageresampling")
public:
/// Constructor
......
......@@ -27,9 +27,6 @@
// include generated actions headers
#include "MultiPicking.h"
// --------------- declare the extension -------------------
Q_EXPORT_PLUGIN2 (multipickingextension, MultiPickingExtension)
// --------------- getActions -------------------
void MultiPickingExtension::init() {
registerNewAction (MultiPicking);
......
......@@ -38,6 +38,7 @@
class MultiPickingExtension : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES (camitk::ActionExtension)
Q_PLUGIN_METADATA(IID "fr.imag.camitk.action.multipicking")
public:
/// the constructor
......
......@@ -31,10 +31,6 @@
#include <ImageComponent.h>
using namespace camitk;
// --------------- declare the extension -------------------
Q_EXPORT_PLUGIN2(pixelcolorchanger, PixelColorChangerExtension);
// -------------------- init --------------------
void PixelColorChangerExtension::init() {
registerNewAction(PixelColorChanger);
......
......@@ -32,7 +32,8 @@
class PixelColorChangerExtension : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension);
Q_INTERFACES(camitk::ActionExtension)
Q_PLUGIN_METADATA(IID "fr.imag.camitk.action.pixelcolorchanger")
public:
/// the constructor
......
......@@ -160,12 +160,10 @@ vtkSmartPointer<vtkPointSet> ImageReconstructionAction::getMarchingCubesReconstr
resampleFilter->SetAxisMagnificationFactor(2, z_magnification);
}
resampleFilter->SetInput(originalImageData);
resampleFilter->SetInputData(originalImageData);
resampleFilter->AddObserver(vtkCommand::ProgressEvent, progressCallback);
currentData = resampleFilter->GetOutput();
currentData->Update();
}
// The filter we have chosen to use to compute 3D isosurface of the volume image
......@@ -173,7 +171,7 @@ vtkSmartPointer<vtkPointSet> ImageReconstructionAction::getMarchingCubesReconstr
// create an instance of vtkMarchingCubes as it delegates to the fastest subclass
// for a particular dataset type.
vtkSmartPointer<vtkMarchingCubes> mcSurface = vtkSmartPointer<vtkMarchingCubes>::New();
mcSurface->SetInput(currentData);
mcSurface->SetInputData(currentData);
mcSurface->AddObserver(vtkCommand::ProgressEvent, progressCallback);
mcSurface->SetValue(0, isoValue);
......@@ -194,16 +192,15 @@ vtkSmartPointer<vtkPointSet> ImageReconstructionAction::getMarchingCubesReconstr
if (keepLargestConnectedComponent) {
connectivityFilter = vtkPolyDataConnectivityFilter::New();
connectivityFilter->SetInput(mcSurface->GetOutput());
connectivityFilter->SetInputData(mcSurface->GetOutput());
connectivityFilter->SetExtractionModeToLargestRegion();
normalsFilter->SetInput(connectivityFilter->GetOutput());
normalsFilter->SetInputData(connectivityFilter->GetOutput());
} else
normalsFilter->SetInput(mcSurface->GetOutput());
normalsFilter->SetInputData(mcSurface->GetOutput());
normalsFilter->AddObserver(vtkCommand::ProgressEvent, progressCallback);
vtkSmartPointer<vtkPointSet> resultPointSet = normalsFilter->GetOutput();
resultPointSet->Update();
// One can make efficient data visualization using vtkTriangleFilter
// and vtkStripper. But first, let us try without...
......
......@@ -31,10 +31,6 @@
#include <ImageComponent.h>
using namespace camitk;
// --------------- declare the extension -------------------
Q_EXPORT_PLUGIN2(reconstruction, ReconstructionExtension);
// -------------------- init --------------------
void ReconstructionExtension::init() {
registerNewAction(ImageReconstructionAction);
......
......@@ -39,7 +39,8 @@
*/
class ReconstructionExtension : public camitk::ActionExtension {
Q_OBJECT
Q_INTERFACES(camitk::ActionExtension);
Q_INTERFACES(camitk::ActionExtension)
Q_PLUGIN_METADATA(IID "fr.imag.camitk.action.reconstruction")
public:
/// the constructor
......
......@@ -294,12 +294,11 @@ Action::ApplyStatus ReorientImage::process( ImageComponent * image) {
// 3- Create a new ImageComponent with the resliced image.
vtkSmartPointer<vtkImageReslice> imageResliceFilter = vtkSmartPointer<vtkImageReslice>::New();
imageResliceFilter->SetInput(image->getImageData());
imageResliceFilter->SetInputData(image->getImageData());
imageResliceFilter->SetOutputDimensionality(3);
imageResliceFilter->SetResliceAxes(transform->GetMatrix());
vtkSmartPointer<vtkImageData> newData = imageResliceFilter->GetOutput();
newData->Update();
if (ui.noNewImageCheckBox->isChecked()) {
image->replaceImageData(newData);
......
......@@ -27,9 +27,6 @@
// include generated actions headers
#include "ReorientImage.h"
// --------------- declare the extension -------------------
Q_EXPORT_PLUGIN2 ( reorientimageextension, ReorientImageExtension );
// --------------- getActions -------------------
void ReorientImageExtension::init() {
// Creating and registering the instance of MoveFrame
......
Markdown is supported
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