X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvFromITK.h;h=69e41a6da39cb4b76f49938d01baf3cb0f7fa3fa;hb=8dc75d1449323b08bf7378cded6f0bec24b2016f;hp=30e1bfe6325c3205a6cb47dee118483ce8c120a0;hpb=6194949c0beb1589904e22381b9aba1bbface172;p=clitk.git diff --git a/common/vvFromITK.h b/common/vvFromITK.h index 30e1bfe..69e41a6 100644 --- a/common/vvFromITK.h +++ b/common/vvFromITK.h @@ -58,6 +58,7 @@ static inline void ReadTimeSequence (vvImage::Pointer& vv_image, typename itk::I filter->SetInput(input); filter->ReleaseDataFlagOn(); vv_image->AddItkImage(filter->GetOutput()); + vv_image->ComputeScalarRangeBase(filter->GetOutput()); } vv_image->SetTimeSpacing(input->GetSpacing()[Dim-1]); vv_image->SetTimeOrigin(input->GetOrigin()[Dim-1]); @@ -73,9 +74,10 @@ struct vvImageFromITK_Impl if (time_sequence) //The time sequence case: create a series of VTK images ReadTimeSequence(vv_image, input, time_sequence); - else //Dim == 1,2,3 and not time_sequence + else { //Dim == 1,2,3 and not time_sequence vv_image->AddItkImage(input); - + vv_image->ComputeScalarRangeBase(input); + } return vv_image; } };