Skip to content
Browse files

Adding more tests for Nary filters

This is to improve coverage.
  • Loading branch information...
1 parent a35b759 commit 4b285c6dbfee9976ee9a6673942346de6ef74c68 @blowekamp blowekamp committed Oct 17, 2012
Showing with 77 additions and 5 deletions.
  1. +39 −3 Code/BasicFilters/json/NaryAdd.json
  2. +38 −2 Code/BasicFilters/json/NaryMaximum.json
View
42 Code/BasicFilters/json/NaryAdd.json
@@ -7,17 +7,53 @@
"members" : [],
"tests" : [
{
- "tag" : "default",
- "description" : "adding 3 images",
+ "tag" : "default2",
+ "description" : "adding of 2 images",
+ "settings" : [],
+ "md5hash" : "d83255b0121596228f3c23a312d9af69",
+ "inputs" : [
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-Zero-One-Float.nrrd"
+ ]
+ },
+ {
+ "tag" : "default3",
+ "description" : "adding of 3 images",
"settings" : [],
"md5hash" : "4628b3b09af910ac432e2a740b20c742",
"inputs" : [
"Input/Ramp-One-Zero-Float.nrrd",
"Input/Ramp-Zero-One-Float.nrrd",
"Input/Ramp-One-Zero-Float.nrrd"
]
+ },
+ {
+ "tag" : "default4",
+ "description" : "adding of 4 images",
+ "settings" : [],
+ "md5hash" : "64140d8b2b8826dbfa6f3bb1d3fbe3eb",
+ "inputs" : [
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-Zero-One-Float.nrrd",
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-One-Zero-Float.nrrd"
+
+ ]
+ },
+ {
+ "tag" : "default5",
+ "description" : "adding of 5 images",
+ "settings" : [],
+ "md5hash" : "c0b3778cf51f4311678a2c9e0561daed",
+ "inputs" : [
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-Zero-One-Float.nrrd",
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-One-Zero-Float.nrrd"
+ ]
}
],
"briefdescription" : "Pixel-wise addition of N images.\n",
"detaileddescription" : "This class is templated over the types of the input images and the type of the output image. Numeric conversions (castings) are done by the C++ defaults.\nThe pixel type of the input images must have a valid definition of the operator+ with each other. This condition is required because internally this filter will perform the operation\npixel_from_image_N+pixel_from_image_(N+1)\nAdditionally the type resulting from the sum, will be cast to the pixel type of the output image.\nThe total operation over one pixel will be\noutput_pixel=static_cast<OutputPixelType>(input_pixel_N+input_pixel_(N+1))\nFor example, this filter could be used directly for adding images whose pixels are vectors of the same dimension, and to store the resulting vector in an output image of vector pixels.\n\\warning No numeric overflow checking is performed in this filter.\n\n"
-}
+}
View
40 Code/BasicFilters/json/NaryMaximum.json
@@ -7,7 +7,17 @@
"members" : [],
"tests" : [
{
- "tag" : "default",
+ "tag" : "default2",
+ "description" : "max of 2 images",
+ "settings" : [],
+ "md5hash" : "00c5a06c3a1b3be415732bd5073450ef",
+ "inputs" : [
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-Zero-One-Float.nrrd"
+ ]
+ },
+ {
+ "tag" : "default3",
"description" : "max of 3 images",
"settings" : [],
"md5hash" : "00c5a06c3a1b3be415732bd5073450ef",
@@ -16,8 +26,34 @@
"Input/Ramp-Zero-One-Float.nrrd",
"Input/Ramp-One-Zero-Float.nrrd"
]
+ },
+ {
+ "tag" : "default4",
+ "description" : "max of 4 images",
+ "settings" : [],
+ "md5hash" : "00c5a06c3a1b3be415732bd5073450ef",
+ "inputs" : [
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-Zero-One-Float.nrrd",
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-One-Zero-Float.nrrd"
+
+ ]
+ },
+ {
+ "tag" : "default5",
+ "description" : "max of 4 images",
+ "settings" : [],
+ "md5hash" : "00c5a06c3a1b3be415732bd5073450ef",
+ "inputs" : [
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-Zero-One-Float.nrrd",
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-One-Zero-Float.nrrd",
+ "Input/Ramp-One-Zero-Float.nrrd"
+ ]
}
],
"briefdescription" : "Computes the pixel-wise maximum of several images.\n",
"detaileddescription" : "This class is templated over the types of the input images and the type of the output image. Numeric conversions (castings) are done by the C++ defaults.\nThe pixel type of the output images must have a valid definition of the operator<. This condition is required because internally this filter will perform an operation similar to:\nconstOutputPixelTypequery_value=static_cast<OutputPixelType>(pixel_from_input_n);if(current_maximum<query_value){current_maximum=query_value;}(where current_maximum is also of type OutputPixelType)\nfor each of the n input images.\nFor example, this filter could be used directly to find a \"maximum projection\" of a series of images, often used in preliminary analysis of time-series data.\n\\author Zachary Pincus\nThis filter was contributed by Zachary Pincus from the Department of Biochemistry and Program in Biomedical Informatics at Stanford University School of Medicine\n"
-}
+}

0 comments on commit 4b285c6

Please sign in to comment.
Something went wrong with that request. Please try again.