~ubuntu-branches/debian/sid/simpleitk/sid

« back to all changes in this revision

Viewing changes to Code/BasicFilters/json/ExtractImageFilter.json

  • Committer: Package Import Robot
  • Author(s): Ghislain Antony Vaillant
  • Date: 2017-11-02 08:49:18 UTC
  • Revision ID: package-import@ubuntu.com-20171102084918-7hs09ih668xq87ej
Tags: upstream-1.0.1
ImportĀ upstreamĀ versionĀ 1.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
  "name" : "ExtractImageFilter",
 
3
  "template_code_filename" : "ImageFilter",
 
4
  "template_test_filename" : "ImageFilter",
 
5
  "number_of_inputs" : 1,
 
6
  "doc" : "Extract image filter extracts a 2D image from a 2D or 3D image and a 3D image from a 4D image. If the same dimension output is required then the RegionOfInterestFilter should be used.",
 
7
  "pixel_types" : "NonLabelPixelIDTypeList",
 
8
  "filter_type" : "itk::ExtractImageFilter<InputImageType, typename InputImageType::template Rebind<typename InputImageType::PixelType, (InputImageType::ImageDimension-1<2?2:InputImageType::ImageDimension-1)>::Type >",
 
9
  "custom_register" : " this->m_MemberFactory->RegisterMemberFunctions< PixelIDTypeList, 4 > ();\n  this->m_MemberFactory->RegisterMemberFunctions< PixelIDTypeList, 3 > ();\n  this->m_MemberFactory->RegisterMemberFunctions< PixelIDTypeList, 2 > ();",
 
10
  "members" : [
 
11
    {
 
12
      "name" : "Size",
 
13
      "type" : "unsigned int",
 
14
      "default" : "std::vector<unsigned int>(4, 1)",
 
15
      "dim_vec" : 1,
 
16
      "itk_type" : "typename InputImageType::SizeType",
 
17
      "briefdescriptionSet" : "",
 
18
      "detaileddescriptionSet" : "",
 
19
      "briefdescriptionGet" : "",
 
20
      "detaileddescriptionGet" : "",
 
21
      "custom_itk_cast" : ""
 
22
    },
 
23
    {
 
24
      "name" : "Index",
 
25
      "type" : "int",
 
26
      "default" : "std::vector<int>(4, 0)",
 
27
      "dim_vec" : 1,
 
28
      "itk_type" : "typename InputImageType::IndexType",
 
29
      "briefdescriptionSet" : "",
 
30
      "detaileddescriptionSet" : "\todo the internal setting of the method needs work!!!",
 
31
      "briefdescriptionGet" : "",
 
32
      "detaileddescriptionGet" : "",
 
33
      "custom_itk_cast" : " typename InputImageType::RegionType itkRegion;\n  for( unsigned int i = 0; i < inImage1.GetDimension(); ++i )\n    {\n    itkRegion.SetIndex( i, m_Index[i] );\n    itkRegion.SetSize( i, m_Size[i] );\n    }\n  filter->SetExtractionRegion( itkRegion );"
 
34
    },
 
35
    {
 
36
      "name" : "DirectionCollapseToStrategy",
 
37
      "enum" : [
 
38
        "DIRECTIONCOLLAPSETOUNKOWN",
 
39
        "DIRECTIONCOLLAPSETOIDENTITY",
 
40
        "DIRECTIONCOLLAPSETOSUBMATRIX",
 
41
        "DIRECTIONCOLLAPSETOGUESS"
 
42
      ],
 
43
      "default" : "itk::simple::ExtractImageFilter::DIRECTIONCOLLAPSETOGUESS",
 
44
      "itk_type" : "typename FilterType::DirectionCollapseStrategyEnum",
 
45
      "briefdescriptionSet" : "",
 
46
      "detaileddescriptionSet" : "Set the strategy to be used to collapse physical space dimensions.\n\nitk::itkExtractImageFilter::DIRECTIONCOLLAPSETOIDENTITY Set the strategy so that all collapsed images have an identity direction. Use this strategy when you know that retention of the physical space orientation of the collapsed image is not important.\n\nitk::itkExtractImageFilter::DIRECTIONCOLLAPSETOGUESS Set the strategy so that all collapsed images where output direction is the sub-matrix if it is positive definite, else return identity. This is backwards compatible with ITKv3, but is highly discouraged because the results are difficult to anticipate under differing data scenerios.\n\nitk::itkExtractImageFilter::DIRECTIONCOLLAPSETOSUBMATRIX Set the strategy so that all collapsed images where output direction is the sub-matrix if it is positive definite, else throw an exception. Use this strategy when it is known that properly identified physical space sub-volumes can be reliably extracted from a higher dimensional space. For example when the application programmer knows that a 4D image is 3D+time, and that the 3D sub-space is properly defined.",
 
47
      "briefdescriptionGet" : "",
 
48
      "detaileddescriptionGet" : "NOTE: The SetDirectionCollapseToUknown is explicitly not defined. It is a state that a filter can be in only when it is first instantiate prior to being initialized. Get the currently set strategy for collapsing directions of physical space."
 
49
    }
 
50
  ],
 
