Commit 48d58879 authored by Sebastien Jourdain's avatar Sebastien Jourdain

Move IO/Web to IO/Export with some renaming

parent b1dffbe3
......@@ -3,15 +3,17 @@ set(Module_SRCS
vtkGL2PSExporter.cxx
vtkGLTFExporter.cxx
vtkIVExporter.cxx
vtkJSONDataSetWriter.cxx
vtkJSONSceneExporter.cxx
vtkOBJExporter.cxx
vtkOOGLExporter.cxx
vtkPOVExporter.cxx
vtkRIBExporter.cxx
vtkRIBLight.cxx
vtkRIBProperty.cxx
vtkSingleVTPExporter.cxx
vtkSVGContextDevice2D.cxx
vtkSVGExporter.cxx
vtkSingleVTPExporter.cxx
vtkVRMLExporter.cxx
vtkX3D.cxx
vtkX3DExporter.cxx
......
/*=========================================================================
Program: Visualization Toolkit
Module: vtkHttpDataSetWriter.cxx
Module: vtkJSONDataSetWriter.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,12 +12,12 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkHttpDataSetWriter.h"
#include "vtkJSONDataSetWriter.h"
#include "vtkCellArray.h"
#include "vtkCellData.h"
#include "vtkDataArrayHelper.h"
#include "vtkDataArray.h"
#include "vtkDataSet.h"
#include "vtkDataSetAttributes.h"
#include "vtkImageData.h"
......@@ -25,44 +25,51 @@
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
#include "vtkPolyData.h"
#include "vtkSmartPointer.h"
#include "vtksys/MD5.h"
#include "vtksys/SystemTools.hxx"
#include "vtkTypeInt32Array.h"
#include "vtkTypeInt64Array.h"
#include "vtkTypeUInt32Array.h"
#include "vtkTypeUInt64Array.h"
#include <fstream>
#include <sstream>
#include <string>
vtkStandardNewMacro(vtkHttpDataSetWriter);
vtkStandardNewMacro(vtkJSONDataSetWriter);
// ----------------------------------------------------------------------------
vtkHttpDataSetWriter::vtkHttpDataSetWriter()
vtkJSONDataSetWriter::vtkJSONDataSetWriter()
{
this->FileName = nullptr;
}
// ----------------------------------------------------------------------------
vtkHttpDataSetWriter::~vtkHttpDataSetWriter()
vtkJSONDataSetWriter::~vtkJSONDataSetWriter()
{
delete[] this->FileName;
}
// ----------------------------------------------------------------------------
vtkDataSet* vtkHttpDataSetWriter::GetInput()
vtkDataSet* vtkJSONDataSetWriter::GetInput()
{
return vtkDataSet::SafeDownCast(this->Superclass::GetInput());
}
// ----------------------------------------------------------------------------
vtkDataSet* vtkHttpDataSetWriter::GetInput(int port)
vtkDataSet* vtkJSONDataSetWriter::GetInput(int port)
{
return vtkDataSet::SafeDownCast(this->Superclass::GetInput(port));
}
// ----------------------------------------------------------------------------
std::string vtkHttpDataSetWriter::WriteDataSetAttributes(
std::string vtkJSONDataSetWriter::WriteDataSetAttributes(
vtkDataSetAttributes* fields, const char* className)
{
vtkIdType activeTCoords = -1;
......@@ -117,14 +124,14 @@ std::string vtkHttpDataSetWriter::WriteDataSetAttributes(
// ----------------------------------------------------------------------------
std::string vtkHttpDataSetWriter::WriteArray(
std::string vtkJSONDataSetWriter::WriteArray(
vtkDataArray* array, const char* className, const char* arrayName)
{
bool needConvert;
std::string id = vtkDataArrayHelper::GetUID(array, needConvert);
std::string id = vtkJSONDataSetWriter::GetUID(array, needConvert);
std::stringstream arrayPath;
arrayPath << this->FileName << "/data/" << id.c_str();
bool success = vtkDataArrayHelper::WriteArray(array, arrayPath.str().c_str());
bool success = vtkJSONDataSetWriter::WriteArrayAsRAW(array, arrayPath.str().c_str());
if (!success)
{
......@@ -137,7 +144,7 @@ std::string vtkHttpDataSetWriter::WriteArray(
<< INDENT << " \"vtkClass\": \"" << className << "\",\n"
<< INDENT << " \"name\": \"" << (arrayName == nullptr ? array->GetName() : arrayName) << "\",\n"
<< INDENT << " \"numberOfComponents\": " << array->GetNumberOfComponents() << ",\n"
<< INDENT << " \"dataType\": \"" << vtkDataArrayHelper::GetShortType(array, needConvert) << "Array\",\n"
<< INDENT << " \"dataType\": \"" << vtkJSONDataSetWriter::GetShortType(array, needConvert) << "Array\",\n"
<< INDENT << " \"ref\": {\n"
<< INDENT << " \"encode\": \"LittleEndian\",\n"
<< INDENT << " \"basepath\": \"data\",\n"
......@@ -151,7 +158,7 @@ std::string vtkHttpDataSetWriter::WriteArray(
// ----------------------------------------------------------------------------
void vtkHttpDataSetWriter::WriteData()
void vtkJSONDataSetWriter::WriteData()
{
vtkDataSet* ds = this->GetInput();
vtkImageData* imageData = vtkImageData::SafeDownCast(ds);
......@@ -266,15 +273,179 @@ void vtkHttpDataSetWriter::WriteData()
// ----------------------------------------------------------------------------
void vtkHttpDataSetWriter::PrintSelf(ostream& os, vtkIndent indent)
void vtkJSONDataSetWriter::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
// ----------------------------------------------------------------------------
int vtkHttpDataSetWriter::FillInputPortInformation(int, vtkInformation* info)
int vtkJSONDataSetWriter::FillInputPortInformation(int, vtkInformation* info)
{
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkDataSet");
return 1;
}
// ----------------------------------------------------------------------------
// Static helper functions
// ----------------------------------------------------------------------------
void vtkJSONDataSetWriter::ComputeMD5(const unsigned char* content, int size, std::string& hash)
{
unsigned char digest[16];
char md5Hash[33];
md5Hash[32] = '\0';
vtksysMD5* md5 = vtksysMD5_New();
vtksysMD5_Initialize(md5);
vtksysMD5_Append(md5, content, size);
vtksysMD5_Finalize(md5, digest);
vtksysMD5_DigestToHex(digest, md5Hash);
vtksysMD5_Delete(md5);
hash = md5Hash;
}
// ----------------------------------------------------------------------------
std::string vtkJSONDataSetWriter::GetShortType(vtkDataArray* input, bool& needConversion)
{
needConversion = false;
std::stringstream ss;
switch (input->GetDataType())
{
case VTK_UNSIGNED_CHAR:
case VTK_UNSIGNED_SHORT:
case VTK_UNSIGNED_INT:
case VTK_UNSIGNED_LONG:
case VTK_UNSIGNED_LONG_LONG:
ss << "Uint";
if (input->GetDataTypeSize() <= 4)
{
ss << (input->GetDataTypeSize() * 8);
}
else
{
needConversion = true;
ss << "32";
}
break;
case VTK_CHAR:
case VTK_SIGNED_CHAR:
case VTK_SHORT:
case VTK_INT:
case VTK_LONG:
case VTK_LONG_LONG:
case VTK_ID_TYPE:
ss << "Int";
if (input->GetDataTypeSize() <= 4)
{
ss << (input->GetDataTypeSize() * 8);
}
else
{
needConversion = true;
ss << "32";
}
break;
case VTK_FLOAT:
case VTK_DOUBLE:
ss << "Float";
ss << (input->GetDataTypeSize() * 8);
break;
case VTK_BIT:
case VTK_STRING:
case VTK_UNICODE_STRING:
case VTK_VARIANT:
default:
ss << "xxx";
break;
}
return ss.str();
}
// ----------------------------------------------------------------------------
std::string vtkJSONDataSetWriter::GetUID(vtkDataArray* input, bool& needConversion)
{
const unsigned char* content = (const unsigned char*)input->GetVoidPointer(0);
int size = input->GetNumberOfValues() * input->GetDataTypeSize();
std::string hash;
vtkJSONDataSetWriter::ComputeMD5(content, size, hash);
std::stringstream ss;
ss << vtkJSONDataSetWriter::GetShortType(input, needConversion) << "_" << input->GetNumberOfValues()
<< "-" << hash.c_str();
return ss.str();
}
// ----------------------------------------------------------------------------
bool vtkJSONDataSetWriter::WriteArrayAsRAW(vtkDataArray* input, const char* filePath)
{
if (input->GetDataTypeSize() == 0)
{
// Skip BIT arrays
return false;
}
// Make sure parent directory exist
vtksys::SystemTools::MakeDirectory(vtksys::SystemTools::GetParentDirectory(filePath));
// Check if we need to convert the (u)int64 to (u)int32
vtkSmartPointer<vtkDataArray> arrayToWrite = input;
vtkIdType arraySize = input->GetNumberOfTuples() * input->GetNumberOfComponents();
switch (input->GetDataType())
{
case VTK_UNSIGNED_CHAR:
case VTK_UNSIGNED_LONG:
case VTK_UNSIGNED_LONG_LONG:
if (input->GetDataTypeSize() > 4)
{
vtkNew<vtkTypeUInt64Array> srcUInt64;
srcUInt64->ShallowCopy(input);
vtkNew<vtkTypeUInt32Array> uint32;
uint32->SetNumberOfValues(arraySize);
uint32->SetName(input->GetName());
for (vtkIdType i = 0; i < arraySize; i++)
{
uint32->SetValue(i, srcUInt64->GetValue(i));
}
arrayToWrite = uint32;
}
break;
case VTK_LONG:
case VTK_LONG_LONG:
case VTK_ID_TYPE:
if (input->GetDataTypeSize() > 4)
{
vtkNew<vtkTypeInt64Array> srcInt64;
srcInt64->ShallowCopy(input);
vtkNew<vtkTypeInt32Array> int32;
int32->SetNumberOfTuples(arraySize);
int32->SetName(input->GetName());
for (vtkIdType i = 0; i < arraySize; i++)
{
int32->SetValue(i, srcInt64->GetValue(i));
}
arrayToWrite = int32;
}
break;
}
const char* content = (const char*)arrayToWrite->GetVoidPointer(0);
size_t size = arrayToWrite->GetNumberOfValues() * arrayToWrite->GetDataTypeSize();
ofstream file;
file.open(filePath, ios::out | ios::binary);
file.write(content, size);
file.close();
return true;
}
/*=========================================================================
Program: Visualization Toolkit
Module: vtkHttpDataSetWriter.h
Module: vtkJSONDataSetWriter.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -13,13 +13,13 @@
=========================================================================*/
/**
* @class vtkHttpDataSetWriter
* @class vtkJSONDataSetWriter
* @brief write vtkDataSet into a directory with a JSON meta file along
* with all the binary arrays written as standalone binary files.
* The generated format can be used by vtk.js using the reader below
* https://kitware.github.io/vtk-js/examples/HttpDataSetReader.html
*
* vtkHttpDataSetWriter writes vtkImageData / vtkPolyData into a set of files
* vtkJSONDataSetWriter writes vtkImageData / vtkPolyData into a set of files
* representing each arrays that compose the dataset along with a JSON meta file
* that describe what they are and how they should be assembled into an actual vtkDataSet.
*
......@@ -29,10 +29,10 @@
* handle endianness.
*/
#ifndef vtkHttpDataSetWriter_h
#define vtkHttpDataSetWriter_h
#ifndef vtkJSONDataSetWriter_h
#define vtkJSONDataSetWriter_h
#include "vtkIOWebModule.h" // For export macro
#include "vtkIOExportModule.h" // For export macro
#include "vtkWriter.h"
#include <string> // For string parameter
......@@ -41,11 +41,51 @@ class vtkDataSet;
class vtkDataArray;
class vtkDataSetAttributes;
class VTKIOWEB_EXPORT vtkHttpDataSetWriter : public vtkWriter
class VTKIOEXPORT_EXPORT vtkJSONDataSetWriter : public vtkWriter
{
public:
static vtkHttpDataSetWriter* New();
vtkTypeMacro(vtkHttpDataSetWriter, vtkWriter);
//@{
/**
* Compute a MD5 digest of a void/(const unsigned char) pointer to compute a
* string hash
*/
static void ComputeMD5(const unsigned char* content, int size, std::string& hash);
//@}
//@{
/**
* Compute the target JavaScript typed array name for the given vtkDataArray
* (Uin8, Uint16, Uin32, Int8, Int16, Int32, Float32, Float64) or
* "xxx" if no match found
*
* Since Uint64 and Int64 does not exist in JavaScript, the needConversion
* argument will be set to true and Uint32/Int32 will be returned instead.
*/
static std::string GetShortType(vtkDataArray* input, bool& needConversion);
//@}
//@{
/**
* Return a Unique identifier for that array
* (i.e.: Float32_356_13f880891af7b77262c49cae09a41e28 )
*/
static std::string GetUID(vtkDataArray*, bool& needConversion);
//@}
//@{
/**
* Write the content of the vtkDataArray to disk based on the filePath
* provided without any extra information. Just the raw data will be
* written.
*
* If vtkDataArray is a Uint64 or Int64, the data will be converted
* to Uint32 or Int32 before being written.
*/
static bool WriteArrayAsRAW(vtkDataArray*, const char* filePath);
//@}
static vtkJSONDataSetWriter* New();
vtkTypeMacro(vtkJSONDataSetWriter, vtkWriter);
void PrintSelf(ostream& os, vtkIndent indent) override;
//@{
......@@ -68,8 +108,8 @@ public:
bool IsDataSetValid() { return this->ValidDataSet; }
protected:
vtkHttpDataSetWriter();
~vtkHttpDataSetWriter() override;
vtkJSONDataSetWriter();
~vtkJSONDataSetWriter() override;
void WriteData() override;
std::string WriteArray(vtkDataArray*, const char* className, const char* arrayName = nullptr);
......@@ -81,8 +121,8 @@ protected:
int FillInputPortInformation(int port, vtkInformation* info) override;
private:
vtkHttpDataSetWriter(const vtkHttpDataSetWriter&) = delete;
void operator=(const vtkHttpDataSetWriter&) = delete;
vtkJSONDataSetWriter(const vtkJSONDataSetWriter&) = delete;
void operator=(const vtkJSONDataSetWriter&) = delete;
};
#endif
/*=========================================================================
Program: Visualization Toolkit
Module: vtkHttpSceneExporter.cxx
Program: VisualizationJSONlkit
Module: vtkJSONSceneExporter.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -12,7 +12,7 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkHttpSceneExporter.h"
#include "vtkJSONSceneExporter.h"
#include "vtkCamera.h"
#include "vtkCompositeDataIterator.h"
......@@ -21,16 +21,16 @@
#include "vtkDataSet.h"
#include "vtkDiscretizableColorTransferFunction.h"
#include "vtkExporter.h"
#include "vtkHttpDataSetWriter.h"
#include "vtkJSONDataSetWriter.h"
#include "vtkMapper.h"
#include "vtkNew.h"
#include "vtkObjectFactory.h"
#include "vtkProp.h"
#include "vtkPropCollection.h"
#include "vtkProperty.h"
#include "vtkRenderWindow.h"
#include "vtkRenderer.h"
#include "vtkRendererCollection.h"
#include "vtkRenderWindow.h"
#include "vtkScalarsToColors.h"
#include "vtkSmartPointer.h"
#include "vtksys/SystemTools.hxx"
......@@ -39,25 +39,25 @@
#include <sstream>
#include <string>
vtkStandardNewMacro(vtkHttpSceneExporter);
vtkStandardNewMacro(vtkJSONSceneExporter);
// ----------------------------------------------------------------------------
vtkHttpSceneExporter::vtkHttpSceneExporter()
vtkJSONSceneExporter::vtkJSONSceneExporter()
{
this->FileName = nullptr;
}
// ----------------------------------------------------------------------------
vtkHttpSceneExporter::~vtkHttpSceneExporter()
vtkJSONSceneExporter::~vtkJSONSceneExporter()
{
delete[] this->FileName;
}
// ----------------------------------------------------------------------------
void vtkHttpSceneExporter::WriteDataObject(ostream& os, vtkDataObject* dataObject, vtkActor* actor)
void vtkJSONSceneExporter::WriteDataObject(ostream& os, vtkDataObject* dataObject, vtkActor* actor)
{
// Skip if nothing to process
if (dataObject == nullptr)
......@@ -95,7 +95,7 @@ void vtkHttpSceneExporter::WriteDataObject(ostream& os, vtkDataObject* dataObjec
// ----------------------------------------------------------------------------
std::string vtkHttpSceneExporter::ExtractRenderingSetup(vtkActor* actor)
std::string vtkJSONSceneExporter::ExtractRenderingSetup(vtkActor* actor)
{
vtkMapper* mapper = actor->GetMapper();
// int scalarVisibility = mapper->GetScalarVisibility();
......@@ -163,7 +163,7 @@ std::string vtkHttpSceneExporter::ExtractRenderingSetup(vtkActor* actor)
// ----------------------------------------------------------------------------
std::string vtkHttpSceneExporter::WriteDataSet(vtkDataSet* dataset, const char* addOnMeta = nullptr)
std::string vtkJSONSceneExporter::WriteDataSet(vtkDataSet* dataset, const char* addOnMeta = nullptr)
{
if (!dataset)
{
......@@ -173,7 +173,7 @@ std::string vtkHttpSceneExporter::WriteDataSet(vtkDataSet* dataset, const char*
std::stringstream dsPath;
dsPath << this->FileName << "/" << (++this->DatasetCount);
vtkNew<vtkHttpDataSetWriter> dsWriter;
vtkNew<vtkJSONDataSetWriter> dsWriter;
dsWriter->SetInputData(dataset);
dsWriter->SetFileName(dsPath.str().c_str());
dsWriter->Write();
......@@ -211,7 +211,7 @@ std::string vtkHttpSceneExporter::WriteDataSet(vtkDataSet* dataset, const char*
// ----------------------------------------------------------------------------
void vtkHttpSceneExporter::WriteLookupTable(const char* name, vtkScalarsToColors* lookupTable)
void vtkJSONSceneExporter::WriteLookupTable(const char* name, vtkScalarsToColors* lookupTable)
{
if (lookupTable == nullptr)
{
......@@ -266,7 +266,7 @@ void vtkHttpSceneExporter::WriteLookupTable(const char* name, vtkScalarsToColors
// ----------------------------------------------------------------------------
void vtkHttpSceneExporter::WriteData()
void vtkJSONSceneExporter::WriteData()
{
this->DatasetCount = 0;
......@@ -318,6 +318,7 @@ void vtkHttpSceneExporter::WriteData()
std::stringstream sceneJsonFile;
sceneJsonFile << "{\n"
<< " \"version\": 1.0,\n"
<< " \"background\": [" << renderer->GetBackground()[0] << ", "
<< renderer->GetBackground()[1] << ", " << renderer->GetBackground()[2] << "],\n"
<< " \"camera\": {\n"
......@@ -357,7 +358,7 @@ void vtkHttpSceneExporter::WriteData()
// ----------------------------------------------------------------------------
void vtkHttpSceneExporter::PrintSelf(ostream& os, vtkIndent indent)
void vtkJSONSceneExporter::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
/*=========================================================================
Program: Visualization Toolkit
Module: vtkHttpSceneExporter.h
Module: vtkJSONSceneExporter.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
......@@ -13,7 +13,7 @@
=========================================================================*/
/**
* @class vtkHttpSceneExporter
* @class vtkJSONSceneExporter
* @brief Export the content of a vtkRenderWindow into a directory with
* a JSON meta file describing the scene along with the http datasets
*
......@@ -22,11 +22,11 @@
* handle endianness.
*/
#ifndef vtkHttpSceneExporter_h
#define vtkHttpSceneExporter_h
#ifndef vtkJSONSceneExporter_h
#define vtkJSONSceneExporter_h
#include "vtkExporter.h"
#include "vtkIOWebModule.h" // For export macro
#include "vtkIOExportModule.h" // For export macro
#include <map> // For string parameter
#include <string> // For string parameter
......@@ -36,11 +36,11 @@ class vtkDataObject;
class vtkDataSet;
class vtkScalarsToColors;
class VTKIOWEB_EXPORT vtkHttpSceneExporter : public vtkExporter
class VTKIOEXPORT_EXPORT vtkJSONSceneExporter : public vtkExporter
{
public:
static vtkHttpSceneExporter* New();
vtkTypeMacro(vtkHttpSceneExporter, vtkExporter);
static vtkJSONSceneExporter* New();
vtkTypeMacro(vtkJSONSceneExporter, vtkExporter);
void PrintSelf(ostream& os, vtkIndent indent) override;
//@{
......@@ -53,8 +53,8 @@ public:
//@}
protected:
vtkHttpSceneExporter();
~vtkHttpSceneExporter() override;
vtkJSONSceneExporter();
~vtkJSONSceneExporter() override;
void WriteDataObject(ostream& os, vtkDataObject* dataObject, vtkActor* actor);
std::string ExtractRenderingSetup(vtkActor* actor);
......@@ -68,8 +68,8 @@ protected:
std::map<std::string, std::string> LookupTables;
private:
vtkHttpSceneExporter(const vtkHttpSceneExporter&) = delete;
void operator=(const vtkHttpSceneExporter&) = delete;
vtkJSONSceneExporter(const vtkJSONSceneExporter&) = delete;
void operator=(const vtkJSONSceneExporter&) = delete;
};
#endif
set(Module_SRCS
vtkDataArrayHelper.cxx
vtkHttpDataSetWriter.cxx
vtkHttpSceneExporter.cxx
)
vtk_module_library(
vtkIOWeb
${Module_SRCS}
)
vtk_module(vtkIOWeb
GROUPS
Rendering
KIT
vtkIO
DEPENDS
vtkIOCore
vtkIOExport
PRIVATE_DEPENDS
vtkCommonCore
vtkCommonDataModel
vtkCommonMisc
vtksys
)
/*=========================================================================
Program: Visualization Toolkit
Module: vtkDataArrayHelper.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkDataArrayHelper.h"
#include "vtkDataArray.h"
#include "vtkSmartPointer.h"
#include "vtkTypeInt32Array.h"
#include "vtkTypeInt64Array.h"
#include "vtkTypeUInt32Array.h"
#include "vtkTypeUInt64Array.h"
#include "vtksys/MD5.h"
#include "vtksys/SystemTools.hxx"
#include <fstream>
#include <sstream>
#include <string>
// ----------------------------------------------------------------------------
vtkDataArrayHelper::vtkDataArrayHelper()
{
}
// ----------------------------------------------------------------------------
vtkDataArrayHelper::~vtkDataArrayHelper()
{
}
// ----------------------------------------------------------------------------
void vtkDataArrayHelper::ComputeMD5(const unsigned char* content, int size, std::string& hash)
{
unsigned char digest[16];
char md5Hash[33];
md5Hash[32] = '\0';
vtksysMD5* md5 = vtksysMD5_New();
vtksysMD5_Initialize(md5);
vtksysMD5_Append(md5, content, size);
vtksysMD5_Finalize(md5, digest);
vtksysMD5_DigestToHex(digest, md5Hash);
vtksysMD5_Delete(md5);
hash = md5Hash;
}
// ----------------------------------------------------------------------------
std::string vtkDataArrayHelper::GetShortType(vtkDataArray* input, bool& needConversion)
{
needConversion = false;
std::stringstream ss;
switch (input->GetDataType())
{
case VTK_UNSIGNED_CHAR:
case VTK_UNSIGNED_SHORT:
case VTK_UNSIGNED_INT:
case VTK_UNSIGNED_LONG:
case VTK_UNSIGNED_LONG_LONG:
ss << "Uint";
if (input->GetDataTypeSize() <= 4)
{
ss << (input->GetDataTypeSize() * 8);
}
else
{
needConversion = true;
ss << "32";
}
break;
case VTK_CHAR:
case VTK_SIGNED_CHAR:
case VTK_SHORT:
case VTK_INT:
case VTK_LONG:
case VTK_LONG_LONG:
case VTK_ID_TYPE:
ss << "Int";
if (input->GetDataTypeSize() <= 4)
{
ss << (input->GetDataTypeSize() * 8);