[vtkusers] vtkImageGradient.cxx changes, why??
Asad A. Abu-Tarif
tarifa at rpi.edu
Fri Dec 7 00:36:57 EST 2001
I just forgot to paste the other changes that forced vtkImageGradient to
have
a VTK_FLOAT output, you know them :-)
Asad
__________________________________________________
/ Asad A. Abu-Tarif
\
| Computer Engineering.
|
| PhD Candidate, Rensselaer Polytechnic Institute (RPI). |
| tarifa at rpi.edu
|
\___________________________________________________/
----- Original Message -----
From: "Asad A. Abu-Tarif" <tarifa at rpi.edu>
To: "vtk User List" <vtkusers at public.kitware.com>
Sent: Friday, December 07, 2001 12:01 AM
Subject: [vtkusers] vtkImageGradient.cxx changes, why??
> Hi,
> I sent an email earlier today asking about a code that I used to run fine
> on vtk3.12 and it started giving me trouble when I upgraded to vtk3.2.
> The code basically inputs a structured points data set with scalar
> type VTK_UNSIGNED_CHAR to vtkImageGradient, vtkImageGradientMagnitude
> and then to vtkImageNonMaximumSuppression.
> The problem I'm facing is that vtkImageNonMaximumSuppression
> complains about vtkImageGradient output being of scalar type
> VTK_UNSIGNED_CHAR while the output of vtkImageGradientMagnitude
> has a VTK_FLOAT scalar type.
> The changes below that caused this (in vtk3.2 and vtk4.0) in effect limit
> the use of those classes to data set types of VTK_FLOAT.
>
> The question is, is there a good reason why we can't find the gradient of
> a data set with VTK_UNSIGNED_CHAR scalars?? Why did you make the
> change?? I know it makes sense to have vtkImageGradient always output
> a VTK_FLOAT. However, if you do that, you shouldn't require that
> vtkImageGradientMagnitude
> and vtkImageNonMaximumSuppression have the scalar type of the input
> and the output the same!!
>
> The changes still exist in vtk4.0 and hence we still can't find the
gradient
> of a data set unless its scalars are of type VTK_FLOAT!!
>
> Regards,
> Asad
>
> ================Line 104===================================
> outData->SetScalarType(VTK_FLOAT);
> ================end-Line 104================================
>
> ==========Lines 258 to 264=======================================
> // this filter expects that input is the same type as output.
> if (outData->GetScalarType() != VTK_FLOAT)
> {
> vtkErrorMacro(<< "Execute: output ScalarType, " <<
> outData->GetScalarType()
> << ", must be float\n");
> return;
> }
> ==========end-Lines 258 to 264=======================================
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list