[ITK-users] [ITK-Users] Multiple Inputs of different types
Michael Pinkert
mpinkert at wisc.edu
Wed Jan 21 14:44:53 EST 2015
Hi all,
I'm trying to develop a Vector Connected Component Filter/pipeline that
checks the direction of the eigenvector as well as whether or not the pixels
are touching. I am doing this by modifying the three following filters that
build off of each other.
itkSymmetricEigenAnalysisImageFilter.h so that it returns the largest
eigenvector rather than the eigenvalues
itkBinaryImageToLabelMapFilter.h to check that the eigenvectors for each
pixel are aligned after checking that they are touching
itkBinaryShapeKeepNObjectsImageFilter.h to simply pass the hessian into the
LabelMapFilter.
The problem is that I need to include a image that contains the hessian for
each pixel along with the normal input image, so that the KeepNObjects
filter can send it down to the LabelMapFilter and then to the
EigenAnalysisFilter. However, none of the methods I have tried to get the
hessian image into the filters work, and I do not understand how to allow
for this second input.
So far I have tried modifying the template as follows
class BinaryVectorConnectedShapeKeepNObjectsImageFilter:
public ImageToImageFilter< TInputImage, THessianImage, TInputImage >
Combined with using the SetInputX functions as seen in other filters as
follows
void SetInput1(const TInputImage *image1)
{
this->SetNthInput(0, const_cast <TInputImage * >( image1));
}
This produces an error of "Too many template arguments".
I have tried to make the hessian image a member variable and to use the
normal Get/Set macros, but that also produces errors of being unable to
convert between types when the function is used in main.
I have also tried to simply define a new function to set the Hessian, like
such
void SetHessian(HessianImageType::Pointer hessianImage)
{
m_HessianImage = hessianImage;
}
And alternate versions with different input arguments, which include "const
HessianImage *hessianImage". These also run into errors where it won't
covert between types when I use the function in main.
I have looked around at different filters that have multiple inputs, and all
of them seem to be based on Functors/the BinaryFunctorImageFilter, but I am
very unsure of how I would go about modifying the filters, and have very
little experience with Functors. Also, the arguments for the other filters
based on Functors all seem to include an operator as a fourth argument, and
I do not want to perform any operations on the Hessian until the
SymmetricAnalysis filter.
Does anyone know how I could set this second input simply, or could point me
to an example that does similar?
Best regards,
Michael Pinkert
--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/ITK-Users-Multiple-Inputs-of-different-types-tp7586810.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list