34 #ifndef AIMS_IO_GIFTITEXTUREFORMAT_D_H
35 #define AIMS_IO_GIFTITEXTUREFORMAT_D_H
50 const carto::AllocatorContext
65 gifti_image *gim = gifti_read_image( hdr.
name().c_str(), 1 );
72 int nda = gim->numDA, i;
74 for( i=0; i<nda; ++i )
76 giiDataArray *
da = gim->darray[i];
79 case NIFTI_INTENT_POINTSET:
81 case NIFTI_INTENT_VECTOR:
83 case NIFTI_INTENT_TRIANGLE:
90 int vnum =
da->dims[0];
92 std::vector<T> & tex = vol[ttex].data();
95 for( j=0; j<vnum; ++j )
97 tex.push_back( convertedNiftiArrayValue<T>(
da->data, j,
107 gifti_free_image( gim );
131 gifti_image *gim = hdr.giftiImageBase();
132 std::string fname = hdr.
name();
138 da_info = thdr.
getProperty(
"GIFTI_dataarrays_info" );
146 hdr.giftiAddTexture( gim, thing);
148 hdr.giftiAddExternalTextures( gim, hdrtexda, da_info );
153 da_label = thdr.
getProperty(
"GIFTI_labels_table" );
160 hdr.giftiAddLabelTable( gim );
164 gifti_write_image( gim, fname.c_str(), 1 );
166 gifti_free_image( gim );
184 catch( std::exception & e )
const aims::PythonHeader & header() const
Get the header.
void reserve(size_t size)
void setHeader(const aims::PythonHeader &hdr)
Set the header.
virtual bool read(const std::string &filename, TimeTexture< T > &vol, const carto::AllocatorContext &context, carto::Object options)
virtual bool write(const std::string &filename, const TimeTexture< T > &vol, carto::Object options=carto::none())
virtual bool getProperty(const std::string &, Object &) const
virtual bool removeProperty(const std::string &)
virtual void setProperty(const std::string &, Object)
virtual bool hasProperty(const std::string &) const
static void launchErrnoExcept(const std::string &filename="")
The class for EcatSino data write operation.