I was following the blog suggested above and was able to execute example.cpp file after making multiple modifications. Will the blog be upated?
Please find my example.cpp file which I used
#include </home/selva/include/nvidia/aiaa/client.h>
#include <iostream>
using namespace nvidia;
using namespace aiaa;
using namespace Pixel;
int main() {
try {
// Create AIAA Client object
nvidia::aiaa::Client client("http://127.0.0.1:5000/v1");
// List all models
nvidia::aiaa::ModelList modelList = client.models();
std::cout << "Models Supported by AIAA Server: " << modelList.toJson() << std::endl;
// Get matching model for organ Spleen
nvidia::aiaa::Model model = modelList.getMatchingModel("spleen");
std::cout << "Selected AIAA Model for organ 'Spleen' is: " << model.toJson(2) << std::endl;
// More API calls can follow here...
std::string inputImageFile = "image.nii.gz";
std::string outputDextr3dImageFile = "result.nii.gz";
nvidia::aiaa::PointSet point3Set = nvidia::aiaa::PointSet::fromJson("[[1,2,3]]");
int PAD = 20; // Padding boundary
Pixel::Type pt = INT;
std::string ROI_SIZE = "128x128x128";
const int SIGMA = 3;
int ret = client.dextr3D(model, point3Set, inputImageFile,pt, outputDextr3dImageFile);
int pointRatio = 10;
nvidia::aiaa::PolygonsList result = client.maskToPolygon(pointRatio, outputDextr3dImageFile);
int neighborhoodSize = 10;
nvidia::aiaa::Polygons p1 = nvidia::aiaa::Polygons::fromJson("[[10,20],[20,30]");
nvidia::aiaa::Polygons p2 = nvidia::aiaa::Polygons::fromJson("[[10,20],[21,31]]");
int polygonIndex = 0;
int vertexIndex = 1;
std::string input2DImageFile = "image_slice_2D.png";
std::string output2DImageFile = "updated_slice_2D.png";
// fixPolygon():: Call Fix Polygon with new Polygon Points
nvidia::aiaa::Polygons results = client.fixPolygon(p1, p2, neighborhoodSize, polygonIndex, vertexIndex,
input2DImageFile, output2DImageFile);
} catch (nvidia::aiaa::exception& e) {
std::cerr << "nvidia::aiaa::exception => nvidia.aiaa.error." << e.id << "; description: " << e.name()<< std::endl;
} catch (nvidia::aiaa::exception& e) {
std::cerr << "nvidia::aiaa::exception => nvidia.aiaa.error." << e.id << "; description: " << e.name() << std::endl;
}
return 0;
}
Though I was able to successfully compile and execute after fixing some issues with example.cpp, I also had the below error as shown in the attachment. As I am new to image processing and analysis, trying to learn.