Skip to content
Snippets Groups Projects
Commit 4b469600 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

ENH: fix vector data type for the io operation (Note that 3D vector data was NOT supported)

parent 6ab26042
Branches
Tags
No related merge requests found
......@@ -143,8 +143,9 @@ VectorDataFileReader<TOutputVectorData>
if (m_UserSpecifiedVectorDataIO == false) //try creating via factory
{
m_VectorDataIO = VectorDataIOFactory<TOutputVectorData>::CreateVectorDataIO(
m_FileName.c_str(), VectorDataIOFactory<TOutputVectorData>::ReadMode);
typedef VectorData<double, 2> IOVectorDataType; //temporary for transition
m_VectorDataIO = VectorDataIOFactory<IOVectorDataType>::CreateVectorDataIO(
m_FileName.c_str(), VectorDataIOFactory<IOVectorDataType>::ReadMode);
}
if (m_VectorDataIO.IsNull())
......
......@@ -108,9 +108,10 @@ VectorDataFileWriter<TInputVectorData>
{
itkDebugMacro(<< "Attempting factory creation of VectorDataIO for file: "
<< m_FileName);
m_VectorDataIO = VectorDataIOFactory<TInputVectorData>::CreateVectorDataIO(
typedef VectorData<double, 2> IOVectorDataType; //temporary for transition
m_VectorDataIO = VectorDataIOFactory<IOVectorDataType>::CreateVectorDataIO(
m_FileName.c_str(),
VectorDataIOFactory<TInputVectorData>::
VectorDataIOFactory<IOVectorDataType>::
WriteMode);
m_FactorySpecifiedVectorDataIO = true;
}
......@@ -122,9 +123,10 @@ VectorDataFileWriter<TInputVectorData>
<< m_FileName);
itkDebugMacro(<< "Attempting creation of VectorDataIO with a factory for file:"
<< m_FileName);
m_VectorDataIO = VectorDataIOFactory<TInputVectorData>::CreateVectorDataIO(
typedef VectorData<double, 2> IOVectorDataType; //temporary for transition
m_VectorDataIO = VectorDataIOFactory<IOVectorDataType>::CreateVectorDataIO(
m_FileName.c_str(),
VectorDataIOFactory<TInputVectorData>
VectorDataIOFactory<IOVectorDataType>
::WriteMode);
m_FactorySpecifiedVectorDataIO = true;
}
......
......@@ -63,7 +63,7 @@ public:
/** Run-time type information (and related methods). */
itkTypeMacro(VectorDataIOBase, Superclass);
itkStaticConstMacro(VDimension, unsigned int, 2);
itkStaticConstMacro(VDimension, unsigned int, 3);
typedef itk::Vector<double, VDimension> SpacingType;
typedef itk::Point<double, VDimension> PointType;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment