[ITK] [ITK-dev] making a localbuffer from a big file

Marco Dev marco.dev.open at gmail.com
Mon Jul 27 10:59:45 EDT 2015


Hi dears,
How can to make a Local Buffer from a big file and pass it to
importimagefilter

const char * buffer
typedef ImageType::PixelType PixelType;
PixelType* pixelData = static_cast< PixelType*>( buffer );
const unsigned int totalNumberOfPixels= nx * ny;
import->SetImportPointer(pixelData,totalNumberOfPixels,importFilterWillDeleteTheInputBuffer
);
importer->Update();
return importer->GetOutput();

How can I generate Buffer when I have a big file for example  300MB and
when I cast to pixel Data
Just brings one char

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150727/a48958fc/attachment-0001.html>
-------------- next part --------------
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-developers


More information about the Community mailing list