51
  "tests" : [
 
52
    {
 
53
      "tag" : "defaults",
 
54
      "description" : "use the defaults on a 2D image",
 
55
      "md5hash" : "93b885adfe0da089cdf634904fd59f71",
 
56
      "settings" : [
 
57
        {
 
58
          "parameter" : "DirectionCollapseToStrategy",
 
59
          "value" : "itk::simple::${name}::DIRECTIONCOLLAPSETOIDENTITY",
 
60
          "lua_value" : "SimpleITK.${name}_DIRECTIONCOLLAPSETOIDENTITY",
 
61
          "python_value" : "SimpleITK.${name}.DIRECTIONCOLLAPSETOIDENTITY",
 
62
          "ruby_value" : "Simpleitk::${name}::DIRECTIONCOLLAPSETOIDENTITY",
 
63
          "java_value" : "${name}.DirectionCollapseToStrategyType.DIRECTIONCOLLAPSETOIDENTITY",
 
64
          "tcl_value" : "$$${name}_DIRECTIONCOLLAPSETOIDENTITY",
 
65
          "csharp_value" : "itk.simple.${name}.DirectionCollapseToStrategyType.DIRECTIONCOLLAPSETOIDENTITY",
 
66
          "R_value" : "'DIRECTIONCOLLAPSETOIDENTITY'"
 
67
        }
 
68
      ],
 
69
      "inputs" : [
 
70
        "Input/cthead1.png"
 
71
      ]
 
72
    },
 
73
    {
 
74
      "tag" : "more",
 
75
      "description" : "croping",
 
76
      "md5hash" : "01bae0803fe74512dbd9d00fc8da4879",
 
77
      "no_procedure" : 1,
 
78
      "settings" : [
 
79
        {
 
80
          "parameter" : "Size",
 
81
          "type" : "unsigned int",
 
82
          "dim_vec" : 1,
 
83
          "value" : [
 
84
            10,
 
85
            0,
 
86
            10
 
87
          ]
 
88
        },
 
89
        {
 
90
          "parameter" : "Index",
 
91
          "type" : "int",
 
92
          "dim_vec" : 1,
 
93
          "value" : [
 
94
            16,
 
95
            20,
 
96
            51
 
97
          ]
 
98
        },
 
99
        {
 
100
          "parameter" : "DirectionCollapseToStrategy",
 
101
          "value" : "itk::simple::${name}::DIRECTIONCOLLAPSETOIDENTITY",
 
102
          "lua_value" : "SimpleITK.${name}_DIRECTIONCOLLAPSETOIDENTITY",
 
103
          "python_value" : "SimpleITK.${name}.DIRECTIONCOLLAPSETOIDENTITY",
 
104
          "ruby_value" : "Simpleitk::${name}::DIRECTIONCOLLAPSETOIDENTITY",
 
105
          "java_value" : "${name}.DirectionCollapseToStrategyType.DIRECTIONCOLLAPSETOIDENTITY",
 
106
          "tcl_value" : "$$${name}_DIRECTIONCOLLAPSETOIDENTITY",
 
107
          "csharp_value" : "itk.simple.${name}.DirectionCollapseToStrategyType.DIRECTIONCOLLAPSETOIDENTITY",
 
108
          "R_value" : "'DIRECTIONCOLLAPSETOIDENTITY'"
 
109
        }
 
110
      ],
 
111
      "inputs" : [
 
112
        "Input/RA-Float.nrrd"
 
113
      ]
 
114
    }
 
115
  ],
 
116
  "briefdescription" : "Decrease the image size by cropping the image to the selected region bounds.",
 
117
  "detaileddescription" : "ExtractImageFilter changes the image boundary of an image by removing pixels outside the target region. The target region must be specified.\n\nExtractImageFilter also collapses dimensions so that the input image may have more dimensions than the output image (i.e. 4-D input image to a 3-D output image). To specify what dimensions to collapse, the ExtractionRegion must be specified. For any dimension dim where ExtractionRegion.Size[dim] = 0, that dimension is collapsed. The index to collapse on is specified by ExtractionRegion.Index[dim]. For example, we have a image 4D = a 4x4x4x4 image, and we want to get a 3D image, 3D = a 4x4x4 image, specified as [x,y,z,2] from 4D (i.e. the 3rd \"time\" slice from 4D). The ExtractionRegion.Size = [4,4,4,0] and ExtractionRegion.Index = [0,0,0,2].\n\nThe number of dimension in ExtractionRegion.Size and Index must = InputImageDimension. The number of non-zero dimensions in ExtractionRegion.Size must = OutputImageDimension.\n\nThe output image produced by this filter will have the same origin as the input image, while the ImageRegion of the output image will start at the starting index value provided in the ExtractRegion parameter. If you are looking for a filter that will re-compute the origin of the output image, and provide an output image region whose index is set to zeros, then you may want to use the RegionOfInterestImageFilter . The output spacing is is simply the collapsed version of the input spacing.\n\nDetermining the direction of the collapsed output image from an larger dimensional input space is an ill defined problem in general. It is required that the application developer select the desired transformation strategy for collapsing direction cosines. It is REQUIRED that a strategy be explicitly requested (i.e. there is no working default). Direction Collapsing Strategies: 1) DirectionCollapseToUnknown(); This is the default and the filter can not run when this is set. The reason is to explicitly force the application developer to define their desired behavior. 1) DirectionCollapseToIdentity(); Output has identity direction no matter what 2) DirectionCollapseToSubmatrix(); Output direction is the sub-matrix if it is positive definite, else throw an exception.\n\nThis filter is implemented as a multithreaded filter. It provides a ThreadedGenerateData() method for its implementation.\n\n\\note This filter is derived from InPlaceImageFilter . When the input to this filter matched the output requirested region, like with streaming filter for input, then setting this filter to run in-place will result in no copying of the bulk pixel data.\n\n\\see CropImageFilter \n\n\\par Wiki Examples:\n\n\\li All Examples \n\n\\li Crop an image by specifying the region to keep",
 
118
  "itk_module" : "ITKCommon",
 
119
  "itk_group" : "Common"
 
120
}
 
 
b'\\ No newline at end of file'