Hi,
thank you! Modifying the properties worked out for me.
Claudia
Zitat von Marco Nolden <[email protected]>:
> Hi Claudia,
>
> the rendering of the image is controlled by the "binary" property of
> the DataNode. When you call SetData on the node, SetDefaultProperties
> is executed which determines whether the image is binary or not and
> sets different properties (binary, color etc., look at the property
> list in the data manager). You can modify these properties after
> calling SetData and the rendering will be "normal" again. Look at the
> mitkImageMapperGL2D::SetDefaultProperties implementation for details:
>
> http://docs.mitk.org/nightly-qt4/classmitk_1_1ImageMapperGL2D.html#3dd180f0246adee10fcb51cbc6e5f752
>
> Marco
>
> On 09/30/2010 11:34 AM, Claudia Hänel wrote:
>> 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