<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0" data-gramm_id="e57b2f94-5b8e-2858-2f3f-04d9884c1ced" data-gramm="true" spellcheck="false" data-gramm_editor="true" contenteditable="true">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear all,<br>
<br>
I would like to use <g class="gr_ gr_31 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace" id="31" data-gr-id="31">
the </g><g class="gr_ gr_36 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling only-del replaceWithoutSep" id="36" data-gr-id="36"><g class="gr_ gr_31 gr-alert gr_spell gr_inline_cards gr_disable_anim_appear ContextualSpelling ins-del multiReplace" id="31" data-gr-id="31">the</g>
first</g> order texture features of ITKTextureFeatures (https://github.com/InsightSoftwareConsortium/ITKTextureFeatures) in Python. Thanks to J.Vimort et al. for the great work!<br>
Since the <g class="gr_ gr_131 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="131" data-gr-id="131">
coocurrence</g> and run length features are already wrapped, I tried to take these as an example and wrap it myself (I'm very new to this).<br>
<br>
I would appreciate any help to point me <g class="gr_ gr_271 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" id="271" data-gr-id="271">
into</g> the right direction.<br>
<br>
That's what I've tried:<br>
- Created a .wrap file "itkFirstOrderTextureFeaturesImageFilter.wrap" and put it in the "/Modules/External/ITKTextureFeatures/wrapping" directory (see below)<br>
- Added "itkFirstOrderTextureFeaturesImageFilter" to the CMakeLists.txt in the "/Modules/External/ITKTextureFeatures/wrapping" directory, now looking like this:<br>
<br>
itk_wrap_module(TextureFeatures)<br>
<br>
set(WRAPPER_SUBMODULE_ORDER<br>
itkCoocurrenceTextureFeaturesImageFilter<br>
itkRunLengthTextureFeaturesImageFilter<br>
itkFirstOrderTextureFeaturesImageFilter)<br>
<br>
itk_auto_load_submodules()<br>
itk_end_wrap_module()<br>
<br>
This gives me the folowwing error for every datatype I set to wrap:<br>
>> /home/yannick/Projects/PhD/ITK/ITK/bin/Wrapping/itkFirstOrderTextureFeaturesImageFilter.cxx:79:18: error: too few template arguments for class template 'FirstOrderTextureFeaturesImageFilter'<br>
>> typedef itk::FirstOrderTextureFeaturesImageFilter< itk::Image< signed short,2 >, itk::Image<itk::Vector<float,8>,2> > itkFirstOrderTextureFeaturesImageFilterISS2IVF82;<br>
^<br>
>>/home/yannick/Projects/PhD/ITK/ITK/Modules/External/ITKTextureFeatures/include/itkFirstOrderTextureFeaturesImageFilter.h:52:27: note: template is declared here<br>
>>class ITK_TEMPLATE_EXPORT FirstOrderTextureFeaturesImageFilter:<br>
<br>
Since the it's working if I use it in C++, I don't see where template arguments are missing.<br>
<br>
Best and thank you,<br>
<br>
Yannick<br>
<br>
That's my .wrap-file:<br>
------------<br>
set(OutputVectorDim 8)<br>
itk_wrap_class("itk::FixedArray")<br>
itk_wrap_template("${ITKM_F}${OutputVectorDim}" "${ITKT_F},${OutputVectorDim}")<br>
itk_end_wrap_class()<br>
<br>
itk_wrap_class("itk::Vector")<br>
itk_wrap_template("${ITKM_F}${OutputVectorDim}" "${ITKT_F},${OutputVectorDim}")<br>
itk_end_wrap_class()<br>
<br>
WRAP_TYPE("itk::Image" "I" "itkImage.h")<br>
foreach(d ${ITK_WRAP_IMAGE_DIMS})<br>
ADD_TEMPLATE("V${ITKM_F}${OutputVectorDim}${d}" "itk::Vector<${ITKT_F},${OutputVectorDim}>,${d}")<br>
endforeach()<br>
END_WRAP_TYPE()<br>
<br>
itk_wrap_class("itk::Image" POINTER)<br>
foreach(d ${ITK_WRAP_IMAGE_DIMS})<br>
itk_wrap_template("V${ITKM_F}${OutputVectorDim}${d}" "itk::Vector<${ITKT_F},${OutputVectorDim}>,${d}")<br>
endforeach()<br>
itk_end_wrap_class()<br>
<br>
itk_wrap_class("itk::ImageSource" POINTER)<br>
foreach(d ${ITK_WRAP_IMAGE_DIMS})<br>
itk_wrap_template("IV${ITKM_F}${OutputVectorDim}${d}" "itk::Image<itk::Vector<${ITKT_F},${OutputVectorDim}>,${d}>")<br>
endforeach()<br>
itk_end_wrap_class()<br>
<br>
itk_wrap_class("itk::ImageToImageFilter" POINTER)<br>
foreach(d ${ITK_WRAP_IMAGE_DIMS})<br>
foreach(t ${WRAP_ITK_INT})<br>
itk_wrap_template("${ITKM_I${t}${d}}IV${ITKM_F}${OutputVectorDim}${d}"<br>
"${ITKT_I${t}${d}}, itk::Image<itk::Vector<${ITKT_F},${OutputVectorDim}>,${d}>")<br>
endforeach()<br>
endforeach()<br>
itk_end_wrap_class()<br>
<br>
itk_wrap_simple_class("itk::ImageIOBase" )<br>
<br>
itk_wrap_class("itk::ImageFileReader" POINTER)<br>
foreach(d ${ITK_WRAP_IMAGE_DIMS})<br>
itk_wrap_template("IV${ITKM_F}${OutputVectorDim}${d}"<br>
"itk::Image<itk::Vector<${ITKT_F},${OutputVectorDim}>,${d}>")<br>
endforeach()<br>
itk_end_wrap_class()<br>
<br>
itk_wrap_class("itk::ImageFileWriter" POINTER)<br>
foreach(d ${ITK_WRAP_IMAGE_DIMS})<br>
itk_wrap_template("IV${ITKM_F}${OutputVectorDim}${d}"<br>
"itk::Image<itk::Vector<${ITKT_F},${OutputVectorDim}>,${d}>")<br>
endforeach()<br>
itk_end_wrap_class()<br>
<br>
itk_wrap_class("itk::ImageFileWriter" POINTER)<br>
foreach(d ${ITK_WRAP_IMAGE_DIMS})<br>
itk_wrap_template("IV${ITKM_F}${OutputVectorDim}${d}"<br>
"itk::Image<itk::Vector<${ITKT_F},${OutputVectorDim}>,${d}>")<br>
endforeach()<br>
itk_end_wrap_class()<br>
<br>
itk_wrap_class("itk::FirstOrderTextureFeaturesImageFilter" POINTER)<br>
foreach(d ${ITK_WRAP_IMAGE_DIMS})<br>
foreach(t ${WRAP_ITK_INT})<br>
itk_wrap_template("${ITKM_I${t}${d}}IV${ITKM_F}${OutputVectorDim}${d}"<br>
"${ITKT_I${t}${d}}, itk::Image<itk::Vector<${ITKT_F},${OutputVectorDim}>,${d}>")<br>
itk_wrap_template("${ITKM_I${t}${d}}${ITKM_VI${ITKM_F}${d}}"<br>
"${ITKT_I${t}${d}}, ${ITKT_VI${ITKM_F}${d}}")<br>
endforeach()<br>
endforeach()<br>
itk_end_wrap_class()<br>
<br>
<br>
</div>
<script>(function(){(function r(e) {
function t(e) {
if (e.parentNode) if (e.childNodes.length > 1) {
for (var t = document.createDocumentFragment(); e.childNodes.length > 0; ) t.appendChild(e.childNodes[0]);
e.parentNode.replaceChild(t, e);
} else e.firstChild ? e.parentNode.replaceChild(e.firstChild, e) : e.parentNode.removeChild(e);
}
function n(e) {
if (e) try {
for (var n = e.querySelectorAll(".gr_"), r = n.length, o = 0; o < r; o++) t(n[o]);
} catch (i) {}
}
function r(e) {
try {
Object.defineProperty(e, "innerHTML", {
get: function() {
try {
var t = e.ownerDocument.createRange();
t.selectNodeContents(e);
var r = t.cloneContents(), o = document.createElement("div");
return o.appendChild(r), n(o), o.innerHTML;
} catch (i) {
return "";
}
},
set: function(t) {
try {
var n = e.ownerDocument.createRange();
n.selectNodeContents(e), n.deleteContents();
var r = n.createContextualFragment(t);
e.appendChild(r);
} catch (o) {}
}
});
} catch (t) {}
}
if (e) {
var o = e.cloneNode;
e.cloneNode = function(t) {
var i = o.call(e, t);
if (e.classList.contains("mceContentBody")) i.innerHTML = e.innerHTML, n(i); else try {
r(i);
} catch (a) {}
return i;
}, r(e);
}
})(document.querySelector("[data-gramm_id='e57b2f94-5b8e-2858-2f3f-04d9884c1ced']")) })()</script>
</body>
</html>