void vvImageWarp::Update_WithDim()
{
#define TRY_TYPE(TYPE) \
- if (clitk::IsSameType<TYPE>(mInputImage->GetScalarTypeAsString())) { this->Update_WithDimAndPixelType<Dim, TYPE>(); return; }
+ if (clitk::IsSameType<TYPE>(mInputImage->GetScalarTypeAsITKString())) { this->Update_WithDimAndPixelType<Dim, TYPE>(); return; }
// TRY_TYPE(signed char);
// TRY_TYPE(uchar);
TRY_TYPE(short);
#undef TRY_TYPE
std::string list = clitk::CreateListOfTypes<char, clitk::uchar, short, ushort, int, float, double>();
- std::cerr << "Error, I don't know the type '" << mInputImage->GetScalarTypeAsString() << "' for the input image. "
+ std::cerr << "Error, I don't know the type '" << mInputImage->GetScalarTypeAsITKString() << "' for the input image. "
<< std::endl << "Known types are " << list << std::endl;
exit(0);
}
inputSpacing.resize(dimension);
inputSize.resize(dimension);
sizeMM.resize(dimension);
- pixelType = mSlicerManagers[index]->GetImage()->GetScalarTypeAsString().c_str();
+ pixelType = mSlicerManagers[index]->GetImage()->GetScalarTypeAsITKString().c_str();
for (int i = 0; i < dimension; i++) {
origin[i] = imageSelected->GetOrigin()[i];
inputSpacing[i] = imageSelected->GetSpacing()[i];
inputSpacing.resize(dimension);
inputSize.resize(dimension);
sizeMM.resize(dimension);
- pixelType = mSlicerManagers[index]->GetVF()->GetScalarTypeAsString().c_str();
+ pixelType = mSlicerManagers[index]->GetVF()->GetScalarTypeAsITKString().c_str();
for (int i = 0; i < dimension; i++) {
origin[i] = imageSelected->GetOrigin()[i];
inputSpacing[i] = imageSelected->GetSpacing()[i];
inputSpacing.resize(dimension);
inputSize.resize(dimension);
sizeMM.resize(dimension);
- pixelType = mSlicerManagers[index]->GetImage()->GetScalarTypeAsString().c_str();
+ pixelType = mSlicerManagers[index]->GetImage()->GetScalarTypeAsITKString().c_str();
for (int i = 0; i < dimension; i++) {
origin[i] = imageSelected->GetOrigin()[i];
inputSpacing[i] = imageSelected->GetSpacing()[i];
inputSpacing.resize(dimension);
inputSize.resize(dimension);
sizeMM.resize(dimension);
- pixelType = mSlicerManagers[index]->GetImage()->GetScalarTypeAsString().c_str();
+ pixelType = mSlicerManagers[index]->GetImage()->GetScalarTypeAsITKString().c_str();
for (int i = 0; i < dimension; i++) {
origin[i] = imageSelected->GetOrigin()[i];
inputSpacing[i] = imageSelected->GetSpacing()[i];
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+ ======================================================================-====*/
#include <itkImage.h>
#include <itkMaximumProjectionImageFilter.h>
void vvMaximumIntensityProjection::Compute(vvSlicerManager * slicer_manager)
{
#define TRY_TYPE(TYPE) \
-if (clitk::IsSameType<TYPE>(image->GetScalarTypeAsString())) { this->Update_WithPixelType<TYPE>(image); return; }
+ if (clitk::IsSameType<TYPE>(image->GetScalarTypeAsITKString())) { this->Update_WithPixelType<TYPE>(image); return; }
std::string list = clitk::CreateListOfTypes<short>();
vvImage::Pointer image=slicer_manager->GetSlicer(0)->GetImage();
TRY_TYPE(float);
TRY_TYPE(unsigned short);
TRY_TYPE(char);
TRY_TYPE(unsigned char);
- QMessageBox::warning(0,"Unsupported image type",QString("Error, I don't know the type")+QString(image->GetScalarTypeAsString().c_str()) +QString("' for the input image.\nKnown types are ") + QString(list.c_str()));
+ QMessageBox::warning(0,"Unsupported image type",
+ QString("Error, I don't know the type")+QString(image->GetScalarTypeAsITKString().c_str()) +QString("' for the input image.\nKnown types are ") + QString(list.c_str()));
error=true;
#undef TRY_TYPE
}
error_message="Computation of midposition is only supported for 4D image sequences.";
else if (!slicer_manager->GetVF())
error_message="A VF is required for midposition computation";
- else if (slicer_manager->GetVF()->GetScalarTypeAsString() != "float")
+ else if (slicer_manager->GetVF()->GetScalarTypeAsITKString() != "float")
error_message="Please use a vector field of type float.";
else {
VFType::ConstPointer vf = vvImageToITK<VFType>(slicer_manager->GetVF());
inv_filter->SetInput(avg_vf);
inv_filter->Update();
progress++;
- if (slicer_manager->GetImage()->GetScalarTypeAsString() == "short")
+ if (slicer_manager->GetImage()->GetScalarTypeAsITKString() == "short")
this->output=WarpRefImage<short>(inv_filter->GetOutput(),slicer_manager->GetImage(),reference_image_index);
else {
error_message="Unsupported image pixel type.";
inputs.push_back(mInput2->GetImage());
// Check input type
- if (inputs[0]->GetScalarTypeAsString() != inputs[1]->GetScalarTypeAsString()) {
+ if (inputs[0]->GetScalarTypeAsITKString() != inputs[1]->GetScalarTypeAsITKString()) {
std::cerr << "Sorry inputs should have the same pixeltype." << std::endl;
- std::cerr << "Input1 = " << inputs[0]->GetScalarTypeAsString() << std::endl;
- std::cerr << "Input2 = " << inputs[1]->GetScalarTypeAsString() << std::endl;
+ std::cerr << "Input1 = " << inputs[0]->GetScalarTypeAsITKString() << std::endl;
+ std::cerr << "Input2 = " << inputs[1]->GetScalarTypeAsITKString() << std::endl;
QApplication::restoreOverrideCursor();
QMessageBox::information(this, "Wrong image type","Sorry, could not perform operation. Please select inputs with same pixe type.");
close();
mInputFileName = mCurrentSlicerManager->GetFileName().c_str();
// Set current information
- mPixelType = mCurrentImage->GetScalarTypeAsString().c_str();
+ mPixelType = mCurrentImage->GetScalarTypeAsITKString().c_str();
//ds ComponentType = mCurrentImageGetNumberOfScalarComponents();
mDimension = mCurrentImage->GetNumberOfDimensions();
======================================================================-====*/
#ifndef VVTOOLINPUTSELECTORWIDGET_CXX
#define VVTOOLINPUTSELECTORWIDGET_CXX
+
+// vv
#include "vvToolSimpleInputSelectorWidget.h"
#include "vvSlicerManager.h"
+
+// qt
#include <QAbstractButton>
//------------------------------------------------------------------------------
spacing.append(QString("%1").arg(mCurrentImage->GetSpacing()[d-1]));
mLabelInputInfo->setText(QString("%1D %2\n%3\n%4")
.arg(d)
- .arg(mCurrentImage->GetScalarTypeAsString().c_str())
+ .arg(mCurrentImage->GetScalarTypeAsITKString().c_str())
.arg(size)
.arg(spacing));
// DD("fin");
vvImage * s = mMainWindow->GetSlicerManagers()[i]->GetImage();
if (mFilter->CheckImageType(s->GetNumberOfDimensions(),
s->GetNumberOfScalarComponents(),
- s->GetScalarTypeAsString())) {
+ s->GetScalarTypeAsITKString())) {
mSlicerManagersCompatible.push_back(mMainWindow->GetSlicerManagers()[i]);
if ((int)i == mMainWindow->GetSlicerManagerCurrentIndex()) mCurrentCompatibleIndex = j;
j++;