[Insight-users] Question regarding creating Analyze or Raw volumes?

Ehtiati, Tina (SCR US EXT) tina.ehtiati.ext at siemens.com
Fri Jul 27 19:43:43 EDT 2007


Hello,
 
I have a question regarding using Analyze or Raw image file formats. 
 
In my program I read a test volume and compute the probability of each
voxel in the volume belonging to some 
class A. 
 
 It is important for me to keep the spatial location of the computed
probability values. So I want to store the probability values computed
for every voxel, in a new volume with the same size and spacing
information as the original volume, so l can compare the probability map
with the original image.
 
Right now, I create an output volume in Analyze format ( with the same
header information as the input volume), and store the probability
values  in it. When I open the output volume it looks alright in terms
of corresponding to the original image. But I am not sure if I am
keeping the correct numerical values for the computed probabilities in
my output volume. I compute the probabilities as double, then cast them
in float, and then write them in the output volume using SetPixel( ).  I
get a warning when running the program. Can I store float values in the
Analyze image? Do I loose any precision storing my numerical data in
Analyze format? 
 
I tried saving it as Raw image, using RawImageIO, and I get some errors
in compile time as following:
 
error C2955: 'RawImageIO' : use of class template requires template
argument list
        
error C2955: 'RawImageIO' : use of class template requires template
argument list
 
error C2514: 'itk::SmartPointer<class
itk::RawImageIO<TObjectType,`template-parameter258'> >' : class has no
constructors

error C2262: 'rawIO' : cannot be destroyed

error C2664: 'SetImageIO' : cannot convert parameter 1 from 'class
itk::SmartPointer<class itk::RawImageIO<TOb
jectType,`template-parameter258'> >' to 'class itk::ImageIOBase *'  No
user-defined-conversion operator available that can perform this
conversion, or the operator cannot be called
Error executing cl.exe.
 
I appreciate your feedback,
 
Tina 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070727/de518ce9/attachment.html


More information about the Insight-users mailing list