[Insight-users] Interesting Blob
Stephen R. Aylward
aylward at unc.edu
Sat Feb 19 16:57:28 EST 2005
Hi Kevin,
One option for saving disk space when writing images is to turn on
compression when writing a metaImage file.
Option 1: To write a compressed file, if you use FLTK for an
application, use "ITKFLFileWriter.h" from the
InsightApplications/Auxiliary directory - it extends the standard fltk
fl_file_chooser to allow a user to specify the pixel type and turn
on/off compression when writing a metaImage.
Option 2: To write a compressed file using the IO factories, you should
do something like:
ImageWriterType::Pointer writer = ImageWriterType::New();
writer->SetInput(imageP);
writer->SetFileName("test.mhd");
writer->SetUseCompression(true); // Turn on compression
writer->Update();
Regarding blobs: representing blobs as spatialObjects allows you to
define a hierarchy of blobs (or tubes, ellipses, etc), query if a point
is within the top-level blob or any object in its hierarchy, etc.
Basically you'll be able to generate an image from a spatialObject, run
marching cubes on a spatialObject, and register a spatialObject with an
image or another spatialObject. However, if you need to, for example,
blur an object, you must represent it as an image.
In theory ITK supports alternative schemes for storing images in memory
- and therefore you could derive a class from itkImage and have it do,
for example, run-length-encoded data storage in memory, but to my
knowledge, this has never been done.
Stephen
Kevin H. Hobbs wrote:
> Is it reasonable to treat blob spatial objects like images?
>
> I have slices that look like this
> http://crab-lab.zool.ohiou.edu/kevin/slice%20115%20scaled.png
>
> I'm thinking of crudely masking them like this
> http://crab-lab.zool.ohiou.edu/kevin/slice%20115%20mask.png
>
> My hope is that I can cut the file size and more importantly the memory
> used. The images are 8 times the resolution of the ones above.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list