Hi Claudia,

as far as I remember images are dined as "binary" automatically if their grey 
value range is inside [0,1].
Would it be a great problem to just set every pixel to -1 as default? (Just as 
quick fix)

Otherwise you could try removing the MITK Properties "binary" and/or 
"segmentation" from the image.

Best,
Tobias

------------------------------------------------------------
Tobias Schwarz
DKFZ
German Cancer Research Center (Deutsches Krebsforschungszentrum)
Member of the Helmholtz Association
Division of Medical & Biological Informatics E130
Im Neuenheimer Feld 280
D-69120 Heidelberg
Phone: 49-(0)6221-42-2353
Fax: 49-(0)6221-42-2345
E-Mail: [email protected]<mailto:[email protected]>
Web: www.dkfz.de<http://www.dkfz.de>
Confidentiality Note: This message is intended only for the use of the named 
recipient(s) and may obtain confidential and/or privileged information. If you 
are not the intended recipient, please contact the sender and delete the 
message. Any unauthorized use of the information contained in this message is 
prohibited.

Von: Claudia Hänel [mailto:[email protected]]
Gesendet: Donnerstag, 30. September 2010 11:35
An: '[email protected]'
Betreff: [mitk-users] mitk::Image filles with zeros that is no binary image

Hi,

I've got the following problem. I need a time series were some timesteps are a 
dataset complete filled with zeros and some have real image data. The first 
image of the series nedds to be one with zeros. To create one I do the 
following:

        ImageType::Pointer itkImage = ImageType::New();
        itkImage->SetRegions(region);
        itkImage->SetOrigin(origin);
        itkImage->SetSpacing(spacing);
        itkImage->SetDirection(direction);
        itkImage->Allocate();
        itkImage->FillBuffer(0);
        itkImage->Update();

        zeroImage = mitk::Image::New();
        mitk::CastToMitkImage(itkImage,zeroImage);

This zeroImage is than added to a mitk::Image containing all timesteps. The 
initialization for itk and mitk image is done with a float PixelType. Somehow 
this image is automatically turned into a binary image. That causes several 
problems. One is the warning that the PixelType for binary images should be 
(un)signed char. Furthermore  the layer in the QmitkStdMultiWidget is turned 
into red.. Most important is the fact that all following images in my 
timeseries are turned into a binary images, too, even if they have different 
values.

Has anyone an idea how I can create and image with zeros that is not 
automatically defined as a binary image?
Thanks for your help in advance.

Regards,
Claudia
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to